diff --git a/.gitignore b/.gitignore index 9dd0e50a..ccbe6030 100644 --- a/.gitignore +++ b/.gitignore @@ -184,3 +184,7 @@ krow-workforce-export-latest/ # Data Connect Generated SDKs (Explicit) apps/mobile/packages/data_connect/lib/src/dataconnect_generated/ apps/web/src/dataconnect-generated/ + +# Keep web Data Connect SDK in repo so web CI builds don't depend on runtime generation +!apps/web/src/dataconnect-generated/ +!apps/web/src/dataconnect-generated/** diff --git a/apps/web/src/dataconnect-generated/.guides/config.json b/apps/web/src/dataconnect-generated/.guides/config.json new file mode 100644 index 00000000..e37ed06f --- /dev/null +++ b/apps/web/src/dataconnect-generated/.guides/config.json @@ -0,0 +1,9 @@ +{ + "description": "A set of guides for interacting with the generated firebase dataconnect sdk", + "mcpServers": { + "firebase": { + "command": "npx", + "args": ["-y", "firebase-tools@latest", "experimental:mcp"] + } + } +} diff --git a/apps/web/src/dataconnect-generated/.guides/setup.md b/apps/web/src/dataconnect-generated/.guides/setup.md new file mode 100644 index 00000000..64a49286 --- /dev/null +++ b/apps/web/src/dataconnect-generated/.guides/setup.md @@ -0,0 +1,62 @@ +# Setup + +If the user hasn't already installed the SDK, always run the user's node package manager of choice, and install the package in the directory ../package.json. +For more information on where the library is located, look at the connector.yaml file. + +```ts +import { initializeApp } from 'firebase/app'; + +initializeApp({ + // fill in your project config here using the values from your Firebase project or from the `firebase_get_sdk_config` tool from the Firebase MCP server. +}); +``` + +Then, you can run the SDK as needed. +```ts +import { ... } from '@dataconnect/generated'; +``` + + + + +## React +### Setup + +The user should make sure to install the `@tanstack/react-query` package, along with `@tanstack-query-firebase/react` and `firebase`. + +Then, they should initialize Firebase: +```ts +import { initializeApp } from 'firebase/app'; +initializeApp(firebaseConfig); /* your config here. To generate this, you can use the `firebase_sdk_config` MCP tool */ +``` + +Then, they should add a `QueryClientProvider` to their root of their application. + +Here's an example: + +```ts +import { initializeApp } from 'firebase/app'; +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; + +const firebaseConfig = { + /* your config here. To generate this, you can use the `firebase_sdk_config` MCP tool */ +}; + +// Initialize Firebase +const app = initializeApp(firebaseConfig); + +// Create a TanStack Query client instance +const queryClient = new QueryClient(); + +function App() { + return ( + // Provide the client to your App + + + + ) +} + +render(, document.getElementById('root')); +``` + diff --git a/apps/web/src/dataconnect-generated/.guides/usage.md b/apps/web/src/dataconnect-generated/.guides/usage.md new file mode 100644 index 00000000..04d920af --- /dev/null +++ b/apps/web/src/dataconnect-generated/.guides/usage.md @@ -0,0 +1,109 @@ +# Basic Usage + +Always prioritize using a supported framework over using the generated SDK +directly. Supported frameworks simplify the developer experience and help ensure +best practices are followed. + + + + +### React +For each operation, there is a wrapper hook that can be used to call the operation. + +Here are all of the hooks that get generated: +```ts +import { useCreateBenefitsData, useUpdateBenefitsData, useDeleteBenefitsData, useListShifts, useGetShiftById, useFilterShifts, useGetShiftsByBusinessId, useGetShiftsByVendorId, useCreateStaffDocument, useUpdateStaffDocument } from '@dataconnect/generated/react'; +// The types of these hooks are available in react/index.d.ts + +const { data, isPending, isSuccess, isError, error } = useCreateBenefitsData(createBenefitsDataVars); + +const { data, isPending, isSuccess, isError, error } = useUpdateBenefitsData(updateBenefitsDataVars); + +const { data, isPending, isSuccess, isError, error } = useDeleteBenefitsData(deleteBenefitsDataVars); + +const { data, isPending, isSuccess, isError, error } = useListShifts(listShiftsVars); + +const { data, isPending, isSuccess, isError, error } = useGetShiftById(getShiftByIdVars); + +const { data, isPending, isSuccess, isError, error } = useFilterShifts(filterShiftsVars); + +const { data, isPending, isSuccess, isError, error } = useGetShiftsByBusinessId(getShiftsByBusinessIdVars); + +const { data, isPending, isSuccess, isError, error } = useGetShiftsByVendorId(getShiftsByVendorIdVars); + +const { data, isPending, isSuccess, isError, error } = useCreateStaffDocument(createStaffDocumentVars); + +const { data, isPending, isSuccess, isError, error } = useUpdateStaffDocument(updateStaffDocumentVars); + +``` + +Here's an example from a different generated SDK: + +```ts +import { useListAllMovies } from '@dataconnect/generated/react'; + +function MyComponent() { + const { isLoading, data, error } = useListAllMovies(); + if(isLoading) { + return
Loading...
+ } + if(error) { + return
An Error Occurred: {error}
+ } +} + +// App.tsx +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import MyComponent from './my-component'; + +function App() { + const queryClient = new QueryClient(); + return + + +} +``` + + + +## Advanced Usage +If a user is not using a supported framework, they can use the generated SDK directly. + +Here's an example of how to use it with the first 5 operations: + +```js +import { createBenefitsData, updateBenefitsData, deleteBenefitsData, listShifts, getShiftById, filterShifts, getShiftsByBusinessId, getShiftsByVendorId, createStaffDocument, updateStaffDocument } from '@dataconnect/generated'; + + +// Operation createBenefitsData: For variables, look at type CreateBenefitsDataVars in ../index.d.ts +const { data } = await CreateBenefitsData(dataConnect, createBenefitsDataVars); + +// Operation updateBenefitsData: For variables, look at type UpdateBenefitsDataVars in ../index.d.ts +const { data } = await UpdateBenefitsData(dataConnect, updateBenefitsDataVars); + +// Operation deleteBenefitsData: For variables, look at type DeleteBenefitsDataVars in ../index.d.ts +const { data } = await DeleteBenefitsData(dataConnect, deleteBenefitsDataVars); + +// Operation listShifts: For variables, look at type ListShiftsVars in ../index.d.ts +const { data } = await ListShifts(dataConnect, listShiftsVars); + +// Operation getShiftById: For variables, look at type GetShiftByIdVars in ../index.d.ts +const { data } = await GetShiftById(dataConnect, getShiftByIdVars); + +// Operation filterShifts: For variables, look at type FilterShiftsVars in ../index.d.ts +const { data } = await FilterShifts(dataConnect, filterShiftsVars); + +// Operation getShiftsByBusinessId: For variables, look at type GetShiftsByBusinessIdVars in ../index.d.ts +const { data } = await GetShiftsByBusinessId(dataConnect, getShiftsByBusinessIdVars); + +// Operation getShiftsByVendorId: For variables, look at type GetShiftsByVendorIdVars in ../index.d.ts +const { data } = await GetShiftsByVendorId(dataConnect, getShiftsByVendorIdVars); + +// Operation createStaffDocument: For variables, look at type CreateStaffDocumentVars in ../index.d.ts +const { data } = await CreateStaffDocument(dataConnect, createStaffDocumentVars); + +// Operation updateStaffDocument: For variables, look at type UpdateStaffDocumentVars in ../index.d.ts +const { data } = await UpdateStaffDocument(dataConnect, updateStaffDocumentVars); + + +``` \ No newline at end of file diff --git a/apps/web/src/dataconnect-generated/README.md b/apps/web/src/dataconnect-generated/README.md new file mode 100644 index 00000000..55abf250 --- /dev/null +++ b/apps/web/src/dataconnect-generated/README.md @@ -0,0 +1,49269 @@ +# Generated TypeScript README +This README will guide you through the process of using the generated JavaScript SDK package for the connector `example`. It will also provide examples on how to use your generated SDK to call your Data Connect queries and mutations. + +**If you're looking for the `React README`, you can find it at [`dataconnect-generated/react/README.md`](./react/README.md)** + +***NOTE:** This README is generated alongside the generated SDK. If you make changes to this file, they will be overwritten when the SDK is regenerated.* + +# Table of Contents +- [**Overview**](#generated-javascript-readme) +- [**Accessing the connector**](#accessing-the-connector) + - [*Connecting to the local Emulator*](#connecting-to-the-local-emulator) +- [**Queries**](#queries) + - [*listShifts*](#listshifts) + - [*getShiftById*](#getshiftbyid) + - [*filterShifts*](#filtershifts) + - [*getShiftsByBusinessId*](#getshiftsbybusinessid) + - [*getShiftsByVendorId*](#getshiftsbyvendorid) + - [*listEmergencyContacts*](#listemergencycontacts) + - [*getEmergencyContactById*](#getemergencycontactbyid) + - [*getEmergencyContactsByStaffId*](#getemergencycontactsbystaffid) + - [*getMyTasks*](#getmytasks) + - [*getMemberTaskByIdKey*](#getmembertaskbyidkey) + - [*getMemberTasksByTaskId*](#getmembertasksbytaskid) + - [*listCertificates*](#listcertificates) + - [*getCertificateById*](#getcertificatebyid) + - [*listCertificatesByStaffId*](#listcertificatesbystaffid) + - [*listAssignments*](#listassignments) + - [*getAssignmentById*](#getassignmentbyid) + - [*listAssignmentsByWorkforceId*](#listassignmentsbyworkforceid) + - [*listAssignmentsByWorkforceIds*](#listassignmentsbyworkforceids) + - [*listAssignmentsByShiftRole*](#listassignmentsbyshiftrole) + - [*filterAssignments*](#filterassignments) + - [*listInvoiceTemplates*](#listinvoicetemplates) + - [*getInvoiceTemplateById*](#getinvoicetemplatebyid) + - [*listInvoiceTemplatesByOwnerId*](#listinvoicetemplatesbyownerid) + - [*listInvoiceTemplatesByVendorId*](#listinvoicetemplatesbyvendorid) + - [*listInvoiceTemplatesByBusinessId*](#listinvoicetemplatesbybusinessid) + - [*listInvoiceTemplatesByOrderId*](#listinvoicetemplatesbyorderid) + - [*searchInvoiceTemplatesByOwnerAndName*](#searchinvoicetemplatesbyownerandname) + - [*getStaffDocumentByKey*](#getstaffdocumentbykey) + - [*listStaffDocumentsByStaffId*](#liststaffdocumentsbystaffid) + - [*listStaffDocumentsByDocumentType*](#liststaffdocumentsbydocumenttype) + - [*listStaffDocumentsByStatus*](#liststaffdocumentsbystatus) + - [*listAccounts*](#listaccounts) + - [*getAccountById*](#getaccountbyid) + - [*getAccountsByOwnerId*](#getaccountsbyownerid) + - [*filterAccounts*](#filteraccounts) + - [*listApplications*](#listapplications) + - [*getApplicationById*](#getapplicationbyid) + - [*getApplicationsByShiftId*](#getapplicationsbyshiftid) + - [*getApplicationsByShiftIdAndStatus*](#getapplicationsbyshiftidandstatus) + - [*getApplicationsByStaffId*](#getapplicationsbystaffid) + - [*vaidateDayStaffApplication*](#vaidatedaystaffapplication) + - [*getApplicationByStaffShiftAndRole*](#getapplicationbystaffshiftandrole) + - [*listAcceptedApplicationsByShiftRoleKey*](#listacceptedapplicationsbyshiftrolekey) + - [*listAcceptedApplicationsByBusinessForDay*](#listacceptedapplicationsbybusinessforday) + - [*listStaffsApplicationsByBusinessForDay*](#liststaffsapplicationsbybusinessforday) + - [*listCompletedApplicationsByStaffId*](#listcompletedapplicationsbystaffid) + - [*listAttireOptions*](#listattireoptions) + - [*getAttireOptionById*](#getattireoptionbyid) + - [*filterAttireOptions*](#filterattireoptions) + - [*listCustomRateCards*](#listcustomratecards) + - [*getCustomRateCardById*](#getcustomratecardbyid) + - [*listRoleCategories*](#listrolecategories) + - [*getRoleCategoryById*](#getrolecategorybyid) + - [*getRoleCategoriesByCategory*](#getrolecategoriesbycategory) + - [*listStaffAvailabilities*](#liststaffavailabilities) + - [*listStaffAvailabilitiesByStaffId*](#liststaffavailabilitiesbystaffid) + - [*getStaffAvailabilityByKey*](#getstaffavailabilitybykey) + - [*listStaffAvailabilitiesByDay*](#liststaffavailabilitiesbyday) + - [*listRecentPayments*](#listrecentpayments) + - [*getRecentPaymentById*](#getrecentpaymentbyid) + - [*listRecentPaymentsByStaffId*](#listrecentpaymentsbystaffid) + - [*listRecentPaymentsByApplicationId*](#listrecentpaymentsbyapplicationid) + - [*listRecentPaymentsByInvoiceId*](#listrecentpaymentsbyinvoiceid) + - [*listRecentPaymentsByStatus*](#listrecentpaymentsbystatus) + - [*listRecentPaymentsByInvoiceIds*](#listrecentpaymentsbyinvoiceids) + - [*listRecentPaymentsByBusinessId*](#listrecentpaymentsbybusinessid) + - [*listBusinesses*](#listbusinesses) + - [*getBusinessesByUserId*](#getbusinessesbyuserid) + - [*getBusinessById*](#getbusinessbyid) + - [*listConversations*](#listconversations) + - [*getConversationById*](#getconversationbyid) + - [*listConversationsByType*](#listconversationsbytype) + - [*listConversationsByStatus*](#listconversationsbystatus) + - [*filterConversations*](#filterconversations) + - [*listOrders*](#listorders) + - [*getOrderById*](#getorderbyid) + - [*getOrdersByBusinessId*](#getordersbybusinessid) + - [*getOrdersByVendorId*](#getordersbyvendorid) + - [*getOrdersByStatus*](#getordersbystatus) + - [*getOrdersByDateRange*](#getordersbydaterange) + - [*getRapidOrders*](#getrapidorders) + - [*listOrdersByBusinessAndTeamHub*](#listordersbybusinessandteamhub) + - [*listStaffRoles*](#liststaffroles) + - [*getStaffRoleByKey*](#getstaffrolebykey) + - [*listStaffRolesByStaffId*](#liststaffrolesbystaffid) + - [*listStaffRolesByRoleId*](#liststaffrolesbyroleid) + - [*filterStaffRoles*](#filterstaffroles) + - [*listTaskComments*](#listtaskcomments) + - [*getTaskCommentById*](#gettaskcommentbyid) + - [*getTaskCommentsByTaskId*](#gettaskcommentsbytaskid) + - [*listDocuments*](#listdocuments) + - [*getDocumentById*](#getdocumentbyid) + - [*filterDocuments*](#filterdocuments) + - [*listShiftsForCoverage*](#listshiftsforcoverage) + - [*listApplicationsForCoverage*](#listapplicationsforcoverage) + - [*listShiftsForDailyOpsByBusiness*](#listshiftsfordailyopsbybusiness) + - [*listShiftsForDailyOpsByVendor*](#listshiftsfordailyopsbyvendor) + - [*listApplicationsForDailyOps*](#listapplicationsfordailyops) + - [*listShiftsForForecastByBusiness*](#listshiftsforforecastbybusiness) + - [*listShiftsForForecastByVendor*](#listshiftsforforecastbyvendor) + - [*listShiftsForNoShowRangeByBusiness*](#listshiftsfornoshowrangebybusiness) + - [*listShiftsForNoShowRangeByVendor*](#listshiftsfornoshowrangebyvendor) + - [*listApplicationsForNoShowRange*](#listapplicationsfornoshowrange) + - [*listStaffForNoShowReport*](#liststafffornoshowreport) + - [*listInvoicesForSpendByBusiness*](#listinvoicesforspendbybusiness) + - [*listInvoicesForSpendByVendor*](#listinvoicesforspendbyvendor) + - [*listInvoicesForSpendByOrder*](#listinvoicesforspendbyorder) + - [*listTimesheetsForSpend*](#listtimesheetsforspend) + - [*listShiftsForPerformanceByBusiness*](#listshiftsforperformancebybusiness) + - [*listShiftsForPerformanceByVendor*](#listshiftsforperformancebyvendor) + - [*listApplicationsForPerformance*](#listapplicationsforperformance) + - [*listStaffForPerformance*](#liststaffforperformance) + - [*listRoles*](#listroles) + - [*getRoleById*](#getrolebyid) + - [*listRolesByVendorId*](#listrolesbyvendorid) + - [*listRolesByroleCategoryId*](#listrolesbyrolecategoryid) + - [*getShiftRoleById*](#getshiftrolebyid) + - [*listShiftRolesByShiftId*](#listshiftrolesbyshiftid) + - [*listShiftRolesByRoleId*](#listshiftrolesbyroleid) + - [*listShiftRolesByShiftIdAndTimeRange*](#listshiftrolesbyshiftidandtimerange) + - [*listShiftRolesByVendorId*](#listshiftrolesbyvendorid) + - [*listShiftRolesByBusinessAndDateRange*](#listshiftrolesbybusinessanddaterange) + - [*listShiftRolesByBusinessAndOrder*](#listshiftrolesbybusinessandorder) + - [*listShiftRolesByBusinessDateRangeCompletedOrders*](#listshiftrolesbybusinessdaterangecompletedorders) + - [*listShiftRolesByBusinessAndDatesSummary*](#listshiftrolesbybusinessanddatessummary) + - [*getCompletedShiftsByBusinessId*](#getcompletedshiftsbybusinessid) + - [*listTaxForms*](#listtaxforms) + - [*getTaxFormById*](#gettaxformbyid) + - [*getTaxFormsByStaffId*](#gettaxformsbystaffid) + - [*listTaxFormsWhere*](#listtaxformswhere) + - [*listFaqDatas*](#listfaqdatas) + - [*getFaqDataById*](#getfaqdatabyid) + - [*filterFaqDatas*](#filterfaqdatas) + - [*getStaffCourseById*](#getstaffcoursebyid) + - [*listStaffCoursesByStaffId*](#liststaffcoursesbystaffid) + - [*listStaffCoursesByCourseId*](#liststaffcoursesbycourseid) + - [*getStaffCourseByStaffAndCourse*](#getstaffcoursebystaffandcourse) + - [*listActivityLogs*](#listactivitylogs) + - [*getActivityLogById*](#getactivitylogbyid) + - [*listActivityLogsByUserId*](#listactivitylogsbyuserid) + - [*listUnreadActivityLogsByUserId*](#listunreadactivitylogsbyuserid) + - [*filterActivityLogs*](#filteractivitylogs) + - [*listBenefitsData*](#listbenefitsdata) + - [*getBenefitsDataByKey*](#getbenefitsdatabykey) + - [*listBenefitsDataByStaffId*](#listbenefitsdatabystaffid) + - [*listBenefitsDataByVendorBenefitPlanId*](#listbenefitsdatabyvendorbenefitplanid) + - [*listBenefitsDataByVendorBenefitPlanIds*](#listbenefitsdatabyvendorbenefitplanids) + - [*listStaff*](#liststaff) + - [*getStaffById*](#getstaffbyid) + - [*getStaffByUserId*](#getstaffbyuserid) + - [*filterStaff*](#filterstaff) + - [*listTasks*](#listtasks) + - [*getTaskById*](#gettaskbyid) + - [*getTasksByOwnerId*](#gettasksbyownerid) + - [*filterTasks*](#filtertasks) + - [*listTeamHubs*](#listteamhubs) + - [*getTeamHubById*](#getteamhubbyid) + - [*getTeamHubsByTeamId*](#getteamhubsbyteamid) + - [*listTeamHubsByOwnerId*](#listteamhubsbyownerid) + - [*listClientFeedbacks*](#listclientfeedbacks) + - [*getClientFeedbackById*](#getclientfeedbackbyid) + - [*listClientFeedbacksByBusinessId*](#listclientfeedbacksbybusinessid) + - [*listClientFeedbacksByVendorId*](#listclientfeedbacksbyvendorid) + - [*listClientFeedbacksByBusinessAndVendor*](#listclientfeedbacksbybusinessandvendor) + - [*filterClientFeedbacks*](#filterclientfeedbacks) + - [*listClientFeedbackRatingsByVendorId*](#listclientfeedbackratingsbyvendorid) + - [*listUsers*](#listusers) + - [*getUserById*](#getuserbyid) + - [*filterUsers*](#filterusers) + - [*getVendorById*](#getvendorbyid) + - [*getVendorByUserId*](#getvendorbyuserid) + - [*listVendors*](#listvendors) + - [*listCategories*](#listcategories) + - [*getCategoryById*](#getcategorybyid) + - [*filterCategories*](#filtercategories) + - [*listMessages*](#listmessages) + - [*getMessageById*](#getmessagebyid) + - [*getMessagesByConversationId*](#getmessagesbyconversationid) + - [*listUserConversations*](#listuserconversations) + - [*getUserConversationByKey*](#getuserconversationbykey) + - [*listUserConversationsByUserId*](#listuserconversationsbyuserid) + - [*listUnreadUserConversationsByUserId*](#listunreaduserconversationsbyuserid) + - [*listUserConversationsByConversationId*](#listuserconversationsbyconversationid) + - [*filterUserConversations*](#filteruserconversations) + - [*listHubs*](#listhubs) + - [*getHubById*](#gethubbyid) + - [*getHubsByOwnerId*](#gethubsbyownerid) + - [*filterHubs*](#filterhubs) + - [*listInvoices*](#listinvoices) + - [*getInvoiceById*](#getinvoicebyid) + - [*listInvoicesByVendorId*](#listinvoicesbyvendorid) + - [*listInvoicesByBusinessId*](#listinvoicesbybusinessid) + - [*listInvoicesByOrderId*](#listinvoicesbyorderid) + - [*listInvoicesByStatus*](#listinvoicesbystatus) + - [*filterInvoices*](#filterinvoices) + - [*listOverdueInvoices*](#listoverdueinvoices) + - [*listCourses*](#listcourses) + - [*getCourseById*](#getcoursebyid) + - [*filterCourses*](#filtercourses) + - [*listVendorRates*](#listvendorrates) + - [*getVendorRateById*](#getvendorratebyid) + - [*getWorkforceById*](#getworkforcebyid) + - [*getWorkforceByVendorAndStaff*](#getworkforcebyvendorandstaff) + - [*listWorkforceByVendorId*](#listworkforcebyvendorid) + - [*listWorkforceByStaffId*](#listworkforcebystaffid) + - [*getWorkforceByVendorAndNumber*](#getworkforcebyvendorandnumber) + - [*listStaffAvailabilityStats*](#liststaffavailabilitystats) + - [*getStaffAvailabilityStatsByStaffId*](#getstaffavailabilitystatsbystaffid) + - [*filterStaffAvailabilityStats*](#filterstaffavailabilitystats) + - [*listTeamHudDepartments*](#listteamhuddepartments) + - [*getTeamHudDepartmentById*](#getteamhuddepartmentbyid) + - [*listTeamHudDepartmentsByTeamHubId*](#listteamhuddepartmentsbyteamhubid) + - [*listLevels*](#listlevels) + - [*getLevelById*](#getlevelbyid) + - [*filterLevels*](#filterlevels) + - [*listTeams*](#listteams) + - [*getTeamById*](#getteambyid) + - [*getTeamsByOwnerId*](#getteamsbyownerid) + - [*listTeamMembers*](#listteammembers) + - [*getTeamMemberById*](#getteammemberbyid) + - [*getTeamMembersByTeamId*](#getteammembersbyteamid) + - [*listVendorBenefitPlans*](#listvendorbenefitplans) + - [*getVendorBenefitPlanById*](#getvendorbenefitplanbyid) + - [*listVendorBenefitPlansByVendorId*](#listvendorbenefitplansbyvendorid) + - [*listActiveVendorBenefitPlansByVendorId*](#listactivevendorbenefitplansbyvendorid) + - [*filterVendorBenefitPlans*](#filtervendorbenefitplans) +- [**Mutations**](#mutations) + - [*createBenefitsData*](#createbenefitsdata) + - [*updateBenefitsData*](#updatebenefitsdata) + - [*deleteBenefitsData*](#deletebenefitsdata) + - [*createStaffDocument*](#createstaffdocument) + - [*updateStaffDocument*](#updatestaffdocument) + - [*deleteStaffDocument*](#deletestaffdocument) + - [*createTeamHudDepartment*](#createteamhuddepartment) + - [*updateTeamHudDepartment*](#updateteamhuddepartment) + - [*deleteTeamHudDepartment*](#deleteteamhuddepartment) + - [*createMemberTask*](#createmembertask) + - [*deleteMemberTask*](#deletemembertask) + - [*createTeam*](#createteam) + - [*updateTeam*](#updateteam) + - [*deleteTeam*](#deleteteam) + - [*createUserConversation*](#createuserconversation) + - [*updateUserConversation*](#updateuserconversation) + - [*markConversationAsRead*](#markconversationasread) + - [*incrementUnreadForUser*](#incrementunreadforuser) + - [*deleteUserConversation*](#deleteuserconversation) + - [*createAttireOption*](#createattireoption) + - [*updateAttireOption*](#updateattireoption) + - [*deleteAttireOption*](#deleteattireoption) + - [*createCourse*](#createcourse) + - [*updateCourse*](#updatecourse) + - [*deleteCourse*](#deletecourse) + - [*createEmergencyContact*](#createemergencycontact) + - [*updateEmergencyContact*](#updateemergencycontact) + - [*deleteEmergencyContact*](#deleteemergencycontact) + - [*createStaffCourse*](#createstaffcourse) + - [*updateStaffCourse*](#updatestaffcourse) + - [*deleteStaffCourse*](#deletestaffcourse) + - [*createTask*](#createtask) + - [*updateTask*](#updatetask) + - [*deleteTask*](#deletetask) + - [*CreateCertificate*](#createcertificate) + - [*UpdateCertificate*](#updatecertificate) + - [*DeleteCertificate*](#deletecertificate) + - [*createRole*](#createrole) + - [*updateRole*](#updaterole) + - [*deleteRole*](#deleterole) + - [*createClientFeedback*](#createclientfeedback) + - [*updateClientFeedback*](#updateclientfeedback) + - [*deleteClientFeedback*](#deleteclientfeedback) + - [*createBusiness*](#createbusiness) + - [*updateBusiness*](#updatebusiness) + - [*deleteBusiness*](#deletebusiness) + - [*createConversation*](#createconversation) + - [*updateConversation*](#updateconversation) + - [*updateConversationLastMessage*](#updateconversationlastmessage) + - [*deleteConversation*](#deleteconversation) + - [*createCustomRateCard*](#createcustomratecard) + - [*updateCustomRateCard*](#updatecustomratecard) + - [*deleteCustomRateCard*](#deletecustomratecard) + - [*createRecentPayment*](#createrecentpayment) + - [*updateRecentPayment*](#updaterecentpayment) + - [*deleteRecentPayment*](#deleterecentpayment) + - [*CreateUser*](#createuser) + - [*UpdateUser*](#updateuser) + - [*DeleteUser*](#deleteuser) + - [*createVendor*](#createvendor) + - [*updateVendor*](#updatevendor) + - [*deleteVendor*](#deletevendor) + - [*createDocument*](#createdocument) + - [*updateDocument*](#updatedocument) + - [*deleteDocument*](#deletedocument) + - [*createTaskComment*](#createtaskcomment) + - [*updateTaskComment*](#updatetaskcomment) + - [*deleteTaskComment*](#deletetaskcomment) + - [*createVendorBenefitPlan*](#createvendorbenefitplan) + - [*updateVendorBenefitPlan*](#updatevendorbenefitplan) + - [*deleteVendorBenefitPlan*](#deletevendorbenefitplan) + - [*createMessage*](#createmessage) + - [*updateMessage*](#updatemessage) + - [*deleteMessage*](#deletemessage) + - [*createWorkforce*](#createworkforce) + - [*updateWorkforce*](#updateworkforce) + - [*deactivateWorkforce*](#deactivateworkforce) + - [*createFaqData*](#createfaqdata) + - [*updateFaqData*](#updatefaqdata) + - [*deleteFaqData*](#deletefaqdata) + - [*createInvoice*](#createinvoice) + - [*updateInvoice*](#updateinvoice) + - [*deleteInvoice*](#deleteinvoice) + - [*createTeamHub*](#createteamhub) + - [*updateTeamHub*](#updateteamhub) + - [*deleteTeamHub*](#deleteteamhub) + - [*createHub*](#createhub) + - [*updateHub*](#updatehub) + - [*deleteHub*](#deletehub) + - [*createRoleCategory*](#createrolecategory) + - [*updateRoleCategory*](#updaterolecategory) + - [*deleteRoleCategory*](#deleterolecategory) + - [*createStaffAvailabilityStats*](#createstaffavailabilitystats) + - [*updateStaffAvailabilityStats*](#updatestaffavailabilitystats) + - [*deleteStaffAvailabilityStats*](#deletestaffavailabilitystats) + - [*createShiftRole*](#createshiftrole) + - [*updateShiftRole*](#updateshiftrole) + - [*deleteShiftRole*](#deleteshiftrole) + - [*createStaffRole*](#createstaffrole) + - [*deleteStaffRole*](#deletestaffrole) + - [*createAccount*](#createaccount) + - [*updateAccount*](#updateaccount) + - [*deleteAccount*](#deleteaccount) + - [*createApplication*](#createapplication) + - [*updateApplicationStatus*](#updateapplicationstatus) + - [*deleteApplication*](#deleteapplication) + - [*CreateAssignment*](#createassignment) + - [*UpdateAssignment*](#updateassignment) + - [*DeleteAssignment*](#deleteassignment) + - [*createInvoiceTemplate*](#createinvoicetemplate) + - [*updateInvoiceTemplate*](#updateinvoicetemplate) + - [*deleteInvoiceTemplate*](#deleteinvoicetemplate) + - [*createStaffAvailability*](#createstaffavailability) + - [*updateStaffAvailability*](#updatestaffavailability) + - [*deleteStaffAvailability*](#deletestaffavailability) + - [*createTeamMember*](#createteammember) + - [*updateTeamMember*](#updateteammember) + - [*updateTeamMemberInviteStatus*](#updateteammemberinvitestatus) + - [*acceptInviteByCode*](#acceptinvitebycode) + - [*cancelInviteByCode*](#cancelinvitebycode) + - [*deleteTeamMember*](#deleteteammember) + - [*createLevel*](#createlevel) + - [*updateLevel*](#updatelevel) + - [*deleteLevel*](#deletelevel) + - [*createOrder*](#createorder) + - [*updateOrder*](#updateorder) + - [*deleteOrder*](#deleteorder) + - [*createCategory*](#createcategory) + - [*updateCategory*](#updatecategory) + - [*deleteCategory*](#deletecategory) + - [*createTaxForm*](#createtaxform) + - [*updateTaxForm*](#updatetaxform) + - [*deleteTaxForm*](#deletetaxform) + - [*createVendorRate*](#createvendorrate) + - [*updateVendorRate*](#updatevendorrate) + - [*deleteVendorRate*](#deletevendorrate) + - [*createActivityLog*](#createactivitylog) + - [*updateActivityLog*](#updateactivitylog) + - [*markActivityLogAsRead*](#markactivitylogasread) + - [*markActivityLogsAsRead*](#markactivitylogsasread) + - [*deleteActivityLog*](#deleteactivitylog) + - [*createShift*](#createshift) + - [*updateShift*](#updateshift) + - [*deleteShift*](#deleteshift) + - [*CreateStaff*](#createstaff) + - [*UpdateStaff*](#updatestaff) + - [*DeleteStaff*](#deletestaff) + +# Accessing the connector +A connector is a collection of Queries and Mutations. One SDK is generated for each connector - this SDK is generated for the connector `example`. You can find more information about connectors in the [Data Connect documentation](https://firebase.google.com/docs/data-connect#how-does). + +You can use this generated SDK by importing from the package `@dataconnect/generated` as shown below. Both CommonJS and ESM imports are supported. + +You can also follow the instructions from the [Data Connect documentation](https://firebase.google.com/docs/data-connect/web-sdk#set-client). + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; + +const dataConnect = getDataConnect(connectorConfig); +``` + +## Connecting to the local Emulator +By default, the connector will connect to the production service. + +To connect to the emulator, you can use the following code. +You can also follow the emulator instructions from the [Data Connect documentation](https://firebase.google.com/docs/data-connect/web-sdk#instrument-clients). + +```typescript +import { connectDataConnectEmulator, getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; + +const dataConnect = getDataConnect(connectorConfig); +connectDataConnectEmulator(dataConnect, 'localhost', 9399); +``` + +After it's initialized, you can call your Data Connect [queries](#queries) and [mutations](#mutations) from your generated SDK. + +# Queries + +There are two ways to execute a Data Connect Query using the generated Web SDK: +- Using a Query Reference function, which returns a `QueryRef` + - The `QueryRef` can be used as an argument to `executeQuery()`, which will execute the Query and return a `QueryPromise` +- Using an action shortcut function, which returns a `QueryPromise` + - Calling the action shortcut function will execute the Query and return a `QueryPromise` + +The following is true for both the action shortcut function and the `QueryRef` function: +- The `QueryPromise` returned will resolve to the result of the Query once it has finished executing +- If the Query accepts arguments, both the action shortcut function and the `QueryRef` function accept a single argument: an object that contains all the required variables (and the optional variables) for the Query +- Both functions can be called with or without passing in a `DataConnect` instance as an argument. If no `DataConnect` argument is passed in, then the generated SDK will call `getDataConnect(connectorConfig)` behind the scenes for you. + +Below are examples of how to use the `example` connector's generated functions to execute each query. You can also follow the examples from the [Data Connect documentation](https://firebase.google.com/docs/data-connect/web-sdk#using-queries). + +## listShifts +You can execute the `listShifts` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShifts(vars?: ListShiftsVariables): QueryPromise; + +interface ListShiftsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListShiftsVariables): QueryRef; +} +export const listShiftsRef: ListShiftsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShifts(dc: DataConnect, vars?: ListShiftsVariables): QueryPromise; + +interface ListShiftsRef { + ... + (dc: DataConnect, vars?: ListShiftsVariables): QueryRef; +} +export const listShiftsRef: ListShiftsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftsRef: +```typescript +const name = listShiftsRef.operationName; +console.log(name); +``` + +### Variables +The `listShifts` query has an optional argument of type `ListShiftsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listShifts` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftsData { + shifts: ({ + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key)[]; +} +``` +### Using `listShifts`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShifts, ListShiftsVariables } from '@dataconnect/generated'; + +// The `listShifts` query has an optional argument of type `ListShiftsVariables`: +const listShiftsVars: ListShiftsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShifts()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShifts(listShiftsVars); +// Variables can be defined inline as well. +const { data } = await listShifts({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListShiftsVariables` argument. +const { data } = await listShifts(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShifts(dataConnect, listShiftsVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +listShifts(listShiftsVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `listShifts`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftsRef, ListShiftsVariables } from '@dataconnect/generated'; + +// The `listShifts` query has an optional argument of type `ListShiftsVariables`: +const listShiftsVars: ListShiftsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftsRef()` function to get a reference to the query. +const ref = listShiftsRef(listShiftsVars); +// Variables can be defined inline as well. +const ref = listShiftsRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListShiftsVariables` argument. +const ref = listShiftsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftsRef(dataConnect, listShiftsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## getShiftById +You can execute the `getShiftById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getShiftById(vars: GetShiftByIdVariables): QueryPromise; + +interface GetShiftByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetShiftByIdVariables): QueryRef; +} +export const getShiftByIdRef: GetShiftByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getShiftById(dc: DataConnect, vars: GetShiftByIdVariables): QueryPromise; + +interface GetShiftByIdRef { + ... + (dc: DataConnect, vars: GetShiftByIdVariables): QueryRef; +} +export const getShiftByIdRef: GetShiftByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getShiftByIdRef: +```typescript +const name = getShiftByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getShiftById` query requires an argument of type `GetShiftByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetShiftByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getShiftById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetShiftByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetShiftByIdData { + shift?: { + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; +} +``` +### Using `getShiftById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getShiftById, GetShiftByIdVariables } from '@dataconnect/generated'; + +// The `getShiftById` query requires an argument of type `GetShiftByIdVariables`: +const getShiftByIdVars: GetShiftByIdVariables = { + id: ..., +}; + +// Call the `getShiftById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getShiftById(getShiftByIdVars); +// Variables can be defined inline as well. +const { data } = await getShiftById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getShiftById(dataConnect, getShiftByIdVars); + +console.log(data.shift); + +// Or, you can use the `Promise` API. +getShiftById(getShiftByIdVars).then((response) => { + const data = response.data; + console.log(data.shift); +}); +``` + +### Using `getShiftById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getShiftByIdRef, GetShiftByIdVariables } from '@dataconnect/generated'; + +// The `getShiftById` query requires an argument of type `GetShiftByIdVariables`: +const getShiftByIdVars: GetShiftByIdVariables = { + id: ..., +}; + +// Call the `getShiftByIdRef()` function to get a reference to the query. +const ref = getShiftByIdRef(getShiftByIdVars); +// Variables can be defined inline as well. +const ref = getShiftByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getShiftByIdRef(dataConnect, getShiftByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shift); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shift); +}); +``` + +## filterShifts +You can execute the `filterShifts` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterShifts(vars?: FilterShiftsVariables): QueryPromise; + +interface FilterShiftsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterShiftsVariables): QueryRef; +} +export const filterShiftsRef: FilterShiftsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterShifts(dc: DataConnect, vars?: FilterShiftsVariables): QueryPromise; + +interface FilterShiftsRef { + ... + (dc: DataConnect, vars?: FilterShiftsVariables): QueryRef; +} +export const filterShiftsRef: FilterShiftsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterShiftsRef: +```typescript +const name = filterShiftsRef.operationName; +console.log(name); +``` + +### Variables +The `filterShifts` query has an optional argument of type `FilterShiftsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterShiftsVariables { + status?: ShiftStatus | null; + orderId?: UUIDString | null; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `filterShifts` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterShiftsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterShiftsData { + shifts: ({ + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key)[]; +} +``` +### Using `filterShifts`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterShifts, FilterShiftsVariables } from '@dataconnect/generated'; + +// The `filterShifts` query has an optional argument of type `FilterShiftsVariables`: +const filterShiftsVars: FilterShiftsVariables = { + status: ..., // optional + orderId: ..., // optional + dateFrom: ..., // optional + dateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterShifts()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterShifts(filterShiftsVars); +// Variables can be defined inline as well. +const { data } = await filterShifts({ status: ..., orderId: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterShiftsVariables` argument. +const { data } = await filterShifts(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterShifts(dataConnect, filterShiftsVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +filterShifts(filterShiftsVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `filterShifts`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterShiftsRef, FilterShiftsVariables } from '@dataconnect/generated'; + +// The `filterShifts` query has an optional argument of type `FilterShiftsVariables`: +const filterShiftsVars: FilterShiftsVariables = { + status: ..., // optional + orderId: ..., // optional + dateFrom: ..., // optional + dateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterShiftsRef()` function to get a reference to the query. +const ref = filterShiftsRef(filterShiftsVars); +// Variables can be defined inline as well. +const ref = filterShiftsRef({ status: ..., orderId: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterShiftsVariables` argument. +const ref = filterShiftsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterShiftsRef(dataConnect, filterShiftsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## getShiftsByBusinessId +You can execute the `getShiftsByBusinessId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getShiftsByBusinessId(vars: GetShiftsByBusinessIdVariables): QueryPromise; + +interface GetShiftsByBusinessIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetShiftsByBusinessIdVariables): QueryRef; +} +export const getShiftsByBusinessIdRef: GetShiftsByBusinessIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getShiftsByBusinessId(dc: DataConnect, vars: GetShiftsByBusinessIdVariables): QueryPromise; + +interface GetShiftsByBusinessIdRef { + ... + (dc: DataConnect, vars: GetShiftsByBusinessIdVariables): QueryRef; +} +export const getShiftsByBusinessIdRef: GetShiftsByBusinessIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getShiftsByBusinessIdRef: +```typescript +const name = getShiftsByBusinessIdRef.operationName; +console.log(name); +``` + +### Variables +The `getShiftsByBusinessId` query requires an argument of type `GetShiftsByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetShiftsByBusinessIdVariables { + businessId: UUIDString; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `getShiftsByBusinessId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetShiftsByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetShiftsByBusinessIdData { + shifts: ({ + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key)[]; +} +``` +### Using `getShiftsByBusinessId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getShiftsByBusinessId, GetShiftsByBusinessIdVariables } from '@dataconnect/generated'; + +// The `getShiftsByBusinessId` query requires an argument of type `GetShiftsByBusinessIdVariables`: +const getShiftsByBusinessIdVars: GetShiftsByBusinessIdVariables = { + businessId: ..., + dateFrom: ..., // optional + dateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getShiftsByBusinessId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getShiftsByBusinessId(getShiftsByBusinessIdVars); +// Variables can be defined inline as well. +const { data } = await getShiftsByBusinessId({ businessId: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getShiftsByBusinessId(dataConnect, getShiftsByBusinessIdVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +getShiftsByBusinessId(getShiftsByBusinessIdVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `getShiftsByBusinessId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getShiftsByBusinessIdRef, GetShiftsByBusinessIdVariables } from '@dataconnect/generated'; + +// The `getShiftsByBusinessId` query requires an argument of type `GetShiftsByBusinessIdVariables`: +const getShiftsByBusinessIdVars: GetShiftsByBusinessIdVariables = { + businessId: ..., + dateFrom: ..., // optional + dateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getShiftsByBusinessIdRef()` function to get a reference to the query. +const ref = getShiftsByBusinessIdRef(getShiftsByBusinessIdVars); +// Variables can be defined inline as well. +const ref = getShiftsByBusinessIdRef({ businessId: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getShiftsByBusinessIdRef(dataConnect, getShiftsByBusinessIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## getShiftsByVendorId +You can execute the `getShiftsByVendorId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getShiftsByVendorId(vars: GetShiftsByVendorIdVariables): QueryPromise; + +interface GetShiftsByVendorIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetShiftsByVendorIdVariables): QueryRef; +} +export const getShiftsByVendorIdRef: GetShiftsByVendorIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getShiftsByVendorId(dc: DataConnect, vars: GetShiftsByVendorIdVariables): QueryPromise; + +interface GetShiftsByVendorIdRef { + ... + (dc: DataConnect, vars: GetShiftsByVendorIdVariables): QueryRef; +} +export const getShiftsByVendorIdRef: GetShiftsByVendorIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getShiftsByVendorIdRef: +```typescript +const name = getShiftsByVendorIdRef.operationName; +console.log(name); +``` + +### Variables +The `getShiftsByVendorId` query requires an argument of type `GetShiftsByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetShiftsByVendorIdVariables { + vendorId: UUIDString; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `getShiftsByVendorId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetShiftsByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetShiftsByVendorIdData { + shifts: ({ + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key)[]; +} +``` +### Using `getShiftsByVendorId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getShiftsByVendorId, GetShiftsByVendorIdVariables } from '@dataconnect/generated'; + +// The `getShiftsByVendorId` query requires an argument of type `GetShiftsByVendorIdVariables`: +const getShiftsByVendorIdVars: GetShiftsByVendorIdVariables = { + vendorId: ..., + dateFrom: ..., // optional + dateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getShiftsByVendorId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getShiftsByVendorId(getShiftsByVendorIdVars); +// Variables can be defined inline as well. +const { data } = await getShiftsByVendorId({ vendorId: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getShiftsByVendorId(dataConnect, getShiftsByVendorIdVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +getShiftsByVendorId(getShiftsByVendorIdVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `getShiftsByVendorId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getShiftsByVendorIdRef, GetShiftsByVendorIdVariables } from '@dataconnect/generated'; + +// The `getShiftsByVendorId` query requires an argument of type `GetShiftsByVendorIdVariables`: +const getShiftsByVendorIdVars: GetShiftsByVendorIdVariables = { + vendorId: ..., + dateFrom: ..., // optional + dateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getShiftsByVendorIdRef()` function to get a reference to the query. +const ref = getShiftsByVendorIdRef(getShiftsByVendorIdVars); +// Variables can be defined inline as well. +const ref = getShiftsByVendorIdRef({ vendorId: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getShiftsByVendorIdRef(dataConnect, getShiftsByVendorIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## listEmergencyContacts +You can execute the `listEmergencyContacts` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listEmergencyContacts(): QueryPromise; + +interface ListEmergencyContactsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listEmergencyContactsRef: ListEmergencyContactsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listEmergencyContacts(dc: DataConnect): QueryPromise; + +interface ListEmergencyContactsRef { + ... + (dc: DataConnect): QueryRef; +} +export const listEmergencyContactsRef: ListEmergencyContactsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listEmergencyContactsRef: +```typescript +const name = listEmergencyContactsRef.operationName; +console.log(name); +``` + +### Variables +The `listEmergencyContacts` query has no variables. +### Return Type +Recall that executing the `listEmergencyContacts` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListEmergencyContactsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListEmergencyContactsData { + emergencyContacts: ({ + id: UUIDString; + name: string; + phone: string; + relationship: RelationshipType; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & EmergencyContact_Key)[]; +} +``` +### Using `listEmergencyContacts`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listEmergencyContacts } from '@dataconnect/generated'; + + +// Call the `listEmergencyContacts()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listEmergencyContacts(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listEmergencyContacts(dataConnect); + +console.log(data.emergencyContacts); + +// Or, you can use the `Promise` API. +listEmergencyContacts().then((response) => { + const data = response.data; + console.log(data.emergencyContacts); +}); +``` + +### Using `listEmergencyContacts`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listEmergencyContactsRef } from '@dataconnect/generated'; + + +// Call the `listEmergencyContactsRef()` function to get a reference to the query. +const ref = listEmergencyContactsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listEmergencyContactsRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.emergencyContacts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.emergencyContacts); +}); +``` + +## getEmergencyContactById +You can execute the `getEmergencyContactById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getEmergencyContactById(vars: GetEmergencyContactByIdVariables): QueryPromise; + +interface GetEmergencyContactByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetEmergencyContactByIdVariables): QueryRef; +} +export const getEmergencyContactByIdRef: GetEmergencyContactByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getEmergencyContactById(dc: DataConnect, vars: GetEmergencyContactByIdVariables): QueryPromise; + +interface GetEmergencyContactByIdRef { + ... + (dc: DataConnect, vars: GetEmergencyContactByIdVariables): QueryRef; +} +export const getEmergencyContactByIdRef: GetEmergencyContactByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getEmergencyContactByIdRef: +```typescript +const name = getEmergencyContactByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getEmergencyContactById` query requires an argument of type `GetEmergencyContactByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetEmergencyContactByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getEmergencyContactById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetEmergencyContactByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetEmergencyContactByIdData { + emergencyContact?: { + id: UUIDString; + name: string; + phone: string; + relationship: RelationshipType; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & EmergencyContact_Key; +} +``` +### Using `getEmergencyContactById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getEmergencyContactById, GetEmergencyContactByIdVariables } from '@dataconnect/generated'; + +// The `getEmergencyContactById` query requires an argument of type `GetEmergencyContactByIdVariables`: +const getEmergencyContactByIdVars: GetEmergencyContactByIdVariables = { + id: ..., +}; + +// Call the `getEmergencyContactById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getEmergencyContactById(getEmergencyContactByIdVars); +// Variables can be defined inline as well. +const { data } = await getEmergencyContactById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getEmergencyContactById(dataConnect, getEmergencyContactByIdVars); + +console.log(data.emergencyContact); + +// Or, you can use the `Promise` API. +getEmergencyContactById(getEmergencyContactByIdVars).then((response) => { + const data = response.data; + console.log(data.emergencyContact); +}); +``` + +### Using `getEmergencyContactById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getEmergencyContactByIdRef, GetEmergencyContactByIdVariables } from '@dataconnect/generated'; + +// The `getEmergencyContactById` query requires an argument of type `GetEmergencyContactByIdVariables`: +const getEmergencyContactByIdVars: GetEmergencyContactByIdVariables = { + id: ..., +}; + +// Call the `getEmergencyContactByIdRef()` function to get a reference to the query. +const ref = getEmergencyContactByIdRef(getEmergencyContactByIdVars); +// Variables can be defined inline as well. +const ref = getEmergencyContactByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getEmergencyContactByIdRef(dataConnect, getEmergencyContactByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.emergencyContact); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.emergencyContact); +}); +``` + +## getEmergencyContactsByStaffId +You can execute the `getEmergencyContactsByStaffId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getEmergencyContactsByStaffId(vars: GetEmergencyContactsByStaffIdVariables): QueryPromise; + +interface GetEmergencyContactsByStaffIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetEmergencyContactsByStaffIdVariables): QueryRef; +} +export const getEmergencyContactsByStaffIdRef: GetEmergencyContactsByStaffIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getEmergencyContactsByStaffId(dc: DataConnect, vars: GetEmergencyContactsByStaffIdVariables): QueryPromise; + +interface GetEmergencyContactsByStaffIdRef { + ... + (dc: DataConnect, vars: GetEmergencyContactsByStaffIdVariables): QueryRef; +} +export const getEmergencyContactsByStaffIdRef: GetEmergencyContactsByStaffIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getEmergencyContactsByStaffIdRef: +```typescript +const name = getEmergencyContactsByStaffIdRef.operationName; +console.log(name); +``` + +### Variables +The `getEmergencyContactsByStaffId` query requires an argument of type `GetEmergencyContactsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetEmergencyContactsByStaffIdVariables { + staffId: UUIDString; +} +``` +### Return Type +Recall that executing the `getEmergencyContactsByStaffId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetEmergencyContactsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetEmergencyContactsByStaffIdData { + emergencyContacts: ({ + id: UUIDString; + name: string; + phone: string; + relationship: RelationshipType; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & EmergencyContact_Key)[]; +} +``` +### Using `getEmergencyContactsByStaffId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getEmergencyContactsByStaffId, GetEmergencyContactsByStaffIdVariables } from '@dataconnect/generated'; + +// The `getEmergencyContactsByStaffId` query requires an argument of type `GetEmergencyContactsByStaffIdVariables`: +const getEmergencyContactsByStaffIdVars: GetEmergencyContactsByStaffIdVariables = { + staffId: ..., +}; + +// Call the `getEmergencyContactsByStaffId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getEmergencyContactsByStaffId(getEmergencyContactsByStaffIdVars); +// Variables can be defined inline as well. +const { data } = await getEmergencyContactsByStaffId({ staffId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getEmergencyContactsByStaffId(dataConnect, getEmergencyContactsByStaffIdVars); + +console.log(data.emergencyContacts); + +// Or, you can use the `Promise` API. +getEmergencyContactsByStaffId(getEmergencyContactsByStaffIdVars).then((response) => { + const data = response.data; + console.log(data.emergencyContacts); +}); +``` + +### Using `getEmergencyContactsByStaffId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getEmergencyContactsByStaffIdRef, GetEmergencyContactsByStaffIdVariables } from '@dataconnect/generated'; + +// The `getEmergencyContactsByStaffId` query requires an argument of type `GetEmergencyContactsByStaffIdVariables`: +const getEmergencyContactsByStaffIdVars: GetEmergencyContactsByStaffIdVariables = { + staffId: ..., +}; + +// Call the `getEmergencyContactsByStaffIdRef()` function to get a reference to the query. +const ref = getEmergencyContactsByStaffIdRef(getEmergencyContactsByStaffIdVars); +// Variables can be defined inline as well. +const ref = getEmergencyContactsByStaffIdRef({ staffId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getEmergencyContactsByStaffIdRef(dataConnect, getEmergencyContactsByStaffIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.emergencyContacts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.emergencyContacts); +}); +``` + +## getMyTasks +You can execute the `getMyTasks` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getMyTasks(vars: GetMyTasksVariables): QueryPromise; + +interface GetMyTasksRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetMyTasksVariables): QueryRef; +} +export const getMyTasksRef: GetMyTasksRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getMyTasks(dc: DataConnect, vars: GetMyTasksVariables): QueryPromise; + +interface GetMyTasksRef { + ... + (dc: DataConnect, vars: GetMyTasksVariables): QueryRef; +} +export const getMyTasksRef: GetMyTasksRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getMyTasksRef: +```typescript +const name = getMyTasksRef.operationName; +console.log(name); +``` + +### Variables +The `getMyTasks` query requires an argument of type `GetMyTasksVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetMyTasksVariables { + teamMemberId: UUIDString; +} +``` +### Return Type +Recall that executing the `getMyTasks` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetMyTasksData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetMyTasksData { + memberTasks: ({ + id: UUIDString; + task: { + id: UUIDString; + taskName: string; + description?: string | null; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + priority: TaskPriority; + } & Task_Key; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + })[]; +} +``` +### Using `getMyTasks`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getMyTasks, GetMyTasksVariables } from '@dataconnect/generated'; + +// The `getMyTasks` query requires an argument of type `GetMyTasksVariables`: +const getMyTasksVars: GetMyTasksVariables = { + teamMemberId: ..., +}; + +// Call the `getMyTasks()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getMyTasks(getMyTasksVars); +// Variables can be defined inline as well. +const { data } = await getMyTasks({ teamMemberId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getMyTasks(dataConnect, getMyTasksVars); + +console.log(data.memberTasks); + +// Or, you can use the `Promise` API. +getMyTasks(getMyTasksVars).then((response) => { + const data = response.data; + console.log(data.memberTasks); +}); +``` + +### Using `getMyTasks`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getMyTasksRef, GetMyTasksVariables } from '@dataconnect/generated'; + +// The `getMyTasks` query requires an argument of type `GetMyTasksVariables`: +const getMyTasksVars: GetMyTasksVariables = { + teamMemberId: ..., +}; + +// Call the `getMyTasksRef()` function to get a reference to the query. +const ref = getMyTasksRef(getMyTasksVars); +// Variables can be defined inline as well. +const ref = getMyTasksRef({ teamMemberId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getMyTasksRef(dataConnect, getMyTasksVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.memberTasks); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.memberTasks); +}); +``` + +## getMemberTaskByIdKey +You can execute the `getMemberTaskByIdKey` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getMemberTaskByIdKey(vars: GetMemberTaskByIdKeyVariables): QueryPromise; + +interface GetMemberTaskByIdKeyRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetMemberTaskByIdKeyVariables): QueryRef; +} +export const getMemberTaskByIdKeyRef: GetMemberTaskByIdKeyRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getMemberTaskByIdKey(dc: DataConnect, vars: GetMemberTaskByIdKeyVariables): QueryPromise; + +interface GetMemberTaskByIdKeyRef { + ... + (dc: DataConnect, vars: GetMemberTaskByIdKeyVariables): QueryRef; +} +export const getMemberTaskByIdKeyRef: GetMemberTaskByIdKeyRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getMemberTaskByIdKeyRef: +```typescript +const name = getMemberTaskByIdKeyRef.operationName; +console.log(name); +``` + +### Variables +The `getMemberTaskByIdKey` query requires an argument of type `GetMemberTaskByIdKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetMemberTaskByIdKeyVariables { + teamMemberId: UUIDString; + taskId: UUIDString; +} +``` +### Return Type +Recall that executing the `getMemberTaskByIdKey` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetMemberTaskByIdKeyData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetMemberTaskByIdKeyData { + memberTask?: { + id: UUIDString; + task: { + id: UUIDString; + taskName: string; + description?: string | null; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + priority: TaskPriority; + } & Task_Key; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + }; +} +``` +### Using `getMemberTaskByIdKey`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getMemberTaskByIdKey, GetMemberTaskByIdKeyVariables } from '@dataconnect/generated'; + +// The `getMemberTaskByIdKey` query requires an argument of type `GetMemberTaskByIdKeyVariables`: +const getMemberTaskByIdKeyVars: GetMemberTaskByIdKeyVariables = { + teamMemberId: ..., + taskId: ..., +}; + +// Call the `getMemberTaskByIdKey()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getMemberTaskByIdKey(getMemberTaskByIdKeyVars); +// Variables can be defined inline as well. +const { data } = await getMemberTaskByIdKey({ teamMemberId: ..., taskId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getMemberTaskByIdKey(dataConnect, getMemberTaskByIdKeyVars); + +console.log(data.memberTask); + +// Or, you can use the `Promise` API. +getMemberTaskByIdKey(getMemberTaskByIdKeyVars).then((response) => { + const data = response.data; + console.log(data.memberTask); +}); +``` + +### Using `getMemberTaskByIdKey`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getMemberTaskByIdKeyRef, GetMemberTaskByIdKeyVariables } from '@dataconnect/generated'; + +// The `getMemberTaskByIdKey` query requires an argument of type `GetMemberTaskByIdKeyVariables`: +const getMemberTaskByIdKeyVars: GetMemberTaskByIdKeyVariables = { + teamMemberId: ..., + taskId: ..., +}; + +// Call the `getMemberTaskByIdKeyRef()` function to get a reference to the query. +const ref = getMemberTaskByIdKeyRef(getMemberTaskByIdKeyVars); +// Variables can be defined inline as well. +const ref = getMemberTaskByIdKeyRef({ teamMemberId: ..., taskId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getMemberTaskByIdKeyRef(dataConnect, getMemberTaskByIdKeyVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.memberTask); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.memberTask); +}); +``` + +## getMemberTasksByTaskId +You can execute the `getMemberTasksByTaskId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getMemberTasksByTaskId(vars: GetMemberTasksByTaskIdVariables): QueryPromise; + +interface GetMemberTasksByTaskIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetMemberTasksByTaskIdVariables): QueryRef; +} +export const getMemberTasksByTaskIdRef: GetMemberTasksByTaskIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getMemberTasksByTaskId(dc: DataConnect, vars: GetMemberTasksByTaskIdVariables): QueryPromise; + +interface GetMemberTasksByTaskIdRef { + ... + (dc: DataConnect, vars: GetMemberTasksByTaskIdVariables): QueryRef; +} +export const getMemberTasksByTaskIdRef: GetMemberTasksByTaskIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getMemberTasksByTaskIdRef: +```typescript +const name = getMemberTasksByTaskIdRef.operationName; +console.log(name); +``` + +### Variables +The `getMemberTasksByTaskId` query requires an argument of type `GetMemberTasksByTaskIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetMemberTasksByTaskIdVariables { + taskId: UUIDString; +} +``` +### Return Type +Recall that executing the `getMemberTasksByTaskId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetMemberTasksByTaskIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetMemberTasksByTaskIdData { + memberTasks: ({ + id: UUIDString; + task: { + id: UUIDString; + taskName: string; + description?: string | null; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + priority: TaskPriority; + } & Task_Key; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + })[]; +} +``` +### Using `getMemberTasksByTaskId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getMemberTasksByTaskId, GetMemberTasksByTaskIdVariables } from '@dataconnect/generated'; + +// The `getMemberTasksByTaskId` query requires an argument of type `GetMemberTasksByTaskIdVariables`: +const getMemberTasksByTaskIdVars: GetMemberTasksByTaskIdVariables = { + taskId: ..., +}; + +// Call the `getMemberTasksByTaskId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getMemberTasksByTaskId(getMemberTasksByTaskIdVars); +// Variables can be defined inline as well. +const { data } = await getMemberTasksByTaskId({ taskId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getMemberTasksByTaskId(dataConnect, getMemberTasksByTaskIdVars); + +console.log(data.memberTasks); + +// Or, you can use the `Promise` API. +getMemberTasksByTaskId(getMemberTasksByTaskIdVars).then((response) => { + const data = response.data; + console.log(data.memberTasks); +}); +``` + +### Using `getMemberTasksByTaskId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getMemberTasksByTaskIdRef, GetMemberTasksByTaskIdVariables } from '@dataconnect/generated'; + +// The `getMemberTasksByTaskId` query requires an argument of type `GetMemberTasksByTaskIdVariables`: +const getMemberTasksByTaskIdVars: GetMemberTasksByTaskIdVariables = { + taskId: ..., +}; + +// Call the `getMemberTasksByTaskIdRef()` function to get a reference to the query. +const ref = getMemberTasksByTaskIdRef(getMemberTasksByTaskIdVars); +// Variables can be defined inline as well. +const ref = getMemberTasksByTaskIdRef({ taskId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getMemberTasksByTaskIdRef(dataConnect, getMemberTasksByTaskIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.memberTasks); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.memberTasks); +}); +``` + +## listCertificates +You can execute the `listCertificates` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listCertificates(): QueryPromise; + +interface ListCertificatesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listCertificatesRef: ListCertificatesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listCertificates(dc: DataConnect): QueryPromise; + +interface ListCertificatesRef { + ... + (dc: DataConnect): QueryRef; +} +export const listCertificatesRef: ListCertificatesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listCertificatesRef: +```typescript +const name = listCertificatesRef.operationName; +console.log(name); +``` + +### Variables +The `listCertificates` query has no variables. +### Return Type +Recall that executing the `listCertificates` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListCertificatesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListCertificatesData { + certificates: ({ + id: UUIDString; + name: string; + description?: string | null; + expiry?: TimestampString | null; + status: CertificateStatus; + fileUrl?: string | null; + icon?: string | null; + staffId: UUIDString; + certificationType?: ComplianceType | null; + issuer?: string | null; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; + createdAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Certificate_Key)[]; +} +``` +### Using `listCertificates`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listCertificates } from '@dataconnect/generated'; + + +// Call the `listCertificates()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listCertificates(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listCertificates(dataConnect); + +console.log(data.certificates); + +// Or, you can use the `Promise` API. +listCertificates().then((response) => { + const data = response.data; + console.log(data.certificates); +}); +``` + +### Using `listCertificates`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listCertificatesRef } from '@dataconnect/generated'; + + +// Call the `listCertificatesRef()` function to get a reference to the query. +const ref = listCertificatesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listCertificatesRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.certificates); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.certificates); +}); +``` + +## getCertificateById +You can execute the `getCertificateById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getCertificateById(vars: GetCertificateByIdVariables): QueryPromise; + +interface GetCertificateByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetCertificateByIdVariables): QueryRef; +} +export const getCertificateByIdRef: GetCertificateByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getCertificateById(dc: DataConnect, vars: GetCertificateByIdVariables): QueryPromise; + +interface GetCertificateByIdRef { + ... + (dc: DataConnect, vars: GetCertificateByIdVariables): QueryRef; +} +export const getCertificateByIdRef: GetCertificateByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getCertificateByIdRef: +```typescript +const name = getCertificateByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getCertificateById` query requires an argument of type `GetCertificateByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetCertificateByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getCertificateById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetCertificateByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetCertificateByIdData { + certificate?: { + id: UUIDString; + name: string; + description?: string | null; + expiry?: TimestampString | null; + status: CertificateStatus; + fileUrl?: string | null; + icon?: string | null; + certificationType?: ComplianceType | null; + issuer?: string | null; + staffId: UUIDString; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; + updatedAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Certificate_Key; +} +``` +### Using `getCertificateById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getCertificateById, GetCertificateByIdVariables } from '@dataconnect/generated'; + +// The `getCertificateById` query requires an argument of type `GetCertificateByIdVariables`: +const getCertificateByIdVars: GetCertificateByIdVariables = { + id: ..., +}; + +// Call the `getCertificateById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getCertificateById(getCertificateByIdVars); +// Variables can be defined inline as well. +const { data } = await getCertificateById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getCertificateById(dataConnect, getCertificateByIdVars); + +console.log(data.certificate); + +// Or, you can use the `Promise` API. +getCertificateById(getCertificateByIdVars).then((response) => { + const data = response.data; + console.log(data.certificate); +}); +``` + +### Using `getCertificateById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getCertificateByIdRef, GetCertificateByIdVariables } from '@dataconnect/generated'; + +// The `getCertificateById` query requires an argument of type `GetCertificateByIdVariables`: +const getCertificateByIdVars: GetCertificateByIdVariables = { + id: ..., +}; + +// Call the `getCertificateByIdRef()` function to get a reference to the query. +const ref = getCertificateByIdRef(getCertificateByIdVars); +// Variables can be defined inline as well. +const ref = getCertificateByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getCertificateByIdRef(dataConnect, getCertificateByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.certificate); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.certificate); +}); +``` + +## listCertificatesByStaffId +You can execute the `listCertificatesByStaffId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listCertificatesByStaffId(vars: ListCertificatesByStaffIdVariables): QueryPromise; + +interface ListCertificatesByStaffIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListCertificatesByStaffIdVariables): QueryRef; +} +export const listCertificatesByStaffIdRef: ListCertificatesByStaffIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listCertificatesByStaffId(dc: DataConnect, vars: ListCertificatesByStaffIdVariables): QueryPromise; + +interface ListCertificatesByStaffIdRef { + ... + (dc: DataConnect, vars: ListCertificatesByStaffIdVariables): QueryRef; +} +export const listCertificatesByStaffIdRef: ListCertificatesByStaffIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listCertificatesByStaffIdRef: +```typescript +const name = listCertificatesByStaffIdRef.operationName; +console.log(name); +``` + +### Variables +The `listCertificatesByStaffId` query requires an argument of type `ListCertificatesByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListCertificatesByStaffIdVariables { + staffId: UUIDString; +} +``` +### Return Type +Recall that executing the `listCertificatesByStaffId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListCertificatesByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListCertificatesByStaffIdData { + certificates: ({ + id: UUIDString; + name: string; + description?: string | null; + expiry?: TimestampString | null; + status: CertificateStatus; + fileUrl?: string | null; + icon?: string | null; + staffId: UUIDString; + certificationType?: ComplianceType | null; + issuer?: string | null; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; + createdAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Certificate_Key)[]; +} +``` +### Using `listCertificatesByStaffId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listCertificatesByStaffId, ListCertificatesByStaffIdVariables } from '@dataconnect/generated'; + +// The `listCertificatesByStaffId` query requires an argument of type `ListCertificatesByStaffIdVariables`: +const listCertificatesByStaffIdVars: ListCertificatesByStaffIdVariables = { + staffId: ..., +}; + +// Call the `listCertificatesByStaffId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listCertificatesByStaffId(listCertificatesByStaffIdVars); +// Variables can be defined inline as well. +const { data } = await listCertificatesByStaffId({ staffId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listCertificatesByStaffId(dataConnect, listCertificatesByStaffIdVars); + +console.log(data.certificates); + +// Or, you can use the `Promise` API. +listCertificatesByStaffId(listCertificatesByStaffIdVars).then((response) => { + const data = response.data; + console.log(data.certificates); +}); +``` + +### Using `listCertificatesByStaffId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listCertificatesByStaffIdRef, ListCertificatesByStaffIdVariables } from '@dataconnect/generated'; + +// The `listCertificatesByStaffId` query requires an argument of type `ListCertificatesByStaffIdVariables`: +const listCertificatesByStaffIdVars: ListCertificatesByStaffIdVariables = { + staffId: ..., +}; + +// Call the `listCertificatesByStaffIdRef()` function to get a reference to the query. +const ref = listCertificatesByStaffIdRef(listCertificatesByStaffIdVars); +// Variables can be defined inline as well. +const ref = listCertificatesByStaffIdRef({ staffId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listCertificatesByStaffIdRef(dataConnect, listCertificatesByStaffIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.certificates); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.certificates); +}); +``` + +## listAssignments +You can execute the `listAssignments` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listAssignments(vars?: ListAssignmentsVariables): QueryPromise; + +interface ListAssignmentsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListAssignmentsVariables): QueryRef; +} +export const listAssignmentsRef: ListAssignmentsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listAssignments(dc: DataConnect, vars?: ListAssignmentsVariables): QueryPromise; + +interface ListAssignmentsRef { + ... + (dc: DataConnect, vars?: ListAssignmentsVariables): QueryRef; +} +export const listAssignmentsRef: ListAssignmentsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listAssignmentsRef: +```typescript +const name = listAssignmentsRef.operationName; +console.log(name); +``` + +### Variables +The `listAssignments` query has an optional argument of type `ListAssignmentsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListAssignmentsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listAssignments` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListAssignmentsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListAssignmentsData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + }; + } & Assignment_Key)[]; +} +``` +### Using `listAssignments`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listAssignments, ListAssignmentsVariables } from '@dataconnect/generated'; + +// The `listAssignments` query has an optional argument of type `ListAssignmentsVariables`: +const listAssignmentsVars: ListAssignmentsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listAssignments()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listAssignments(listAssignmentsVars); +// Variables can be defined inline as well. +const { data } = await listAssignments({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListAssignmentsVariables` argument. +const { data } = await listAssignments(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listAssignments(dataConnect, listAssignmentsVars); + +console.log(data.assignments); + +// Or, you can use the `Promise` API. +listAssignments(listAssignmentsVars).then((response) => { + const data = response.data; + console.log(data.assignments); +}); +``` + +### Using `listAssignments`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listAssignmentsRef, ListAssignmentsVariables } from '@dataconnect/generated'; + +// The `listAssignments` query has an optional argument of type `ListAssignmentsVariables`: +const listAssignmentsVars: ListAssignmentsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listAssignmentsRef()` function to get a reference to the query. +const ref = listAssignmentsRef(listAssignmentsVars); +// Variables can be defined inline as well. +const ref = listAssignmentsRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListAssignmentsVariables` argument. +const ref = listAssignmentsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listAssignmentsRef(dataConnect, listAssignmentsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.assignments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.assignments); +}); +``` + +## getAssignmentById +You can execute the `getAssignmentById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getAssignmentById(vars: GetAssignmentByIdVariables): QueryPromise; + +interface GetAssignmentByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetAssignmentByIdVariables): QueryRef; +} +export const getAssignmentByIdRef: GetAssignmentByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getAssignmentById(dc: DataConnect, vars: GetAssignmentByIdVariables): QueryPromise; + +interface GetAssignmentByIdRef { + ... + (dc: DataConnect, vars: GetAssignmentByIdVariables): QueryRef; +} +export const getAssignmentByIdRef: GetAssignmentByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getAssignmentByIdRef: +```typescript +const name = getAssignmentByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getAssignmentById` query requires an argument of type `GetAssignmentByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetAssignmentByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getAssignmentById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetAssignmentByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetAssignmentByIdData { + assignment?: { + id: UUIDString; + title?: string | null; + description?: string | null; + instructions?: string | null; + status?: AssignmentStatus | null; + tipsAvailable?: boolean | null; + travelTime?: boolean | null; + mealProvided?: boolean | null; + parkingAvailable?: boolean | null; + gasCompensation?: boolean | null; + managers?: unknown[] | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + workforce: { + id: UUIDString; + workforceNumber: string; + status?: WorkforceStatus | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + breakType?: BreakDuration | null; + uniform?: string | null; + department?: string | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + status?: ShiftStatus | null; + managers?: unknown[] | null; + order: { + id: UUIDString; + eventName?: string | null; + orderType: OrderType; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + }; + } & Assignment_Key; +} +``` +### Using `getAssignmentById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getAssignmentById, GetAssignmentByIdVariables } from '@dataconnect/generated'; + +// The `getAssignmentById` query requires an argument of type `GetAssignmentByIdVariables`: +const getAssignmentByIdVars: GetAssignmentByIdVariables = { + id: ..., +}; + +// Call the `getAssignmentById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getAssignmentById(getAssignmentByIdVars); +// Variables can be defined inline as well. +const { data } = await getAssignmentById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getAssignmentById(dataConnect, getAssignmentByIdVars); + +console.log(data.assignment); + +// Or, you can use the `Promise` API. +getAssignmentById(getAssignmentByIdVars).then((response) => { + const data = response.data; + console.log(data.assignment); +}); +``` + +### Using `getAssignmentById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getAssignmentByIdRef, GetAssignmentByIdVariables } from '@dataconnect/generated'; + +// The `getAssignmentById` query requires an argument of type `GetAssignmentByIdVariables`: +const getAssignmentByIdVars: GetAssignmentByIdVariables = { + id: ..., +}; + +// Call the `getAssignmentByIdRef()` function to get a reference to the query. +const ref = getAssignmentByIdRef(getAssignmentByIdVars); +// Variables can be defined inline as well. +const ref = getAssignmentByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getAssignmentByIdRef(dataConnect, getAssignmentByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.assignment); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.assignment); +}); +``` + +## listAssignmentsByWorkforceId +You can execute the `listAssignmentsByWorkforceId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listAssignmentsByWorkforceId(vars: ListAssignmentsByWorkforceIdVariables): QueryPromise; + +interface ListAssignmentsByWorkforceIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListAssignmentsByWorkforceIdVariables): QueryRef; +} +export const listAssignmentsByWorkforceIdRef: ListAssignmentsByWorkforceIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listAssignmentsByWorkforceId(dc: DataConnect, vars: ListAssignmentsByWorkforceIdVariables): QueryPromise; + +interface ListAssignmentsByWorkforceIdRef { + ... + (dc: DataConnect, vars: ListAssignmentsByWorkforceIdVariables): QueryRef; +} +export const listAssignmentsByWorkforceIdRef: ListAssignmentsByWorkforceIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listAssignmentsByWorkforceIdRef: +```typescript +const name = listAssignmentsByWorkforceIdRef.operationName; +console.log(name); +``` + +### Variables +The `listAssignmentsByWorkforceId` query requires an argument of type `ListAssignmentsByWorkforceIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListAssignmentsByWorkforceIdVariables { + workforceId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listAssignmentsByWorkforceId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListAssignmentsByWorkforceIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListAssignmentsByWorkforceIdData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + }; + } & Assignment_Key)[]; +} +``` +### Using `listAssignmentsByWorkforceId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listAssignmentsByWorkforceId, ListAssignmentsByWorkforceIdVariables } from '@dataconnect/generated'; + +// The `listAssignmentsByWorkforceId` query requires an argument of type `ListAssignmentsByWorkforceIdVariables`: +const listAssignmentsByWorkforceIdVars: ListAssignmentsByWorkforceIdVariables = { + workforceId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listAssignmentsByWorkforceId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listAssignmentsByWorkforceId(listAssignmentsByWorkforceIdVars); +// Variables can be defined inline as well. +const { data } = await listAssignmentsByWorkforceId({ workforceId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listAssignmentsByWorkforceId(dataConnect, listAssignmentsByWorkforceIdVars); + +console.log(data.assignments); + +// Or, you can use the `Promise` API. +listAssignmentsByWorkforceId(listAssignmentsByWorkforceIdVars).then((response) => { + const data = response.data; + console.log(data.assignments); +}); +``` + +### Using `listAssignmentsByWorkforceId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listAssignmentsByWorkforceIdRef, ListAssignmentsByWorkforceIdVariables } from '@dataconnect/generated'; + +// The `listAssignmentsByWorkforceId` query requires an argument of type `ListAssignmentsByWorkforceIdVariables`: +const listAssignmentsByWorkforceIdVars: ListAssignmentsByWorkforceIdVariables = { + workforceId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listAssignmentsByWorkforceIdRef()` function to get a reference to the query. +const ref = listAssignmentsByWorkforceIdRef(listAssignmentsByWorkforceIdVars); +// Variables can be defined inline as well. +const ref = listAssignmentsByWorkforceIdRef({ workforceId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listAssignmentsByWorkforceIdRef(dataConnect, listAssignmentsByWorkforceIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.assignments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.assignments); +}); +``` + +## listAssignmentsByWorkforceIds +You can execute the `listAssignmentsByWorkforceIds` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listAssignmentsByWorkforceIds(vars: ListAssignmentsByWorkforceIdsVariables): QueryPromise; + +interface ListAssignmentsByWorkforceIdsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListAssignmentsByWorkforceIdsVariables): QueryRef; +} +export const listAssignmentsByWorkforceIdsRef: ListAssignmentsByWorkforceIdsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listAssignmentsByWorkforceIds(dc: DataConnect, vars: ListAssignmentsByWorkforceIdsVariables): QueryPromise; + +interface ListAssignmentsByWorkforceIdsRef { + ... + (dc: DataConnect, vars: ListAssignmentsByWorkforceIdsVariables): QueryRef; +} +export const listAssignmentsByWorkforceIdsRef: ListAssignmentsByWorkforceIdsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listAssignmentsByWorkforceIdsRef: +```typescript +const name = listAssignmentsByWorkforceIdsRef.operationName; +console.log(name); +``` + +### Variables +The `listAssignmentsByWorkforceIds` query requires an argument of type `ListAssignmentsByWorkforceIdsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListAssignmentsByWorkforceIdsVariables { + workforceIds: UUIDString[]; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listAssignmentsByWorkforceIds` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListAssignmentsByWorkforceIdsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListAssignmentsByWorkforceIdsData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + role: { + id: UUIDString; + name: string; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + order: { + id: UUIDString; + eventName?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + }; + } & Assignment_Key)[]; +} +``` +### Using `listAssignmentsByWorkforceIds`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listAssignmentsByWorkforceIds, ListAssignmentsByWorkforceIdsVariables } from '@dataconnect/generated'; + +// The `listAssignmentsByWorkforceIds` query requires an argument of type `ListAssignmentsByWorkforceIdsVariables`: +const listAssignmentsByWorkforceIdsVars: ListAssignmentsByWorkforceIdsVariables = { + workforceIds: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listAssignmentsByWorkforceIds()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listAssignmentsByWorkforceIds(listAssignmentsByWorkforceIdsVars); +// Variables can be defined inline as well. +const { data } = await listAssignmentsByWorkforceIds({ workforceIds: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listAssignmentsByWorkforceIds(dataConnect, listAssignmentsByWorkforceIdsVars); + +console.log(data.assignments); + +// Or, you can use the `Promise` API. +listAssignmentsByWorkforceIds(listAssignmentsByWorkforceIdsVars).then((response) => { + const data = response.data; + console.log(data.assignments); +}); +``` + +### Using `listAssignmentsByWorkforceIds`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listAssignmentsByWorkforceIdsRef, ListAssignmentsByWorkforceIdsVariables } from '@dataconnect/generated'; + +// The `listAssignmentsByWorkforceIds` query requires an argument of type `ListAssignmentsByWorkforceIdsVariables`: +const listAssignmentsByWorkforceIdsVars: ListAssignmentsByWorkforceIdsVariables = { + workforceIds: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listAssignmentsByWorkforceIdsRef()` function to get a reference to the query. +const ref = listAssignmentsByWorkforceIdsRef(listAssignmentsByWorkforceIdsVars); +// Variables can be defined inline as well. +const ref = listAssignmentsByWorkforceIdsRef({ workforceIds: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listAssignmentsByWorkforceIdsRef(dataConnect, listAssignmentsByWorkforceIdsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.assignments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.assignments); +}); +``` + +## listAssignmentsByShiftRole +You can execute the `listAssignmentsByShiftRole` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listAssignmentsByShiftRole(vars: ListAssignmentsByShiftRoleVariables): QueryPromise; + +interface ListAssignmentsByShiftRoleRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListAssignmentsByShiftRoleVariables): QueryRef; +} +export const listAssignmentsByShiftRoleRef: ListAssignmentsByShiftRoleRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listAssignmentsByShiftRole(dc: DataConnect, vars: ListAssignmentsByShiftRoleVariables): QueryPromise; + +interface ListAssignmentsByShiftRoleRef { + ... + (dc: DataConnect, vars: ListAssignmentsByShiftRoleVariables): QueryRef; +} +export const listAssignmentsByShiftRoleRef: ListAssignmentsByShiftRoleRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listAssignmentsByShiftRoleRef: +```typescript +const name = listAssignmentsByShiftRoleRef.operationName; +console.log(name); +``` + +### Variables +The `listAssignmentsByShiftRole` query requires an argument of type `ListAssignmentsByShiftRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListAssignmentsByShiftRoleVariables { + shiftId: UUIDString; + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listAssignmentsByShiftRole` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListAssignmentsByShiftRoleData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListAssignmentsByShiftRoleData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + } & Assignment_Key)[]; +} +``` +### Using `listAssignmentsByShiftRole`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listAssignmentsByShiftRole, ListAssignmentsByShiftRoleVariables } from '@dataconnect/generated'; + +// The `listAssignmentsByShiftRole` query requires an argument of type `ListAssignmentsByShiftRoleVariables`: +const listAssignmentsByShiftRoleVars: ListAssignmentsByShiftRoleVariables = { + shiftId: ..., + roleId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listAssignmentsByShiftRole()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listAssignmentsByShiftRole(listAssignmentsByShiftRoleVars); +// Variables can be defined inline as well. +const { data } = await listAssignmentsByShiftRole({ shiftId: ..., roleId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listAssignmentsByShiftRole(dataConnect, listAssignmentsByShiftRoleVars); + +console.log(data.assignments); + +// Or, you can use the `Promise` API. +listAssignmentsByShiftRole(listAssignmentsByShiftRoleVars).then((response) => { + const data = response.data; + console.log(data.assignments); +}); +``` + +### Using `listAssignmentsByShiftRole`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listAssignmentsByShiftRoleRef, ListAssignmentsByShiftRoleVariables } from '@dataconnect/generated'; + +// The `listAssignmentsByShiftRole` query requires an argument of type `ListAssignmentsByShiftRoleVariables`: +const listAssignmentsByShiftRoleVars: ListAssignmentsByShiftRoleVariables = { + shiftId: ..., + roleId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listAssignmentsByShiftRoleRef()` function to get a reference to the query. +const ref = listAssignmentsByShiftRoleRef(listAssignmentsByShiftRoleVars); +// Variables can be defined inline as well. +const ref = listAssignmentsByShiftRoleRef({ shiftId: ..., roleId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listAssignmentsByShiftRoleRef(dataConnect, listAssignmentsByShiftRoleVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.assignments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.assignments); +}); +``` + +## filterAssignments +You can execute the `filterAssignments` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterAssignments(vars: FilterAssignmentsVariables): QueryPromise; + +interface FilterAssignmentsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: FilterAssignmentsVariables): QueryRef; +} +export const filterAssignmentsRef: FilterAssignmentsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterAssignments(dc: DataConnect, vars: FilterAssignmentsVariables): QueryPromise; + +interface FilterAssignmentsRef { + ... + (dc: DataConnect, vars: FilterAssignmentsVariables): QueryRef; +} +export const filterAssignmentsRef: FilterAssignmentsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterAssignmentsRef: +```typescript +const name = filterAssignmentsRef.operationName; +console.log(name); +``` + +### Variables +The `filterAssignments` query requires an argument of type `FilterAssignmentsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterAssignmentsVariables { + shiftIds: UUIDString[]; + roleIds: UUIDString[]; + status?: AssignmentStatus | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `filterAssignments` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterAssignmentsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterAssignmentsData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + role: { + id: UUIDString; + name: string; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + } & Shift_Key; + }; + } & Assignment_Key)[]; +} +``` +### Using `filterAssignments`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterAssignments, FilterAssignmentsVariables } from '@dataconnect/generated'; + +// The `filterAssignments` query requires an argument of type `FilterAssignmentsVariables`: +const filterAssignmentsVars: FilterAssignmentsVariables = { + shiftIds: ..., + roleIds: ..., + status: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterAssignments()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterAssignments(filterAssignmentsVars); +// Variables can be defined inline as well. +const { data } = await filterAssignments({ shiftIds: ..., roleIds: ..., status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterAssignments(dataConnect, filterAssignmentsVars); + +console.log(data.assignments); + +// Or, you can use the `Promise` API. +filterAssignments(filterAssignmentsVars).then((response) => { + const data = response.data; + console.log(data.assignments); +}); +``` + +### Using `filterAssignments`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterAssignmentsRef, FilterAssignmentsVariables } from '@dataconnect/generated'; + +// The `filterAssignments` query requires an argument of type `FilterAssignmentsVariables`: +const filterAssignmentsVars: FilterAssignmentsVariables = { + shiftIds: ..., + roleIds: ..., + status: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterAssignmentsRef()` function to get a reference to the query. +const ref = filterAssignmentsRef(filterAssignmentsVars); +// Variables can be defined inline as well. +const ref = filterAssignmentsRef({ shiftIds: ..., roleIds: ..., status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterAssignmentsRef(dataConnect, filterAssignmentsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.assignments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.assignments); +}); +``` + +## listInvoiceTemplates +You can execute the `listInvoiceTemplates` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listInvoiceTemplates(vars?: ListInvoiceTemplatesVariables): QueryPromise; + +interface ListInvoiceTemplatesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListInvoiceTemplatesVariables): QueryRef; +} +export const listInvoiceTemplatesRef: ListInvoiceTemplatesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listInvoiceTemplates(dc: DataConnect, vars?: ListInvoiceTemplatesVariables): QueryPromise; + +interface ListInvoiceTemplatesRef { + ... + (dc: DataConnect, vars?: ListInvoiceTemplatesVariables): QueryRef; +} +export const listInvoiceTemplatesRef: ListInvoiceTemplatesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listInvoiceTemplatesRef: +```typescript +const name = listInvoiceTemplatesRef.operationName; +console.log(name); +``` + +### Variables +The `listInvoiceTemplates` query has an optional argument of type `ListInvoiceTemplatesVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListInvoiceTemplatesVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listInvoiceTemplates` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListInvoiceTemplatesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListInvoiceTemplatesData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} +``` +### Using `listInvoiceTemplates`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listInvoiceTemplates, ListInvoiceTemplatesVariables } from '@dataconnect/generated'; + +// The `listInvoiceTemplates` query has an optional argument of type `ListInvoiceTemplatesVariables`: +const listInvoiceTemplatesVars: ListInvoiceTemplatesVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoiceTemplates()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listInvoiceTemplates(listInvoiceTemplatesVars); +// Variables can be defined inline as well. +const { data } = await listInvoiceTemplates({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListInvoiceTemplatesVariables` argument. +const { data } = await listInvoiceTemplates(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listInvoiceTemplates(dataConnect, listInvoiceTemplatesVars); + +console.log(data.invoiceTemplates); + +// Or, you can use the `Promise` API. +listInvoiceTemplates(listInvoiceTemplatesVars).then((response) => { + const data = response.data; + console.log(data.invoiceTemplates); +}); +``` + +### Using `listInvoiceTemplates`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listInvoiceTemplatesRef, ListInvoiceTemplatesVariables } from '@dataconnect/generated'; + +// The `listInvoiceTemplates` query has an optional argument of type `ListInvoiceTemplatesVariables`: +const listInvoiceTemplatesVars: ListInvoiceTemplatesVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoiceTemplatesRef()` function to get a reference to the query. +const ref = listInvoiceTemplatesRef(listInvoiceTemplatesVars); +// Variables can be defined inline as well. +const ref = listInvoiceTemplatesRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListInvoiceTemplatesVariables` argument. +const ref = listInvoiceTemplatesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listInvoiceTemplatesRef(dataConnect, listInvoiceTemplatesVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoiceTemplates); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoiceTemplates); +}); +``` + +## getInvoiceTemplateById +You can execute the `getInvoiceTemplateById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getInvoiceTemplateById(vars: GetInvoiceTemplateByIdVariables): QueryPromise; + +interface GetInvoiceTemplateByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetInvoiceTemplateByIdVariables): QueryRef; +} +export const getInvoiceTemplateByIdRef: GetInvoiceTemplateByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getInvoiceTemplateById(dc: DataConnect, vars: GetInvoiceTemplateByIdVariables): QueryPromise; + +interface GetInvoiceTemplateByIdRef { + ... + (dc: DataConnect, vars: GetInvoiceTemplateByIdVariables): QueryRef; +} +export const getInvoiceTemplateByIdRef: GetInvoiceTemplateByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getInvoiceTemplateByIdRef: +```typescript +const name = getInvoiceTemplateByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getInvoiceTemplateById` query requires an argument of type `GetInvoiceTemplateByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetInvoiceTemplateByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getInvoiceTemplateById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetInvoiceTemplateByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetInvoiceTemplateByIdData { + invoiceTemplate?: { + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key; +} +``` +### Using `getInvoiceTemplateById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getInvoiceTemplateById, GetInvoiceTemplateByIdVariables } from '@dataconnect/generated'; + +// The `getInvoiceTemplateById` query requires an argument of type `GetInvoiceTemplateByIdVariables`: +const getInvoiceTemplateByIdVars: GetInvoiceTemplateByIdVariables = { + id: ..., +}; + +// Call the `getInvoiceTemplateById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getInvoiceTemplateById(getInvoiceTemplateByIdVars); +// Variables can be defined inline as well. +const { data } = await getInvoiceTemplateById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getInvoiceTemplateById(dataConnect, getInvoiceTemplateByIdVars); + +console.log(data.invoiceTemplate); + +// Or, you can use the `Promise` API. +getInvoiceTemplateById(getInvoiceTemplateByIdVars).then((response) => { + const data = response.data; + console.log(data.invoiceTemplate); +}); +``` + +### Using `getInvoiceTemplateById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getInvoiceTemplateByIdRef, GetInvoiceTemplateByIdVariables } from '@dataconnect/generated'; + +// The `getInvoiceTemplateById` query requires an argument of type `GetInvoiceTemplateByIdVariables`: +const getInvoiceTemplateByIdVars: GetInvoiceTemplateByIdVariables = { + id: ..., +}; + +// Call the `getInvoiceTemplateByIdRef()` function to get a reference to the query. +const ref = getInvoiceTemplateByIdRef(getInvoiceTemplateByIdVars); +// Variables can be defined inline as well. +const ref = getInvoiceTemplateByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getInvoiceTemplateByIdRef(dataConnect, getInvoiceTemplateByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoiceTemplate); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoiceTemplate); +}); +``` + +## listInvoiceTemplatesByOwnerId +You can execute the `listInvoiceTemplatesByOwnerId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listInvoiceTemplatesByOwnerId(vars: ListInvoiceTemplatesByOwnerIdVariables): QueryPromise; + +interface ListInvoiceTemplatesByOwnerIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoiceTemplatesByOwnerIdVariables): QueryRef; +} +export const listInvoiceTemplatesByOwnerIdRef: ListInvoiceTemplatesByOwnerIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listInvoiceTemplatesByOwnerId(dc: DataConnect, vars: ListInvoiceTemplatesByOwnerIdVariables): QueryPromise; + +interface ListInvoiceTemplatesByOwnerIdRef { + ... + (dc: DataConnect, vars: ListInvoiceTemplatesByOwnerIdVariables): QueryRef; +} +export const listInvoiceTemplatesByOwnerIdRef: ListInvoiceTemplatesByOwnerIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listInvoiceTemplatesByOwnerIdRef: +```typescript +const name = listInvoiceTemplatesByOwnerIdRef.operationName; +console.log(name); +``` + +### Variables +The `listInvoiceTemplatesByOwnerId` query requires an argument of type `ListInvoiceTemplatesByOwnerIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListInvoiceTemplatesByOwnerIdVariables { + ownerId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listInvoiceTemplatesByOwnerId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListInvoiceTemplatesByOwnerIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListInvoiceTemplatesByOwnerIdData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} +``` +### Using `listInvoiceTemplatesByOwnerId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listInvoiceTemplatesByOwnerId, ListInvoiceTemplatesByOwnerIdVariables } from '@dataconnect/generated'; + +// The `listInvoiceTemplatesByOwnerId` query requires an argument of type `ListInvoiceTemplatesByOwnerIdVariables`: +const listInvoiceTemplatesByOwnerIdVars: ListInvoiceTemplatesByOwnerIdVariables = { + ownerId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoiceTemplatesByOwnerId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listInvoiceTemplatesByOwnerId(listInvoiceTemplatesByOwnerIdVars); +// Variables can be defined inline as well. +const { data } = await listInvoiceTemplatesByOwnerId({ ownerId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listInvoiceTemplatesByOwnerId(dataConnect, listInvoiceTemplatesByOwnerIdVars); + +console.log(data.invoiceTemplates); + +// Or, you can use the `Promise` API. +listInvoiceTemplatesByOwnerId(listInvoiceTemplatesByOwnerIdVars).then((response) => { + const data = response.data; + console.log(data.invoiceTemplates); +}); +``` + +### Using `listInvoiceTemplatesByOwnerId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listInvoiceTemplatesByOwnerIdRef, ListInvoiceTemplatesByOwnerIdVariables } from '@dataconnect/generated'; + +// The `listInvoiceTemplatesByOwnerId` query requires an argument of type `ListInvoiceTemplatesByOwnerIdVariables`: +const listInvoiceTemplatesByOwnerIdVars: ListInvoiceTemplatesByOwnerIdVariables = { + ownerId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoiceTemplatesByOwnerIdRef()` function to get a reference to the query. +const ref = listInvoiceTemplatesByOwnerIdRef(listInvoiceTemplatesByOwnerIdVars); +// Variables can be defined inline as well. +const ref = listInvoiceTemplatesByOwnerIdRef({ ownerId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listInvoiceTemplatesByOwnerIdRef(dataConnect, listInvoiceTemplatesByOwnerIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoiceTemplates); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoiceTemplates); +}); +``` + +## listInvoiceTemplatesByVendorId +You can execute the `listInvoiceTemplatesByVendorId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listInvoiceTemplatesByVendorId(vars: ListInvoiceTemplatesByVendorIdVariables): QueryPromise; + +interface ListInvoiceTemplatesByVendorIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoiceTemplatesByVendorIdVariables): QueryRef; +} +export const listInvoiceTemplatesByVendorIdRef: ListInvoiceTemplatesByVendorIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listInvoiceTemplatesByVendorId(dc: DataConnect, vars: ListInvoiceTemplatesByVendorIdVariables): QueryPromise; + +interface ListInvoiceTemplatesByVendorIdRef { + ... + (dc: DataConnect, vars: ListInvoiceTemplatesByVendorIdVariables): QueryRef; +} +export const listInvoiceTemplatesByVendorIdRef: ListInvoiceTemplatesByVendorIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listInvoiceTemplatesByVendorIdRef: +```typescript +const name = listInvoiceTemplatesByVendorIdRef.operationName; +console.log(name); +``` + +### Variables +The `listInvoiceTemplatesByVendorId` query requires an argument of type `ListInvoiceTemplatesByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListInvoiceTemplatesByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listInvoiceTemplatesByVendorId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListInvoiceTemplatesByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListInvoiceTemplatesByVendorIdData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} +``` +### Using `listInvoiceTemplatesByVendorId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listInvoiceTemplatesByVendorId, ListInvoiceTemplatesByVendorIdVariables } from '@dataconnect/generated'; + +// The `listInvoiceTemplatesByVendorId` query requires an argument of type `ListInvoiceTemplatesByVendorIdVariables`: +const listInvoiceTemplatesByVendorIdVars: ListInvoiceTemplatesByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoiceTemplatesByVendorId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listInvoiceTemplatesByVendorId(listInvoiceTemplatesByVendorIdVars); +// Variables can be defined inline as well. +const { data } = await listInvoiceTemplatesByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listInvoiceTemplatesByVendorId(dataConnect, listInvoiceTemplatesByVendorIdVars); + +console.log(data.invoiceTemplates); + +// Or, you can use the `Promise` API. +listInvoiceTemplatesByVendorId(listInvoiceTemplatesByVendorIdVars).then((response) => { + const data = response.data; + console.log(data.invoiceTemplates); +}); +``` + +### Using `listInvoiceTemplatesByVendorId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listInvoiceTemplatesByVendorIdRef, ListInvoiceTemplatesByVendorIdVariables } from '@dataconnect/generated'; + +// The `listInvoiceTemplatesByVendorId` query requires an argument of type `ListInvoiceTemplatesByVendorIdVariables`: +const listInvoiceTemplatesByVendorIdVars: ListInvoiceTemplatesByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoiceTemplatesByVendorIdRef()` function to get a reference to the query. +const ref = listInvoiceTemplatesByVendorIdRef(listInvoiceTemplatesByVendorIdVars); +// Variables can be defined inline as well. +const ref = listInvoiceTemplatesByVendorIdRef({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listInvoiceTemplatesByVendorIdRef(dataConnect, listInvoiceTemplatesByVendorIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoiceTemplates); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoiceTemplates); +}); +``` + +## listInvoiceTemplatesByBusinessId +You can execute the `listInvoiceTemplatesByBusinessId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listInvoiceTemplatesByBusinessId(vars: ListInvoiceTemplatesByBusinessIdVariables): QueryPromise; + +interface ListInvoiceTemplatesByBusinessIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoiceTemplatesByBusinessIdVariables): QueryRef; +} +export const listInvoiceTemplatesByBusinessIdRef: ListInvoiceTemplatesByBusinessIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listInvoiceTemplatesByBusinessId(dc: DataConnect, vars: ListInvoiceTemplatesByBusinessIdVariables): QueryPromise; + +interface ListInvoiceTemplatesByBusinessIdRef { + ... + (dc: DataConnect, vars: ListInvoiceTemplatesByBusinessIdVariables): QueryRef; +} +export const listInvoiceTemplatesByBusinessIdRef: ListInvoiceTemplatesByBusinessIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listInvoiceTemplatesByBusinessIdRef: +```typescript +const name = listInvoiceTemplatesByBusinessIdRef.operationName; +console.log(name); +``` + +### Variables +The `listInvoiceTemplatesByBusinessId` query requires an argument of type `ListInvoiceTemplatesByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListInvoiceTemplatesByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listInvoiceTemplatesByBusinessId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListInvoiceTemplatesByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListInvoiceTemplatesByBusinessIdData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} +``` +### Using `listInvoiceTemplatesByBusinessId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listInvoiceTemplatesByBusinessId, ListInvoiceTemplatesByBusinessIdVariables } from '@dataconnect/generated'; + +// The `listInvoiceTemplatesByBusinessId` query requires an argument of type `ListInvoiceTemplatesByBusinessIdVariables`: +const listInvoiceTemplatesByBusinessIdVars: ListInvoiceTemplatesByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoiceTemplatesByBusinessId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listInvoiceTemplatesByBusinessId(listInvoiceTemplatesByBusinessIdVars); +// Variables can be defined inline as well. +const { data } = await listInvoiceTemplatesByBusinessId({ businessId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listInvoiceTemplatesByBusinessId(dataConnect, listInvoiceTemplatesByBusinessIdVars); + +console.log(data.invoiceTemplates); + +// Or, you can use the `Promise` API. +listInvoiceTemplatesByBusinessId(listInvoiceTemplatesByBusinessIdVars).then((response) => { + const data = response.data; + console.log(data.invoiceTemplates); +}); +``` + +### Using `listInvoiceTemplatesByBusinessId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listInvoiceTemplatesByBusinessIdRef, ListInvoiceTemplatesByBusinessIdVariables } from '@dataconnect/generated'; + +// The `listInvoiceTemplatesByBusinessId` query requires an argument of type `ListInvoiceTemplatesByBusinessIdVariables`: +const listInvoiceTemplatesByBusinessIdVars: ListInvoiceTemplatesByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoiceTemplatesByBusinessIdRef()` function to get a reference to the query. +const ref = listInvoiceTemplatesByBusinessIdRef(listInvoiceTemplatesByBusinessIdVars); +// Variables can be defined inline as well. +const ref = listInvoiceTemplatesByBusinessIdRef({ businessId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listInvoiceTemplatesByBusinessIdRef(dataConnect, listInvoiceTemplatesByBusinessIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoiceTemplates); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoiceTemplates); +}); +``` + +## listInvoiceTemplatesByOrderId +You can execute the `listInvoiceTemplatesByOrderId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listInvoiceTemplatesByOrderId(vars: ListInvoiceTemplatesByOrderIdVariables): QueryPromise; + +interface ListInvoiceTemplatesByOrderIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoiceTemplatesByOrderIdVariables): QueryRef; +} +export const listInvoiceTemplatesByOrderIdRef: ListInvoiceTemplatesByOrderIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listInvoiceTemplatesByOrderId(dc: DataConnect, vars: ListInvoiceTemplatesByOrderIdVariables): QueryPromise; + +interface ListInvoiceTemplatesByOrderIdRef { + ... + (dc: DataConnect, vars: ListInvoiceTemplatesByOrderIdVariables): QueryRef; +} +export const listInvoiceTemplatesByOrderIdRef: ListInvoiceTemplatesByOrderIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listInvoiceTemplatesByOrderIdRef: +```typescript +const name = listInvoiceTemplatesByOrderIdRef.operationName; +console.log(name); +``` + +### Variables +The `listInvoiceTemplatesByOrderId` query requires an argument of type `ListInvoiceTemplatesByOrderIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListInvoiceTemplatesByOrderIdVariables { + orderId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listInvoiceTemplatesByOrderId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListInvoiceTemplatesByOrderIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListInvoiceTemplatesByOrderIdData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} +``` +### Using `listInvoiceTemplatesByOrderId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listInvoiceTemplatesByOrderId, ListInvoiceTemplatesByOrderIdVariables } from '@dataconnect/generated'; + +// The `listInvoiceTemplatesByOrderId` query requires an argument of type `ListInvoiceTemplatesByOrderIdVariables`: +const listInvoiceTemplatesByOrderIdVars: ListInvoiceTemplatesByOrderIdVariables = { + orderId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoiceTemplatesByOrderId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listInvoiceTemplatesByOrderId(listInvoiceTemplatesByOrderIdVars); +// Variables can be defined inline as well. +const { data } = await listInvoiceTemplatesByOrderId({ orderId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listInvoiceTemplatesByOrderId(dataConnect, listInvoiceTemplatesByOrderIdVars); + +console.log(data.invoiceTemplates); + +// Or, you can use the `Promise` API. +listInvoiceTemplatesByOrderId(listInvoiceTemplatesByOrderIdVars).then((response) => { + const data = response.data; + console.log(data.invoiceTemplates); +}); +``` + +### Using `listInvoiceTemplatesByOrderId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listInvoiceTemplatesByOrderIdRef, ListInvoiceTemplatesByOrderIdVariables } from '@dataconnect/generated'; + +// The `listInvoiceTemplatesByOrderId` query requires an argument of type `ListInvoiceTemplatesByOrderIdVariables`: +const listInvoiceTemplatesByOrderIdVars: ListInvoiceTemplatesByOrderIdVariables = { + orderId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoiceTemplatesByOrderIdRef()` function to get a reference to the query. +const ref = listInvoiceTemplatesByOrderIdRef(listInvoiceTemplatesByOrderIdVars); +// Variables can be defined inline as well. +const ref = listInvoiceTemplatesByOrderIdRef({ orderId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listInvoiceTemplatesByOrderIdRef(dataConnect, listInvoiceTemplatesByOrderIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoiceTemplates); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoiceTemplates); +}); +``` + +## searchInvoiceTemplatesByOwnerAndName +You can execute the `searchInvoiceTemplatesByOwnerAndName` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +searchInvoiceTemplatesByOwnerAndName(vars: SearchInvoiceTemplatesByOwnerAndNameVariables): QueryPromise; + +interface SearchInvoiceTemplatesByOwnerAndNameRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: SearchInvoiceTemplatesByOwnerAndNameVariables): QueryRef; +} +export const searchInvoiceTemplatesByOwnerAndNameRef: SearchInvoiceTemplatesByOwnerAndNameRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +searchInvoiceTemplatesByOwnerAndName(dc: DataConnect, vars: SearchInvoiceTemplatesByOwnerAndNameVariables): QueryPromise; + +interface SearchInvoiceTemplatesByOwnerAndNameRef { + ... + (dc: DataConnect, vars: SearchInvoiceTemplatesByOwnerAndNameVariables): QueryRef; +} +export const searchInvoiceTemplatesByOwnerAndNameRef: SearchInvoiceTemplatesByOwnerAndNameRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the searchInvoiceTemplatesByOwnerAndNameRef: +```typescript +const name = searchInvoiceTemplatesByOwnerAndNameRef.operationName; +console.log(name); +``` + +### Variables +The `searchInvoiceTemplatesByOwnerAndName` query requires an argument of type `SearchInvoiceTemplatesByOwnerAndNameVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface SearchInvoiceTemplatesByOwnerAndNameVariables { + ownerId: UUIDString; + name: string; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `searchInvoiceTemplatesByOwnerAndName` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `SearchInvoiceTemplatesByOwnerAndNameData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface SearchInvoiceTemplatesByOwnerAndNameData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} +``` +### Using `searchInvoiceTemplatesByOwnerAndName`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, searchInvoiceTemplatesByOwnerAndName, SearchInvoiceTemplatesByOwnerAndNameVariables } from '@dataconnect/generated'; + +// The `searchInvoiceTemplatesByOwnerAndName` query requires an argument of type `SearchInvoiceTemplatesByOwnerAndNameVariables`: +const searchInvoiceTemplatesByOwnerAndNameVars: SearchInvoiceTemplatesByOwnerAndNameVariables = { + ownerId: ..., + name: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `searchInvoiceTemplatesByOwnerAndName()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await searchInvoiceTemplatesByOwnerAndName(searchInvoiceTemplatesByOwnerAndNameVars); +// Variables can be defined inline as well. +const { data } = await searchInvoiceTemplatesByOwnerAndName({ ownerId: ..., name: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await searchInvoiceTemplatesByOwnerAndName(dataConnect, searchInvoiceTemplatesByOwnerAndNameVars); + +console.log(data.invoiceTemplates); + +// Or, you can use the `Promise` API. +searchInvoiceTemplatesByOwnerAndName(searchInvoiceTemplatesByOwnerAndNameVars).then((response) => { + const data = response.data; + console.log(data.invoiceTemplates); +}); +``` + +### Using `searchInvoiceTemplatesByOwnerAndName`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, searchInvoiceTemplatesByOwnerAndNameRef, SearchInvoiceTemplatesByOwnerAndNameVariables } from '@dataconnect/generated'; + +// The `searchInvoiceTemplatesByOwnerAndName` query requires an argument of type `SearchInvoiceTemplatesByOwnerAndNameVariables`: +const searchInvoiceTemplatesByOwnerAndNameVars: SearchInvoiceTemplatesByOwnerAndNameVariables = { + ownerId: ..., + name: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `searchInvoiceTemplatesByOwnerAndNameRef()` function to get a reference to the query. +const ref = searchInvoiceTemplatesByOwnerAndNameRef(searchInvoiceTemplatesByOwnerAndNameVars); +// Variables can be defined inline as well. +const ref = searchInvoiceTemplatesByOwnerAndNameRef({ ownerId: ..., name: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = searchInvoiceTemplatesByOwnerAndNameRef(dataConnect, searchInvoiceTemplatesByOwnerAndNameVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoiceTemplates); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoiceTemplates); +}); +``` + +## getStaffDocumentByKey +You can execute the `getStaffDocumentByKey` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getStaffDocumentByKey(vars: GetStaffDocumentByKeyVariables): QueryPromise; + +interface GetStaffDocumentByKeyRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffDocumentByKeyVariables): QueryRef; +} +export const getStaffDocumentByKeyRef: GetStaffDocumentByKeyRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getStaffDocumentByKey(dc: DataConnect, vars: GetStaffDocumentByKeyVariables): QueryPromise; + +interface GetStaffDocumentByKeyRef { + ... + (dc: DataConnect, vars: GetStaffDocumentByKeyVariables): QueryRef; +} +export const getStaffDocumentByKeyRef: GetStaffDocumentByKeyRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getStaffDocumentByKeyRef: +```typescript +const name = getStaffDocumentByKeyRef.operationName; +console.log(name); +``` + +### Variables +The `getStaffDocumentByKey` query requires an argument of type `GetStaffDocumentByKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetStaffDocumentByKeyVariables { + staffId: UUIDString; + documentId: UUIDString; +} +``` +### Return Type +Recall that executing the `getStaffDocumentByKey` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetStaffDocumentByKeyData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetStaffDocumentByKeyData { + staffDocument?: { + id: UUIDString; + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + document: { + id: UUIDString; + name: string; + documentType: DocumentType; + description?: string | null; + } & Document_Key; + } & StaffDocument_Key; +} +``` +### Using `getStaffDocumentByKey`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getStaffDocumentByKey, GetStaffDocumentByKeyVariables } from '@dataconnect/generated'; + +// The `getStaffDocumentByKey` query requires an argument of type `GetStaffDocumentByKeyVariables`: +const getStaffDocumentByKeyVars: GetStaffDocumentByKeyVariables = { + staffId: ..., + documentId: ..., +}; + +// Call the `getStaffDocumentByKey()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getStaffDocumentByKey(getStaffDocumentByKeyVars); +// Variables can be defined inline as well. +const { data } = await getStaffDocumentByKey({ staffId: ..., documentId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getStaffDocumentByKey(dataConnect, getStaffDocumentByKeyVars); + +console.log(data.staffDocument); + +// Or, you can use the `Promise` API. +getStaffDocumentByKey(getStaffDocumentByKeyVars).then((response) => { + const data = response.data; + console.log(data.staffDocument); +}); +``` + +### Using `getStaffDocumentByKey`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getStaffDocumentByKeyRef, GetStaffDocumentByKeyVariables } from '@dataconnect/generated'; + +// The `getStaffDocumentByKey` query requires an argument of type `GetStaffDocumentByKeyVariables`: +const getStaffDocumentByKeyVars: GetStaffDocumentByKeyVariables = { + staffId: ..., + documentId: ..., +}; + +// Call the `getStaffDocumentByKeyRef()` function to get a reference to the query. +const ref = getStaffDocumentByKeyRef(getStaffDocumentByKeyVars); +// Variables can be defined inline as well. +const ref = getStaffDocumentByKeyRef({ staffId: ..., documentId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getStaffDocumentByKeyRef(dataConnect, getStaffDocumentByKeyVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffDocument); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffDocument); +}); +``` + +## listStaffDocumentsByStaffId +You can execute the `listStaffDocumentsByStaffId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffDocumentsByStaffId(vars: ListStaffDocumentsByStaffIdVariables): QueryPromise; + +interface ListStaffDocumentsByStaffIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffDocumentsByStaffIdVariables): QueryRef; +} +export const listStaffDocumentsByStaffIdRef: ListStaffDocumentsByStaffIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffDocumentsByStaffId(dc: DataConnect, vars: ListStaffDocumentsByStaffIdVariables): QueryPromise; + +interface ListStaffDocumentsByStaffIdRef { + ... + (dc: DataConnect, vars: ListStaffDocumentsByStaffIdVariables): QueryRef; +} +export const listStaffDocumentsByStaffIdRef: ListStaffDocumentsByStaffIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffDocumentsByStaffIdRef: +```typescript +const name = listStaffDocumentsByStaffIdRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffDocumentsByStaffId` query requires an argument of type `ListStaffDocumentsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffDocumentsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listStaffDocumentsByStaffId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffDocumentsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffDocumentsByStaffIdData { + staffDocuments: ({ + id: UUIDString; + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + document: { + id: UUIDString; + name: string; + documentType: DocumentType; + } & Document_Key; + } & StaffDocument_Key)[]; +} +``` +### Using `listStaffDocumentsByStaffId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffDocumentsByStaffId, ListStaffDocumentsByStaffIdVariables } from '@dataconnect/generated'; + +// The `listStaffDocumentsByStaffId` query requires an argument of type `ListStaffDocumentsByStaffIdVariables`: +const listStaffDocumentsByStaffIdVars: ListStaffDocumentsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffDocumentsByStaffId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffDocumentsByStaffId(listStaffDocumentsByStaffIdVars); +// Variables can be defined inline as well. +const { data } = await listStaffDocumentsByStaffId({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffDocumentsByStaffId(dataConnect, listStaffDocumentsByStaffIdVars); + +console.log(data.staffDocuments); + +// Or, you can use the `Promise` API. +listStaffDocumentsByStaffId(listStaffDocumentsByStaffIdVars).then((response) => { + const data = response.data; + console.log(data.staffDocuments); +}); +``` + +### Using `listStaffDocumentsByStaffId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffDocumentsByStaffIdRef, ListStaffDocumentsByStaffIdVariables } from '@dataconnect/generated'; + +// The `listStaffDocumentsByStaffId` query requires an argument of type `ListStaffDocumentsByStaffIdVariables`: +const listStaffDocumentsByStaffIdVars: ListStaffDocumentsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffDocumentsByStaffIdRef()` function to get a reference to the query. +const ref = listStaffDocumentsByStaffIdRef(listStaffDocumentsByStaffIdVars); +// Variables can be defined inline as well. +const ref = listStaffDocumentsByStaffIdRef({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffDocumentsByStaffIdRef(dataConnect, listStaffDocumentsByStaffIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffDocuments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffDocuments); +}); +``` + +## listStaffDocumentsByDocumentType +You can execute the `listStaffDocumentsByDocumentType` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffDocumentsByDocumentType(vars: ListStaffDocumentsByDocumentTypeVariables): QueryPromise; + +interface ListStaffDocumentsByDocumentTypeRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffDocumentsByDocumentTypeVariables): QueryRef; +} +export const listStaffDocumentsByDocumentTypeRef: ListStaffDocumentsByDocumentTypeRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffDocumentsByDocumentType(dc: DataConnect, vars: ListStaffDocumentsByDocumentTypeVariables): QueryPromise; + +interface ListStaffDocumentsByDocumentTypeRef { + ... + (dc: DataConnect, vars: ListStaffDocumentsByDocumentTypeVariables): QueryRef; +} +export const listStaffDocumentsByDocumentTypeRef: ListStaffDocumentsByDocumentTypeRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffDocumentsByDocumentTypeRef: +```typescript +const name = listStaffDocumentsByDocumentTypeRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffDocumentsByDocumentType` query requires an argument of type `ListStaffDocumentsByDocumentTypeVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffDocumentsByDocumentTypeVariables { + documentType: DocumentType; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listStaffDocumentsByDocumentType` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffDocumentsByDocumentTypeData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffDocumentsByDocumentTypeData { + staffDocuments: ({ + id: UUIDString; + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; + document: { + id: UUIDString; + name: string; + documentType: DocumentType; + } & Document_Key; + } & StaffDocument_Key)[]; +} +``` +### Using `listStaffDocumentsByDocumentType`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffDocumentsByDocumentType, ListStaffDocumentsByDocumentTypeVariables } from '@dataconnect/generated'; + +// The `listStaffDocumentsByDocumentType` query requires an argument of type `ListStaffDocumentsByDocumentTypeVariables`: +const listStaffDocumentsByDocumentTypeVars: ListStaffDocumentsByDocumentTypeVariables = { + documentType: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffDocumentsByDocumentType()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffDocumentsByDocumentType(listStaffDocumentsByDocumentTypeVars); +// Variables can be defined inline as well. +const { data } = await listStaffDocumentsByDocumentType({ documentType: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffDocumentsByDocumentType(dataConnect, listStaffDocumentsByDocumentTypeVars); + +console.log(data.staffDocuments); + +// Or, you can use the `Promise` API. +listStaffDocumentsByDocumentType(listStaffDocumentsByDocumentTypeVars).then((response) => { + const data = response.data; + console.log(data.staffDocuments); +}); +``` + +### Using `listStaffDocumentsByDocumentType`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffDocumentsByDocumentTypeRef, ListStaffDocumentsByDocumentTypeVariables } from '@dataconnect/generated'; + +// The `listStaffDocumentsByDocumentType` query requires an argument of type `ListStaffDocumentsByDocumentTypeVariables`: +const listStaffDocumentsByDocumentTypeVars: ListStaffDocumentsByDocumentTypeVariables = { + documentType: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffDocumentsByDocumentTypeRef()` function to get a reference to the query. +const ref = listStaffDocumentsByDocumentTypeRef(listStaffDocumentsByDocumentTypeVars); +// Variables can be defined inline as well. +const ref = listStaffDocumentsByDocumentTypeRef({ documentType: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffDocumentsByDocumentTypeRef(dataConnect, listStaffDocumentsByDocumentTypeVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffDocuments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffDocuments); +}); +``` + +## listStaffDocumentsByStatus +You can execute the `listStaffDocumentsByStatus` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffDocumentsByStatus(vars: ListStaffDocumentsByStatusVariables): QueryPromise; + +interface ListStaffDocumentsByStatusRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffDocumentsByStatusVariables): QueryRef; +} +export const listStaffDocumentsByStatusRef: ListStaffDocumentsByStatusRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffDocumentsByStatus(dc: DataConnect, vars: ListStaffDocumentsByStatusVariables): QueryPromise; + +interface ListStaffDocumentsByStatusRef { + ... + (dc: DataConnect, vars: ListStaffDocumentsByStatusVariables): QueryRef; +} +export const listStaffDocumentsByStatusRef: ListStaffDocumentsByStatusRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffDocumentsByStatusRef: +```typescript +const name = listStaffDocumentsByStatusRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffDocumentsByStatus` query requires an argument of type `ListStaffDocumentsByStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffDocumentsByStatusVariables { + status: DocumentStatus; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listStaffDocumentsByStatus` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffDocumentsByStatusData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffDocumentsByStatusData { + staffDocuments: ({ + id: UUIDString; + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; + document: { + id: UUIDString; + name: string; + documentType: DocumentType; + } & Document_Key; + } & StaffDocument_Key)[]; +} +``` +### Using `listStaffDocumentsByStatus`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffDocumentsByStatus, ListStaffDocumentsByStatusVariables } from '@dataconnect/generated'; + +// The `listStaffDocumentsByStatus` query requires an argument of type `ListStaffDocumentsByStatusVariables`: +const listStaffDocumentsByStatusVars: ListStaffDocumentsByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffDocumentsByStatus()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffDocumentsByStatus(listStaffDocumentsByStatusVars); +// Variables can be defined inline as well. +const { data } = await listStaffDocumentsByStatus({ status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffDocumentsByStatus(dataConnect, listStaffDocumentsByStatusVars); + +console.log(data.staffDocuments); + +// Or, you can use the `Promise` API. +listStaffDocumentsByStatus(listStaffDocumentsByStatusVars).then((response) => { + const data = response.data; + console.log(data.staffDocuments); +}); +``` + +### Using `listStaffDocumentsByStatus`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffDocumentsByStatusRef, ListStaffDocumentsByStatusVariables } from '@dataconnect/generated'; + +// The `listStaffDocumentsByStatus` query requires an argument of type `ListStaffDocumentsByStatusVariables`: +const listStaffDocumentsByStatusVars: ListStaffDocumentsByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffDocumentsByStatusRef()` function to get a reference to the query. +const ref = listStaffDocumentsByStatusRef(listStaffDocumentsByStatusVars); +// Variables can be defined inline as well. +const ref = listStaffDocumentsByStatusRef({ status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffDocumentsByStatusRef(dataConnect, listStaffDocumentsByStatusVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffDocuments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffDocuments); +}); +``` + +## listAccounts +You can execute the `listAccounts` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listAccounts(): QueryPromise; + +interface ListAccountsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listAccountsRef: ListAccountsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listAccounts(dc: DataConnect): QueryPromise; + +interface ListAccountsRef { + ... + (dc: DataConnect): QueryRef; +} +export const listAccountsRef: ListAccountsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listAccountsRef: +```typescript +const name = listAccountsRef.operationName; +console.log(name); +``` + +### Variables +The `listAccounts` query has no variables. +### Return Type +Recall that executing the `listAccounts` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListAccountsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListAccountsData { + accounts: ({ + id: UUIDString; + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; + createdAt?: TimestampString | null; + } & Account_Key)[]; +} +``` +### Using `listAccounts`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listAccounts } from '@dataconnect/generated'; + + +// Call the `listAccounts()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listAccounts(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listAccounts(dataConnect); + +console.log(data.accounts); + +// Or, you can use the `Promise` API. +listAccounts().then((response) => { + const data = response.data; + console.log(data.accounts); +}); +``` + +### Using `listAccounts`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listAccountsRef } from '@dataconnect/generated'; + + +// Call the `listAccountsRef()` function to get a reference to the query. +const ref = listAccountsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listAccountsRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.accounts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.accounts); +}); +``` + +## getAccountById +You can execute the `getAccountById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getAccountById(vars: GetAccountByIdVariables): QueryPromise; + +interface GetAccountByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetAccountByIdVariables): QueryRef; +} +export const getAccountByIdRef: GetAccountByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getAccountById(dc: DataConnect, vars: GetAccountByIdVariables): QueryPromise; + +interface GetAccountByIdRef { + ... + (dc: DataConnect, vars: GetAccountByIdVariables): QueryRef; +} +export const getAccountByIdRef: GetAccountByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getAccountByIdRef: +```typescript +const name = getAccountByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getAccountById` query requires an argument of type `GetAccountByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetAccountByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getAccountById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetAccountByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetAccountByIdData { + account?: { + id: UUIDString; + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; + createdAt?: TimestampString | null; + } & Account_Key; +} +``` +### Using `getAccountById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getAccountById, GetAccountByIdVariables } from '@dataconnect/generated'; + +// The `getAccountById` query requires an argument of type `GetAccountByIdVariables`: +const getAccountByIdVars: GetAccountByIdVariables = { + id: ..., +}; + +// Call the `getAccountById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getAccountById(getAccountByIdVars); +// Variables can be defined inline as well. +const { data } = await getAccountById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getAccountById(dataConnect, getAccountByIdVars); + +console.log(data.account); + +// Or, you can use the `Promise` API. +getAccountById(getAccountByIdVars).then((response) => { + const data = response.data; + console.log(data.account); +}); +``` + +### Using `getAccountById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getAccountByIdRef, GetAccountByIdVariables } from '@dataconnect/generated'; + +// The `getAccountById` query requires an argument of type `GetAccountByIdVariables`: +const getAccountByIdVars: GetAccountByIdVariables = { + id: ..., +}; + +// Call the `getAccountByIdRef()` function to get a reference to the query. +const ref = getAccountByIdRef(getAccountByIdVars); +// Variables can be defined inline as well. +const ref = getAccountByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getAccountByIdRef(dataConnect, getAccountByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.account); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.account); +}); +``` + +## getAccountsByOwnerId +You can execute the `getAccountsByOwnerId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getAccountsByOwnerId(vars: GetAccountsByOwnerIdVariables): QueryPromise; + +interface GetAccountsByOwnerIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetAccountsByOwnerIdVariables): QueryRef; +} +export const getAccountsByOwnerIdRef: GetAccountsByOwnerIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getAccountsByOwnerId(dc: DataConnect, vars: GetAccountsByOwnerIdVariables): QueryPromise; + +interface GetAccountsByOwnerIdRef { + ... + (dc: DataConnect, vars: GetAccountsByOwnerIdVariables): QueryRef; +} +export const getAccountsByOwnerIdRef: GetAccountsByOwnerIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getAccountsByOwnerIdRef: +```typescript +const name = getAccountsByOwnerIdRef.operationName; +console.log(name); +``` + +### Variables +The `getAccountsByOwnerId` query requires an argument of type `GetAccountsByOwnerIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetAccountsByOwnerIdVariables { + ownerId: UUIDString; +} +``` +### Return Type +Recall that executing the `getAccountsByOwnerId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetAccountsByOwnerIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetAccountsByOwnerIdData { + accounts: ({ + id: UUIDString; + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; + createdAt?: TimestampString | null; + } & Account_Key)[]; +} +``` +### Using `getAccountsByOwnerId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getAccountsByOwnerId, GetAccountsByOwnerIdVariables } from '@dataconnect/generated'; + +// The `getAccountsByOwnerId` query requires an argument of type `GetAccountsByOwnerIdVariables`: +const getAccountsByOwnerIdVars: GetAccountsByOwnerIdVariables = { + ownerId: ..., +}; + +// Call the `getAccountsByOwnerId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getAccountsByOwnerId(getAccountsByOwnerIdVars); +// Variables can be defined inline as well. +const { data } = await getAccountsByOwnerId({ ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getAccountsByOwnerId(dataConnect, getAccountsByOwnerIdVars); + +console.log(data.accounts); + +// Or, you can use the `Promise` API. +getAccountsByOwnerId(getAccountsByOwnerIdVars).then((response) => { + const data = response.data; + console.log(data.accounts); +}); +``` + +### Using `getAccountsByOwnerId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getAccountsByOwnerIdRef, GetAccountsByOwnerIdVariables } from '@dataconnect/generated'; + +// The `getAccountsByOwnerId` query requires an argument of type `GetAccountsByOwnerIdVariables`: +const getAccountsByOwnerIdVars: GetAccountsByOwnerIdVariables = { + ownerId: ..., +}; + +// Call the `getAccountsByOwnerIdRef()` function to get a reference to the query. +const ref = getAccountsByOwnerIdRef(getAccountsByOwnerIdVars); +// Variables can be defined inline as well. +const ref = getAccountsByOwnerIdRef({ ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getAccountsByOwnerIdRef(dataConnect, getAccountsByOwnerIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.accounts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.accounts); +}); +``` + +## filterAccounts +You can execute the `filterAccounts` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterAccounts(vars?: FilterAccountsVariables): QueryPromise; + +interface FilterAccountsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterAccountsVariables): QueryRef; +} +export const filterAccountsRef: FilterAccountsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterAccounts(dc: DataConnect, vars?: FilterAccountsVariables): QueryPromise; + +interface FilterAccountsRef { + ... + (dc: DataConnect, vars?: FilterAccountsVariables): QueryRef; +} +export const filterAccountsRef: FilterAccountsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterAccountsRef: +```typescript +const name = filterAccountsRef.operationName; +console.log(name); +``` + +### Variables +The `filterAccounts` query has an optional argument of type `FilterAccountsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterAccountsVariables { + bank?: string | null; + type?: AccountType | null; + isPrimary?: boolean | null; + ownerId?: UUIDString | null; +} +``` +### Return Type +Recall that executing the `filterAccounts` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterAccountsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterAccountsData { + accounts: ({ + id: UUIDString; + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + expiryTime?: TimestampString | null; + routeNumber?: string | null; + } & Account_Key)[]; +} +``` +### Using `filterAccounts`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterAccounts, FilterAccountsVariables } from '@dataconnect/generated'; + +// The `filterAccounts` query has an optional argument of type `FilterAccountsVariables`: +const filterAccountsVars: FilterAccountsVariables = { + bank: ..., // optional + type: ..., // optional + isPrimary: ..., // optional + ownerId: ..., // optional +}; + +// Call the `filterAccounts()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterAccounts(filterAccountsVars); +// Variables can be defined inline as well. +const { data } = await filterAccounts({ bank: ..., type: ..., isPrimary: ..., ownerId: ..., }); +// Since all variables are optional for this query, you can omit the `FilterAccountsVariables` argument. +const { data } = await filterAccounts(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterAccounts(dataConnect, filterAccountsVars); + +console.log(data.accounts); + +// Or, you can use the `Promise` API. +filterAccounts(filterAccountsVars).then((response) => { + const data = response.data; + console.log(data.accounts); +}); +``` + +### Using `filterAccounts`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterAccountsRef, FilterAccountsVariables } from '@dataconnect/generated'; + +// The `filterAccounts` query has an optional argument of type `FilterAccountsVariables`: +const filterAccountsVars: FilterAccountsVariables = { + bank: ..., // optional + type: ..., // optional + isPrimary: ..., // optional + ownerId: ..., // optional +}; + +// Call the `filterAccountsRef()` function to get a reference to the query. +const ref = filterAccountsRef(filterAccountsVars); +// Variables can be defined inline as well. +const ref = filterAccountsRef({ bank: ..., type: ..., isPrimary: ..., ownerId: ..., }); +// Since all variables are optional for this query, you can omit the `FilterAccountsVariables` argument. +const ref = filterAccountsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterAccountsRef(dataConnect, filterAccountsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.accounts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.accounts); +}); +``` + +## listApplications +You can execute the `listApplications` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listApplications(): QueryPromise; + +interface ListApplicationsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listApplicationsRef: ListApplicationsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listApplications(dc: DataConnect): QueryPromise; + +interface ListApplicationsRef { + ... + (dc: DataConnect): QueryRef; +} +export const listApplicationsRef: ListApplicationsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listApplicationsRef: +```typescript +const name = listApplicationsRef.operationName; +console.log(name); +``` + +### Variables +The `listApplications` query has no variables. +### Return Type +Recall that executing the `listApplications` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListApplicationsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListApplicationsData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` +### Using `listApplications`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listApplications } from '@dataconnect/generated'; + + +// Call the `listApplications()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listApplications(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listApplications(dataConnect); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +listApplications().then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `listApplications`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listApplicationsRef } from '@dataconnect/generated'; + + +// Call the `listApplicationsRef()` function to get a reference to the query. +const ref = listApplicationsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listApplicationsRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## getApplicationById +You can execute the `getApplicationById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getApplicationById(vars: GetApplicationByIdVariables): QueryPromise; + +interface GetApplicationByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetApplicationByIdVariables): QueryRef; +} +export const getApplicationByIdRef: GetApplicationByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getApplicationById(dc: DataConnect, vars: GetApplicationByIdVariables): QueryPromise; + +interface GetApplicationByIdRef { + ... + (dc: DataConnect, vars: GetApplicationByIdVariables): QueryRef; +} +export const getApplicationByIdRef: GetApplicationByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getApplicationByIdRef: +```typescript +const name = getApplicationByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getApplicationById` query requires an argument of type `GetApplicationByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetApplicationByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getApplicationById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetApplicationByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetApplicationByIdData { + application?: { + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key; +} +``` +### Using `getApplicationById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getApplicationById, GetApplicationByIdVariables } from '@dataconnect/generated'; + +// The `getApplicationById` query requires an argument of type `GetApplicationByIdVariables`: +const getApplicationByIdVars: GetApplicationByIdVariables = { + id: ..., +}; + +// Call the `getApplicationById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getApplicationById(getApplicationByIdVars); +// Variables can be defined inline as well. +const { data } = await getApplicationById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getApplicationById(dataConnect, getApplicationByIdVars); + +console.log(data.application); + +// Or, you can use the `Promise` API. +getApplicationById(getApplicationByIdVars).then((response) => { + const data = response.data; + console.log(data.application); +}); +``` + +### Using `getApplicationById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getApplicationByIdRef, GetApplicationByIdVariables } from '@dataconnect/generated'; + +// The `getApplicationById` query requires an argument of type `GetApplicationByIdVariables`: +const getApplicationByIdVars: GetApplicationByIdVariables = { + id: ..., +}; + +// Call the `getApplicationByIdRef()` function to get a reference to the query. +const ref = getApplicationByIdRef(getApplicationByIdVars); +// Variables can be defined inline as well. +const ref = getApplicationByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getApplicationByIdRef(dataConnect, getApplicationByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.application); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.application); +}); +``` + +## getApplicationsByShiftId +You can execute the `getApplicationsByShiftId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getApplicationsByShiftId(vars: GetApplicationsByShiftIdVariables): QueryPromise; + +interface GetApplicationsByShiftIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetApplicationsByShiftIdVariables): QueryRef; +} +export const getApplicationsByShiftIdRef: GetApplicationsByShiftIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getApplicationsByShiftId(dc: DataConnect, vars: GetApplicationsByShiftIdVariables): QueryPromise; + +interface GetApplicationsByShiftIdRef { + ... + (dc: DataConnect, vars: GetApplicationsByShiftIdVariables): QueryRef; +} +export const getApplicationsByShiftIdRef: GetApplicationsByShiftIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getApplicationsByShiftIdRef: +```typescript +const name = getApplicationsByShiftIdRef.operationName; +console.log(name); +``` + +### Variables +The `getApplicationsByShiftId` query requires an argument of type `GetApplicationsByShiftIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetApplicationsByShiftIdVariables { + shiftId: UUIDString; +} +``` +### Return Type +Recall that executing the `getApplicationsByShiftId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetApplicationsByShiftIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetApplicationsByShiftIdData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` +### Using `getApplicationsByShiftId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getApplicationsByShiftId, GetApplicationsByShiftIdVariables } from '@dataconnect/generated'; + +// The `getApplicationsByShiftId` query requires an argument of type `GetApplicationsByShiftIdVariables`: +const getApplicationsByShiftIdVars: GetApplicationsByShiftIdVariables = { + shiftId: ..., +}; + +// Call the `getApplicationsByShiftId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getApplicationsByShiftId(getApplicationsByShiftIdVars); +// Variables can be defined inline as well. +const { data } = await getApplicationsByShiftId({ shiftId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getApplicationsByShiftId(dataConnect, getApplicationsByShiftIdVars); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +getApplicationsByShiftId(getApplicationsByShiftIdVars).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `getApplicationsByShiftId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getApplicationsByShiftIdRef, GetApplicationsByShiftIdVariables } from '@dataconnect/generated'; + +// The `getApplicationsByShiftId` query requires an argument of type `GetApplicationsByShiftIdVariables`: +const getApplicationsByShiftIdVars: GetApplicationsByShiftIdVariables = { + shiftId: ..., +}; + +// Call the `getApplicationsByShiftIdRef()` function to get a reference to the query. +const ref = getApplicationsByShiftIdRef(getApplicationsByShiftIdVars); +// Variables can be defined inline as well. +const ref = getApplicationsByShiftIdRef({ shiftId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getApplicationsByShiftIdRef(dataConnect, getApplicationsByShiftIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## getApplicationsByShiftIdAndStatus +You can execute the `getApplicationsByShiftIdAndStatus` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getApplicationsByShiftIdAndStatus(vars: GetApplicationsByShiftIdAndStatusVariables): QueryPromise; + +interface GetApplicationsByShiftIdAndStatusRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetApplicationsByShiftIdAndStatusVariables): QueryRef; +} +export const getApplicationsByShiftIdAndStatusRef: GetApplicationsByShiftIdAndStatusRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getApplicationsByShiftIdAndStatus(dc: DataConnect, vars: GetApplicationsByShiftIdAndStatusVariables): QueryPromise; + +interface GetApplicationsByShiftIdAndStatusRef { + ... + (dc: DataConnect, vars: GetApplicationsByShiftIdAndStatusVariables): QueryRef; +} +export const getApplicationsByShiftIdAndStatusRef: GetApplicationsByShiftIdAndStatusRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getApplicationsByShiftIdAndStatusRef: +```typescript +const name = getApplicationsByShiftIdAndStatusRef.operationName; +console.log(name); +``` + +### Variables +The `getApplicationsByShiftIdAndStatus` query requires an argument of type `GetApplicationsByShiftIdAndStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetApplicationsByShiftIdAndStatusVariables { + shiftId: UUIDString; + status: ApplicationStatus; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `getApplicationsByShiftIdAndStatus` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetApplicationsByShiftIdAndStatusData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetApplicationsByShiftIdAndStatusData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` +### Using `getApplicationsByShiftIdAndStatus`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getApplicationsByShiftIdAndStatus, GetApplicationsByShiftIdAndStatusVariables } from '@dataconnect/generated'; + +// The `getApplicationsByShiftIdAndStatus` query requires an argument of type `GetApplicationsByShiftIdAndStatusVariables`: +const getApplicationsByShiftIdAndStatusVars: GetApplicationsByShiftIdAndStatusVariables = { + shiftId: ..., + status: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getApplicationsByShiftIdAndStatus()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getApplicationsByShiftIdAndStatus(getApplicationsByShiftIdAndStatusVars); +// Variables can be defined inline as well. +const { data } = await getApplicationsByShiftIdAndStatus({ shiftId: ..., status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getApplicationsByShiftIdAndStatus(dataConnect, getApplicationsByShiftIdAndStatusVars); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +getApplicationsByShiftIdAndStatus(getApplicationsByShiftIdAndStatusVars).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `getApplicationsByShiftIdAndStatus`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getApplicationsByShiftIdAndStatusRef, GetApplicationsByShiftIdAndStatusVariables } from '@dataconnect/generated'; + +// The `getApplicationsByShiftIdAndStatus` query requires an argument of type `GetApplicationsByShiftIdAndStatusVariables`: +const getApplicationsByShiftIdAndStatusVars: GetApplicationsByShiftIdAndStatusVariables = { + shiftId: ..., + status: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getApplicationsByShiftIdAndStatusRef()` function to get a reference to the query. +const ref = getApplicationsByShiftIdAndStatusRef(getApplicationsByShiftIdAndStatusVars); +// Variables can be defined inline as well. +const ref = getApplicationsByShiftIdAndStatusRef({ shiftId: ..., status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getApplicationsByShiftIdAndStatusRef(dataConnect, getApplicationsByShiftIdAndStatusVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## getApplicationsByStaffId +You can execute the `getApplicationsByStaffId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getApplicationsByStaffId(vars: GetApplicationsByStaffIdVariables): QueryPromise; + +interface GetApplicationsByStaffIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetApplicationsByStaffIdVariables): QueryRef; +} +export const getApplicationsByStaffIdRef: GetApplicationsByStaffIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getApplicationsByStaffId(dc: DataConnect, vars: GetApplicationsByStaffIdVariables): QueryPromise; + +interface GetApplicationsByStaffIdRef { + ... + (dc: DataConnect, vars: GetApplicationsByStaffIdVariables): QueryRef; +} +export const getApplicationsByStaffIdRef: GetApplicationsByStaffIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getApplicationsByStaffIdRef: +```typescript +const name = getApplicationsByStaffIdRef.operationName; +console.log(name); +``` + +### Variables +The `getApplicationsByStaffId` query requires an argument of type `GetApplicationsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetApplicationsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; + dayStart?: TimestampString | null; + dayEnd?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `getApplicationsByStaffId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetApplicationsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetApplicationsByStaffIdData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + durationDays?: number | null; + description?: string | null; + latitude?: number | null; + longitude?: number | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` +### Using `getApplicationsByStaffId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getApplicationsByStaffId, GetApplicationsByStaffIdVariables } from '@dataconnect/generated'; + +// The `getApplicationsByStaffId` query requires an argument of type `GetApplicationsByStaffIdVariables`: +const getApplicationsByStaffIdVars: GetApplicationsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + dayStart: ..., // optional + dayEnd: ..., // optional +}; + +// Call the `getApplicationsByStaffId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getApplicationsByStaffId(getApplicationsByStaffIdVars); +// Variables can be defined inline as well. +const { data } = await getApplicationsByStaffId({ staffId: ..., offset: ..., limit: ..., dayStart: ..., dayEnd: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getApplicationsByStaffId(dataConnect, getApplicationsByStaffIdVars); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +getApplicationsByStaffId(getApplicationsByStaffIdVars).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `getApplicationsByStaffId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getApplicationsByStaffIdRef, GetApplicationsByStaffIdVariables } from '@dataconnect/generated'; + +// The `getApplicationsByStaffId` query requires an argument of type `GetApplicationsByStaffIdVariables`: +const getApplicationsByStaffIdVars: GetApplicationsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + dayStart: ..., // optional + dayEnd: ..., // optional +}; + +// Call the `getApplicationsByStaffIdRef()` function to get a reference to the query. +const ref = getApplicationsByStaffIdRef(getApplicationsByStaffIdVars); +// Variables can be defined inline as well. +const ref = getApplicationsByStaffIdRef({ staffId: ..., offset: ..., limit: ..., dayStart: ..., dayEnd: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getApplicationsByStaffIdRef(dataConnect, getApplicationsByStaffIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## vaidateDayStaffApplication +You can execute the `vaidateDayStaffApplication` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +vaidateDayStaffApplication(vars: VaidateDayStaffApplicationVariables): QueryPromise; + +interface VaidateDayStaffApplicationRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: VaidateDayStaffApplicationVariables): QueryRef; +} +export const vaidateDayStaffApplicationRef: VaidateDayStaffApplicationRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +vaidateDayStaffApplication(dc: DataConnect, vars: VaidateDayStaffApplicationVariables): QueryPromise; + +interface VaidateDayStaffApplicationRef { + ... + (dc: DataConnect, vars: VaidateDayStaffApplicationVariables): QueryRef; +} +export const vaidateDayStaffApplicationRef: VaidateDayStaffApplicationRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the vaidateDayStaffApplicationRef: +```typescript +const name = vaidateDayStaffApplicationRef.operationName; +console.log(name); +``` + +### Variables +The `vaidateDayStaffApplication` query requires an argument of type `VaidateDayStaffApplicationVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface VaidateDayStaffApplicationVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; + dayStart?: TimestampString | null; + dayEnd?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `vaidateDayStaffApplication` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `VaidateDayStaffApplicationData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface VaidateDayStaffApplicationData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + durationDays?: number | null; + description?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` +### Using `vaidateDayStaffApplication`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, vaidateDayStaffApplication, VaidateDayStaffApplicationVariables } from '@dataconnect/generated'; + +// The `vaidateDayStaffApplication` query requires an argument of type `VaidateDayStaffApplicationVariables`: +const vaidateDayStaffApplicationVars: VaidateDayStaffApplicationVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + dayStart: ..., // optional + dayEnd: ..., // optional +}; + +// Call the `vaidateDayStaffApplication()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await vaidateDayStaffApplication(vaidateDayStaffApplicationVars); +// Variables can be defined inline as well. +const { data } = await vaidateDayStaffApplication({ staffId: ..., offset: ..., limit: ..., dayStart: ..., dayEnd: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await vaidateDayStaffApplication(dataConnect, vaidateDayStaffApplicationVars); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +vaidateDayStaffApplication(vaidateDayStaffApplicationVars).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `vaidateDayStaffApplication`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, vaidateDayStaffApplicationRef, VaidateDayStaffApplicationVariables } from '@dataconnect/generated'; + +// The `vaidateDayStaffApplication` query requires an argument of type `VaidateDayStaffApplicationVariables`: +const vaidateDayStaffApplicationVars: VaidateDayStaffApplicationVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + dayStart: ..., // optional + dayEnd: ..., // optional +}; + +// Call the `vaidateDayStaffApplicationRef()` function to get a reference to the query. +const ref = vaidateDayStaffApplicationRef(vaidateDayStaffApplicationVars); +// Variables can be defined inline as well. +const ref = vaidateDayStaffApplicationRef({ staffId: ..., offset: ..., limit: ..., dayStart: ..., dayEnd: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = vaidateDayStaffApplicationRef(dataConnect, vaidateDayStaffApplicationVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## getApplicationByStaffShiftAndRole +You can execute the `getApplicationByStaffShiftAndRole` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getApplicationByStaffShiftAndRole(vars: GetApplicationByStaffShiftAndRoleVariables): QueryPromise; + +interface GetApplicationByStaffShiftAndRoleRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetApplicationByStaffShiftAndRoleVariables): QueryRef; +} +export const getApplicationByStaffShiftAndRoleRef: GetApplicationByStaffShiftAndRoleRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getApplicationByStaffShiftAndRole(dc: DataConnect, vars: GetApplicationByStaffShiftAndRoleVariables): QueryPromise; + +interface GetApplicationByStaffShiftAndRoleRef { + ... + (dc: DataConnect, vars: GetApplicationByStaffShiftAndRoleVariables): QueryRef; +} +export const getApplicationByStaffShiftAndRoleRef: GetApplicationByStaffShiftAndRoleRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getApplicationByStaffShiftAndRoleRef: +```typescript +const name = getApplicationByStaffShiftAndRoleRef.operationName; +console.log(name); +``` + +### Variables +The `getApplicationByStaffShiftAndRole` query requires an argument of type `GetApplicationByStaffShiftAndRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetApplicationByStaffShiftAndRoleVariables { + staffId: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `getApplicationByStaffShiftAndRole` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetApplicationByStaffShiftAndRoleData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetApplicationByStaffShiftAndRoleData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` +### Using `getApplicationByStaffShiftAndRole`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getApplicationByStaffShiftAndRole, GetApplicationByStaffShiftAndRoleVariables } from '@dataconnect/generated'; + +// The `getApplicationByStaffShiftAndRole` query requires an argument of type `GetApplicationByStaffShiftAndRoleVariables`: +const getApplicationByStaffShiftAndRoleVars: GetApplicationByStaffShiftAndRoleVariables = { + staffId: ..., + shiftId: ..., + roleId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getApplicationByStaffShiftAndRole()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getApplicationByStaffShiftAndRole(getApplicationByStaffShiftAndRoleVars); +// Variables can be defined inline as well. +const { data } = await getApplicationByStaffShiftAndRole({ staffId: ..., shiftId: ..., roleId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getApplicationByStaffShiftAndRole(dataConnect, getApplicationByStaffShiftAndRoleVars); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +getApplicationByStaffShiftAndRole(getApplicationByStaffShiftAndRoleVars).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `getApplicationByStaffShiftAndRole`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getApplicationByStaffShiftAndRoleRef, GetApplicationByStaffShiftAndRoleVariables } from '@dataconnect/generated'; + +// The `getApplicationByStaffShiftAndRole` query requires an argument of type `GetApplicationByStaffShiftAndRoleVariables`: +const getApplicationByStaffShiftAndRoleVars: GetApplicationByStaffShiftAndRoleVariables = { + staffId: ..., + shiftId: ..., + roleId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getApplicationByStaffShiftAndRoleRef()` function to get a reference to the query. +const ref = getApplicationByStaffShiftAndRoleRef(getApplicationByStaffShiftAndRoleVars); +// Variables can be defined inline as well. +const ref = getApplicationByStaffShiftAndRoleRef({ staffId: ..., shiftId: ..., roleId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getApplicationByStaffShiftAndRoleRef(dataConnect, getApplicationByStaffShiftAndRoleVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## listAcceptedApplicationsByShiftRoleKey +You can execute the `listAcceptedApplicationsByShiftRoleKey` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listAcceptedApplicationsByShiftRoleKey(vars: ListAcceptedApplicationsByShiftRoleKeyVariables): QueryPromise; + +interface ListAcceptedApplicationsByShiftRoleKeyRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListAcceptedApplicationsByShiftRoleKeyVariables): QueryRef; +} +export const listAcceptedApplicationsByShiftRoleKeyRef: ListAcceptedApplicationsByShiftRoleKeyRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listAcceptedApplicationsByShiftRoleKey(dc: DataConnect, vars: ListAcceptedApplicationsByShiftRoleKeyVariables): QueryPromise; + +interface ListAcceptedApplicationsByShiftRoleKeyRef { + ... + (dc: DataConnect, vars: ListAcceptedApplicationsByShiftRoleKeyVariables): QueryRef; +} +export const listAcceptedApplicationsByShiftRoleKeyRef: ListAcceptedApplicationsByShiftRoleKeyRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listAcceptedApplicationsByShiftRoleKeyRef: +```typescript +const name = listAcceptedApplicationsByShiftRoleKeyRef.operationName; +console.log(name); +``` + +### Variables +The `listAcceptedApplicationsByShiftRoleKey` query requires an argument of type `ListAcceptedApplicationsByShiftRoleKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListAcceptedApplicationsByShiftRoleKeyVariables { + shiftId: UUIDString; + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listAcceptedApplicationsByShiftRoleKey` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListAcceptedApplicationsByShiftRoleKeyData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListAcceptedApplicationsByShiftRoleKeyData { + applications: ({ + id: UUIDString; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + } & Staff_Key; + } & Application_Key)[]; +} +``` +### Using `listAcceptedApplicationsByShiftRoleKey`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listAcceptedApplicationsByShiftRoleKey, ListAcceptedApplicationsByShiftRoleKeyVariables } from '@dataconnect/generated'; + +// The `listAcceptedApplicationsByShiftRoleKey` query requires an argument of type `ListAcceptedApplicationsByShiftRoleKeyVariables`: +const listAcceptedApplicationsByShiftRoleKeyVars: ListAcceptedApplicationsByShiftRoleKeyVariables = { + shiftId: ..., + roleId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listAcceptedApplicationsByShiftRoleKey()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listAcceptedApplicationsByShiftRoleKey(listAcceptedApplicationsByShiftRoleKeyVars); +// Variables can be defined inline as well. +const { data } = await listAcceptedApplicationsByShiftRoleKey({ shiftId: ..., roleId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listAcceptedApplicationsByShiftRoleKey(dataConnect, listAcceptedApplicationsByShiftRoleKeyVars); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +listAcceptedApplicationsByShiftRoleKey(listAcceptedApplicationsByShiftRoleKeyVars).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `listAcceptedApplicationsByShiftRoleKey`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listAcceptedApplicationsByShiftRoleKeyRef, ListAcceptedApplicationsByShiftRoleKeyVariables } from '@dataconnect/generated'; + +// The `listAcceptedApplicationsByShiftRoleKey` query requires an argument of type `ListAcceptedApplicationsByShiftRoleKeyVariables`: +const listAcceptedApplicationsByShiftRoleKeyVars: ListAcceptedApplicationsByShiftRoleKeyVariables = { + shiftId: ..., + roleId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listAcceptedApplicationsByShiftRoleKeyRef()` function to get a reference to the query. +const ref = listAcceptedApplicationsByShiftRoleKeyRef(listAcceptedApplicationsByShiftRoleKeyVars); +// Variables can be defined inline as well. +const ref = listAcceptedApplicationsByShiftRoleKeyRef({ shiftId: ..., roleId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listAcceptedApplicationsByShiftRoleKeyRef(dataConnect, listAcceptedApplicationsByShiftRoleKeyVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## listAcceptedApplicationsByBusinessForDay +You can execute the `listAcceptedApplicationsByBusinessForDay` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listAcceptedApplicationsByBusinessForDay(vars: ListAcceptedApplicationsByBusinessForDayVariables): QueryPromise; + +interface ListAcceptedApplicationsByBusinessForDayRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListAcceptedApplicationsByBusinessForDayVariables): QueryRef; +} +export const listAcceptedApplicationsByBusinessForDayRef: ListAcceptedApplicationsByBusinessForDayRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listAcceptedApplicationsByBusinessForDay(dc: DataConnect, vars: ListAcceptedApplicationsByBusinessForDayVariables): QueryPromise; + +interface ListAcceptedApplicationsByBusinessForDayRef { + ... + (dc: DataConnect, vars: ListAcceptedApplicationsByBusinessForDayVariables): QueryRef; +} +export const listAcceptedApplicationsByBusinessForDayRef: ListAcceptedApplicationsByBusinessForDayRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listAcceptedApplicationsByBusinessForDayRef: +```typescript +const name = listAcceptedApplicationsByBusinessForDayRef.operationName; +console.log(name); +``` + +### Variables +The `listAcceptedApplicationsByBusinessForDay` query requires an argument of type `ListAcceptedApplicationsByBusinessForDayVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListAcceptedApplicationsByBusinessForDayVariables { + businessId: UUIDString; + dayStart: TimestampString; + dayEnd: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listAcceptedApplicationsByBusinessForDay` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListAcceptedApplicationsByBusinessForDayData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListAcceptedApplicationsByBusinessForDayData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + appliedAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + averageRating?: number | null; + } & Staff_Key; + } & Application_Key)[]; +} +``` +### Using `listAcceptedApplicationsByBusinessForDay`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listAcceptedApplicationsByBusinessForDay, ListAcceptedApplicationsByBusinessForDayVariables } from '@dataconnect/generated'; + +// The `listAcceptedApplicationsByBusinessForDay` query requires an argument of type `ListAcceptedApplicationsByBusinessForDayVariables`: +const listAcceptedApplicationsByBusinessForDayVars: ListAcceptedApplicationsByBusinessForDayVariables = { + businessId: ..., + dayStart: ..., + dayEnd: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listAcceptedApplicationsByBusinessForDay()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listAcceptedApplicationsByBusinessForDay(listAcceptedApplicationsByBusinessForDayVars); +// Variables can be defined inline as well. +const { data } = await listAcceptedApplicationsByBusinessForDay({ businessId: ..., dayStart: ..., dayEnd: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listAcceptedApplicationsByBusinessForDay(dataConnect, listAcceptedApplicationsByBusinessForDayVars); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +listAcceptedApplicationsByBusinessForDay(listAcceptedApplicationsByBusinessForDayVars).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `listAcceptedApplicationsByBusinessForDay`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listAcceptedApplicationsByBusinessForDayRef, ListAcceptedApplicationsByBusinessForDayVariables } from '@dataconnect/generated'; + +// The `listAcceptedApplicationsByBusinessForDay` query requires an argument of type `ListAcceptedApplicationsByBusinessForDayVariables`: +const listAcceptedApplicationsByBusinessForDayVars: ListAcceptedApplicationsByBusinessForDayVariables = { + businessId: ..., + dayStart: ..., + dayEnd: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listAcceptedApplicationsByBusinessForDayRef()` function to get a reference to the query. +const ref = listAcceptedApplicationsByBusinessForDayRef(listAcceptedApplicationsByBusinessForDayVars); +// Variables can be defined inline as well. +const ref = listAcceptedApplicationsByBusinessForDayRef({ businessId: ..., dayStart: ..., dayEnd: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listAcceptedApplicationsByBusinessForDayRef(dataConnect, listAcceptedApplicationsByBusinessForDayVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## listStaffsApplicationsByBusinessForDay +You can execute the `listStaffsApplicationsByBusinessForDay` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffsApplicationsByBusinessForDay(vars: ListStaffsApplicationsByBusinessForDayVariables): QueryPromise; + +interface ListStaffsApplicationsByBusinessForDayRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffsApplicationsByBusinessForDayVariables): QueryRef; +} +export const listStaffsApplicationsByBusinessForDayRef: ListStaffsApplicationsByBusinessForDayRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffsApplicationsByBusinessForDay(dc: DataConnect, vars: ListStaffsApplicationsByBusinessForDayVariables): QueryPromise; + +interface ListStaffsApplicationsByBusinessForDayRef { + ... + (dc: DataConnect, vars: ListStaffsApplicationsByBusinessForDayVariables): QueryRef; +} +export const listStaffsApplicationsByBusinessForDayRef: ListStaffsApplicationsByBusinessForDayRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffsApplicationsByBusinessForDayRef: +```typescript +const name = listStaffsApplicationsByBusinessForDayRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffsApplicationsByBusinessForDay` query requires an argument of type `ListStaffsApplicationsByBusinessForDayVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffsApplicationsByBusinessForDayVariables { + businessId: UUIDString; + dayStart: TimestampString; + dayEnd: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listStaffsApplicationsByBusinessForDay` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffsApplicationsByBusinessForDayData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffsApplicationsByBusinessForDayData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + appliedAt?: TimestampString | null; + status: ApplicationStatus; + shiftRole: { + shift: { + location?: string | null; + cost?: number | null; + }; + count: number; + assigned?: number | null; + hours?: number | null; + role: { + name: string; + }; + }; + staff: { + id: UUIDString; + fullName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + } & Staff_Key; + } & Application_Key)[]; +} +``` +### Using `listStaffsApplicationsByBusinessForDay`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffsApplicationsByBusinessForDay, ListStaffsApplicationsByBusinessForDayVariables } from '@dataconnect/generated'; + +// The `listStaffsApplicationsByBusinessForDay` query requires an argument of type `ListStaffsApplicationsByBusinessForDayVariables`: +const listStaffsApplicationsByBusinessForDayVars: ListStaffsApplicationsByBusinessForDayVariables = { + businessId: ..., + dayStart: ..., + dayEnd: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffsApplicationsByBusinessForDay()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffsApplicationsByBusinessForDay(listStaffsApplicationsByBusinessForDayVars); +// Variables can be defined inline as well. +const { data } = await listStaffsApplicationsByBusinessForDay({ businessId: ..., dayStart: ..., dayEnd: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffsApplicationsByBusinessForDay(dataConnect, listStaffsApplicationsByBusinessForDayVars); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +listStaffsApplicationsByBusinessForDay(listStaffsApplicationsByBusinessForDayVars).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `listStaffsApplicationsByBusinessForDay`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffsApplicationsByBusinessForDayRef, ListStaffsApplicationsByBusinessForDayVariables } from '@dataconnect/generated'; + +// The `listStaffsApplicationsByBusinessForDay` query requires an argument of type `ListStaffsApplicationsByBusinessForDayVariables`: +const listStaffsApplicationsByBusinessForDayVars: ListStaffsApplicationsByBusinessForDayVariables = { + businessId: ..., + dayStart: ..., + dayEnd: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffsApplicationsByBusinessForDayRef()` function to get a reference to the query. +const ref = listStaffsApplicationsByBusinessForDayRef(listStaffsApplicationsByBusinessForDayVars); +// Variables can be defined inline as well. +const ref = listStaffsApplicationsByBusinessForDayRef({ businessId: ..., dayStart: ..., dayEnd: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffsApplicationsByBusinessForDayRef(dataConnect, listStaffsApplicationsByBusinessForDayVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## listCompletedApplicationsByStaffId +You can execute the `listCompletedApplicationsByStaffId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listCompletedApplicationsByStaffId(vars: ListCompletedApplicationsByStaffIdVariables): QueryPromise; + +interface ListCompletedApplicationsByStaffIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListCompletedApplicationsByStaffIdVariables): QueryRef; +} +export const listCompletedApplicationsByStaffIdRef: ListCompletedApplicationsByStaffIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listCompletedApplicationsByStaffId(dc: DataConnect, vars: ListCompletedApplicationsByStaffIdVariables): QueryPromise; + +interface ListCompletedApplicationsByStaffIdRef { + ... + (dc: DataConnect, vars: ListCompletedApplicationsByStaffIdVariables): QueryRef; +} +export const listCompletedApplicationsByStaffIdRef: ListCompletedApplicationsByStaffIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listCompletedApplicationsByStaffIdRef: +```typescript +const name = listCompletedApplicationsByStaffIdRef.operationName; +console.log(name); +``` + +### Variables +The `listCompletedApplicationsByStaffId` query requires an argument of type `ListCompletedApplicationsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListCompletedApplicationsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listCompletedApplicationsByStaffId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListCompletedApplicationsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListCompletedApplicationsByStaffIdData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + description?: string | null; + durationDays?: number | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` +### Using `listCompletedApplicationsByStaffId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listCompletedApplicationsByStaffId, ListCompletedApplicationsByStaffIdVariables } from '@dataconnect/generated'; + +// The `listCompletedApplicationsByStaffId` query requires an argument of type `ListCompletedApplicationsByStaffIdVariables`: +const listCompletedApplicationsByStaffIdVars: ListCompletedApplicationsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listCompletedApplicationsByStaffId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listCompletedApplicationsByStaffId(listCompletedApplicationsByStaffIdVars); +// Variables can be defined inline as well. +const { data } = await listCompletedApplicationsByStaffId({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listCompletedApplicationsByStaffId(dataConnect, listCompletedApplicationsByStaffIdVars); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +listCompletedApplicationsByStaffId(listCompletedApplicationsByStaffIdVars).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `listCompletedApplicationsByStaffId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listCompletedApplicationsByStaffIdRef, ListCompletedApplicationsByStaffIdVariables } from '@dataconnect/generated'; + +// The `listCompletedApplicationsByStaffId` query requires an argument of type `ListCompletedApplicationsByStaffIdVariables`: +const listCompletedApplicationsByStaffIdVars: ListCompletedApplicationsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listCompletedApplicationsByStaffIdRef()` function to get a reference to the query. +const ref = listCompletedApplicationsByStaffIdRef(listCompletedApplicationsByStaffIdVars); +// Variables can be defined inline as well. +const ref = listCompletedApplicationsByStaffIdRef({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listCompletedApplicationsByStaffIdRef(dataConnect, listCompletedApplicationsByStaffIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## listAttireOptions +You can execute the `listAttireOptions` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listAttireOptions(): QueryPromise; + +interface ListAttireOptionsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listAttireOptionsRef: ListAttireOptionsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listAttireOptions(dc: DataConnect): QueryPromise; + +interface ListAttireOptionsRef { + ... + (dc: DataConnect): QueryRef; +} +export const listAttireOptionsRef: ListAttireOptionsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listAttireOptionsRef: +```typescript +const name = listAttireOptionsRef.operationName; +console.log(name); +``` + +### Variables +The `listAttireOptions` query has no variables. +### Return Type +Recall that executing the `listAttireOptions` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListAttireOptionsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListAttireOptionsData { + attireOptions: ({ + id: UUIDString; + itemId: string; + label: string; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; + createdAt?: TimestampString | null; + } & AttireOption_Key)[]; +} +``` +### Using `listAttireOptions`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listAttireOptions } from '@dataconnect/generated'; + + +// Call the `listAttireOptions()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listAttireOptions(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listAttireOptions(dataConnect); + +console.log(data.attireOptions); + +// Or, you can use the `Promise` API. +listAttireOptions().then((response) => { + const data = response.data; + console.log(data.attireOptions); +}); +``` + +### Using `listAttireOptions`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listAttireOptionsRef } from '@dataconnect/generated'; + + +// Call the `listAttireOptionsRef()` function to get a reference to the query. +const ref = listAttireOptionsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listAttireOptionsRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.attireOptions); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.attireOptions); +}); +``` + +## getAttireOptionById +You can execute the `getAttireOptionById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getAttireOptionById(vars: GetAttireOptionByIdVariables): QueryPromise; + +interface GetAttireOptionByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetAttireOptionByIdVariables): QueryRef; +} +export const getAttireOptionByIdRef: GetAttireOptionByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getAttireOptionById(dc: DataConnect, vars: GetAttireOptionByIdVariables): QueryPromise; + +interface GetAttireOptionByIdRef { + ... + (dc: DataConnect, vars: GetAttireOptionByIdVariables): QueryRef; +} +export const getAttireOptionByIdRef: GetAttireOptionByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getAttireOptionByIdRef: +```typescript +const name = getAttireOptionByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getAttireOptionById` query requires an argument of type `GetAttireOptionByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetAttireOptionByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getAttireOptionById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetAttireOptionByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetAttireOptionByIdData { + attireOption?: { + id: UUIDString; + itemId: string; + label: string; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; + createdAt?: TimestampString | null; + } & AttireOption_Key; +} +``` +### Using `getAttireOptionById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getAttireOptionById, GetAttireOptionByIdVariables } from '@dataconnect/generated'; + +// The `getAttireOptionById` query requires an argument of type `GetAttireOptionByIdVariables`: +const getAttireOptionByIdVars: GetAttireOptionByIdVariables = { + id: ..., +}; + +// Call the `getAttireOptionById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getAttireOptionById(getAttireOptionByIdVars); +// Variables can be defined inline as well. +const { data } = await getAttireOptionById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getAttireOptionById(dataConnect, getAttireOptionByIdVars); + +console.log(data.attireOption); + +// Or, you can use the `Promise` API. +getAttireOptionById(getAttireOptionByIdVars).then((response) => { + const data = response.data; + console.log(data.attireOption); +}); +``` + +### Using `getAttireOptionById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getAttireOptionByIdRef, GetAttireOptionByIdVariables } from '@dataconnect/generated'; + +// The `getAttireOptionById` query requires an argument of type `GetAttireOptionByIdVariables`: +const getAttireOptionByIdVars: GetAttireOptionByIdVariables = { + id: ..., +}; + +// Call the `getAttireOptionByIdRef()` function to get a reference to the query. +const ref = getAttireOptionByIdRef(getAttireOptionByIdVars); +// Variables can be defined inline as well. +const ref = getAttireOptionByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getAttireOptionByIdRef(dataConnect, getAttireOptionByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.attireOption); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.attireOption); +}); +``` + +## filterAttireOptions +You can execute the `filterAttireOptions` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterAttireOptions(vars?: FilterAttireOptionsVariables): QueryPromise; + +interface FilterAttireOptionsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterAttireOptionsVariables): QueryRef; +} +export const filterAttireOptionsRef: FilterAttireOptionsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterAttireOptions(dc: DataConnect, vars?: FilterAttireOptionsVariables): QueryPromise; + +interface FilterAttireOptionsRef { + ... + (dc: DataConnect, vars?: FilterAttireOptionsVariables): QueryRef; +} +export const filterAttireOptionsRef: FilterAttireOptionsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterAttireOptionsRef: +```typescript +const name = filterAttireOptionsRef.operationName; +console.log(name); +``` + +### Variables +The `filterAttireOptions` query has an optional argument of type `FilterAttireOptionsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterAttireOptionsVariables { + itemId?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; +} +``` +### Return Type +Recall that executing the `filterAttireOptions` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterAttireOptionsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterAttireOptionsData { + attireOptions: ({ + id: UUIDString; + itemId: string; + label: string; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; + } & AttireOption_Key)[]; +} +``` +### Using `filterAttireOptions`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterAttireOptions, FilterAttireOptionsVariables } from '@dataconnect/generated'; + +// The `filterAttireOptions` query has an optional argument of type `FilterAttireOptionsVariables`: +const filterAttireOptionsVars: FilterAttireOptionsVariables = { + itemId: ..., // optional + isMandatory: ..., // optional + vendorId: ..., // optional +}; + +// Call the `filterAttireOptions()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterAttireOptions(filterAttireOptionsVars); +// Variables can be defined inline as well. +const { data } = await filterAttireOptions({ itemId: ..., isMandatory: ..., vendorId: ..., }); +// Since all variables are optional for this query, you can omit the `FilterAttireOptionsVariables` argument. +const { data } = await filterAttireOptions(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterAttireOptions(dataConnect, filterAttireOptionsVars); + +console.log(data.attireOptions); + +// Or, you can use the `Promise` API. +filterAttireOptions(filterAttireOptionsVars).then((response) => { + const data = response.data; + console.log(data.attireOptions); +}); +``` + +### Using `filterAttireOptions`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterAttireOptionsRef, FilterAttireOptionsVariables } from '@dataconnect/generated'; + +// The `filterAttireOptions` query has an optional argument of type `FilterAttireOptionsVariables`: +const filterAttireOptionsVars: FilterAttireOptionsVariables = { + itemId: ..., // optional + isMandatory: ..., // optional + vendorId: ..., // optional +}; + +// Call the `filterAttireOptionsRef()` function to get a reference to the query. +const ref = filterAttireOptionsRef(filterAttireOptionsVars); +// Variables can be defined inline as well. +const ref = filterAttireOptionsRef({ itemId: ..., isMandatory: ..., vendorId: ..., }); +// Since all variables are optional for this query, you can omit the `FilterAttireOptionsVariables` argument. +const ref = filterAttireOptionsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterAttireOptionsRef(dataConnect, filterAttireOptionsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.attireOptions); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.attireOptions); +}); +``` + +## listCustomRateCards +You can execute the `listCustomRateCards` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listCustomRateCards(): QueryPromise; + +interface ListCustomRateCardsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listCustomRateCardsRef: ListCustomRateCardsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listCustomRateCards(dc: DataConnect): QueryPromise; + +interface ListCustomRateCardsRef { + ... + (dc: DataConnect): QueryRef; +} +export const listCustomRateCardsRef: ListCustomRateCardsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listCustomRateCardsRef: +```typescript +const name = listCustomRateCardsRef.operationName; +console.log(name); +``` + +### Variables +The `listCustomRateCards` query has no variables. +### Return Type +Recall that executing the `listCustomRateCards` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListCustomRateCardsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListCustomRateCardsData { + customRateCards: ({ + id: UUIDString; + name: string; + baseBook?: string | null; + discount?: number | null; + isDefault?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & CustomRateCard_Key)[]; +} +``` +### Using `listCustomRateCards`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listCustomRateCards } from '@dataconnect/generated'; + + +// Call the `listCustomRateCards()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listCustomRateCards(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listCustomRateCards(dataConnect); + +console.log(data.customRateCards); + +// Or, you can use the `Promise` API. +listCustomRateCards().then((response) => { + const data = response.data; + console.log(data.customRateCards); +}); +``` + +### Using `listCustomRateCards`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listCustomRateCardsRef } from '@dataconnect/generated'; + + +// Call the `listCustomRateCardsRef()` function to get a reference to the query. +const ref = listCustomRateCardsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listCustomRateCardsRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.customRateCards); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.customRateCards); +}); +``` + +## getCustomRateCardById +You can execute the `getCustomRateCardById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getCustomRateCardById(vars: GetCustomRateCardByIdVariables): QueryPromise; + +interface GetCustomRateCardByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetCustomRateCardByIdVariables): QueryRef; +} +export const getCustomRateCardByIdRef: GetCustomRateCardByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getCustomRateCardById(dc: DataConnect, vars: GetCustomRateCardByIdVariables): QueryPromise; + +interface GetCustomRateCardByIdRef { + ... + (dc: DataConnect, vars: GetCustomRateCardByIdVariables): QueryRef; +} +export const getCustomRateCardByIdRef: GetCustomRateCardByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getCustomRateCardByIdRef: +```typescript +const name = getCustomRateCardByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getCustomRateCardById` query requires an argument of type `GetCustomRateCardByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetCustomRateCardByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getCustomRateCardById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetCustomRateCardByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetCustomRateCardByIdData { + customRateCard?: { + id: UUIDString; + name: string; + baseBook?: string | null; + discount?: number | null; + isDefault?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & CustomRateCard_Key; +} +``` +### Using `getCustomRateCardById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getCustomRateCardById, GetCustomRateCardByIdVariables } from '@dataconnect/generated'; + +// The `getCustomRateCardById` query requires an argument of type `GetCustomRateCardByIdVariables`: +const getCustomRateCardByIdVars: GetCustomRateCardByIdVariables = { + id: ..., +}; + +// Call the `getCustomRateCardById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getCustomRateCardById(getCustomRateCardByIdVars); +// Variables can be defined inline as well. +const { data } = await getCustomRateCardById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getCustomRateCardById(dataConnect, getCustomRateCardByIdVars); + +console.log(data.customRateCard); + +// Or, you can use the `Promise` API. +getCustomRateCardById(getCustomRateCardByIdVars).then((response) => { + const data = response.data; + console.log(data.customRateCard); +}); +``` + +### Using `getCustomRateCardById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getCustomRateCardByIdRef, GetCustomRateCardByIdVariables } from '@dataconnect/generated'; + +// The `getCustomRateCardById` query requires an argument of type `GetCustomRateCardByIdVariables`: +const getCustomRateCardByIdVars: GetCustomRateCardByIdVariables = { + id: ..., +}; + +// Call the `getCustomRateCardByIdRef()` function to get a reference to the query. +const ref = getCustomRateCardByIdRef(getCustomRateCardByIdVars); +// Variables can be defined inline as well. +const ref = getCustomRateCardByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getCustomRateCardByIdRef(dataConnect, getCustomRateCardByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.customRateCard); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.customRateCard); +}); +``` + +## listRoleCategories +You can execute the `listRoleCategories` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listRoleCategories(): QueryPromise; + +interface ListRoleCategoriesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listRoleCategoriesRef: ListRoleCategoriesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listRoleCategories(dc: DataConnect): QueryPromise; + +interface ListRoleCategoriesRef { + ... + (dc: DataConnect): QueryRef; +} +export const listRoleCategoriesRef: ListRoleCategoriesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listRoleCategoriesRef: +```typescript +const name = listRoleCategoriesRef.operationName; +console.log(name); +``` + +### Variables +The `listRoleCategories` query has no variables. +### Return Type +Recall that executing the `listRoleCategories` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListRoleCategoriesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListRoleCategoriesData { + roleCategories: ({ + id: UUIDString; + roleName: string; + category: RoleCategoryType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & RoleCategory_Key)[]; +} +``` +### Using `listRoleCategories`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listRoleCategories } from '@dataconnect/generated'; + + +// Call the `listRoleCategories()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listRoleCategories(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listRoleCategories(dataConnect); + +console.log(data.roleCategories); + +// Or, you can use the `Promise` API. +listRoleCategories().then((response) => { + const data = response.data; + console.log(data.roleCategories); +}); +``` + +### Using `listRoleCategories`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listRoleCategoriesRef } from '@dataconnect/generated'; + + +// Call the `listRoleCategoriesRef()` function to get a reference to the query. +const ref = listRoleCategoriesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listRoleCategoriesRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.roleCategories); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.roleCategories); +}); +``` + +## getRoleCategoryById +You can execute the `getRoleCategoryById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getRoleCategoryById(vars: GetRoleCategoryByIdVariables): QueryPromise; + +interface GetRoleCategoryByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetRoleCategoryByIdVariables): QueryRef; +} +export const getRoleCategoryByIdRef: GetRoleCategoryByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getRoleCategoryById(dc: DataConnect, vars: GetRoleCategoryByIdVariables): QueryPromise; + +interface GetRoleCategoryByIdRef { + ... + (dc: DataConnect, vars: GetRoleCategoryByIdVariables): QueryRef; +} +export const getRoleCategoryByIdRef: GetRoleCategoryByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getRoleCategoryByIdRef: +```typescript +const name = getRoleCategoryByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getRoleCategoryById` query requires an argument of type `GetRoleCategoryByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetRoleCategoryByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getRoleCategoryById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetRoleCategoryByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetRoleCategoryByIdData { + roleCategory?: { + id: UUIDString; + roleName: string; + category: RoleCategoryType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & RoleCategory_Key; +} +``` +### Using `getRoleCategoryById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getRoleCategoryById, GetRoleCategoryByIdVariables } from '@dataconnect/generated'; + +// The `getRoleCategoryById` query requires an argument of type `GetRoleCategoryByIdVariables`: +const getRoleCategoryByIdVars: GetRoleCategoryByIdVariables = { + id: ..., +}; + +// Call the `getRoleCategoryById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getRoleCategoryById(getRoleCategoryByIdVars); +// Variables can be defined inline as well. +const { data } = await getRoleCategoryById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getRoleCategoryById(dataConnect, getRoleCategoryByIdVars); + +console.log(data.roleCategory); + +// Or, you can use the `Promise` API. +getRoleCategoryById(getRoleCategoryByIdVars).then((response) => { + const data = response.data; + console.log(data.roleCategory); +}); +``` + +### Using `getRoleCategoryById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getRoleCategoryByIdRef, GetRoleCategoryByIdVariables } from '@dataconnect/generated'; + +// The `getRoleCategoryById` query requires an argument of type `GetRoleCategoryByIdVariables`: +const getRoleCategoryByIdVars: GetRoleCategoryByIdVariables = { + id: ..., +}; + +// Call the `getRoleCategoryByIdRef()` function to get a reference to the query. +const ref = getRoleCategoryByIdRef(getRoleCategoryByIdVars); +// Variables can be defined inline as well. +const ref = getRoleCategoryByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getRoleCategoryByIdRef(dataConnect, getRoleCategoryByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.roleCategory); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.roleCategory); +}); +``` + +## getRoleCategoriesByCategory +You can execute the `getRoleCategoriesByCategory` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getRoleCategoriesByCategory(vars: GetRoleCategoriesByCategoryVariables): QueryPromise; + +interface GetRoleCategoriesByCategoryRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetRoleCategoriesByCategoryVariables): QueryRef; +} +export const getRoleCategoriesByCategoryRef: GetRoleCategoriesByCategoryRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getRoleCategoriesByCategory(dc: DataConnect, vars: GetRoleCategoriesByCategoryVariables): QueryPromise; + +interface GetRoleCategoriesByCategoryRef { + ... + (dc: DataConnect, vars: GetRoleCategoriesByCategoryVariables): QueryRef; +} +export const getRoleCategoriesByCategoryRef: GetRoleCategoriesByCategoryRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getRoleCategoriesByCategoryRef: +```typescript +const name = getRoleCategoriesByCategoryRef.operationName; +console.log(name); +``` + +### Variables +The `getRoleCategoriesByCategory` query requires an argument of type `GetRoleCategoriesByCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetRoleCategoriesByCategoryVariables { + category: RoleCategoryType; +} +``` +### Return Type +Recall that executing the `getRoleCategoriesByCategory` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetRoleCategoriesByCategoryData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetRoleCategoriesByCategoryData { + roleCategories: ({ + id: UUIDString; + roleName: string; + category: RoleCategoryType; + } & RoleCategory_Key)[]; +} +``` +### Using `getRoleCategoriesByCategory`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getRoleCategoriesByCategory, GetRoleCategoriesByCategoryVariables } from '@dataconnect/generated'; + +// The `getRoleCategoriesByCategory` query requires an argument of type `GetRoleCategoriesByCategoryVariables`: +const getRoleCategoriesByCategoryVars: GetRoleCategoriesByCategoryVariables = { + category: ..., +}; + +// Call the `getRoleCategoriesByCategory()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getRoleCategoriesByCategory(getRoleCategoriesByCategoryVars); +// Variables can be defined inline as well. +const { data } = await getRoleCategoriesByCategory({ category: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getRoleCategoriesByCategory(dataConnect, getRoleCategoriesByCategoryVars); + +console.log(data.roleCategories); + +// Or, you can use the `Promise` API. +getRoleCategoriesByCategory(getRoleCategoriesByCategoryVars).then((response) => { + const data = response.data; + console.log(data.roleCategories); +}); +``` + +### Using `getRoleCategoriesByCategory`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getRoleCategoriesByCategoryRef, GetRoleCategoriesByCategoryVariables } from '@dataconnect/generated'; + +// The `getRoleCategoriesByCategory` query requires an argument of type `GetRoleCategoriesByCategoryVariables`: +const getRoleCategoriesByCategoryVars: GetRoleCategoriesByCategoryVariables = { + category: ..., +}; + +// Call the `getRoleCategoriesByCategoryRef()` function to get a reference to the query. +const ref = getRoleCategoriesByCategoryRef(getRoleCategoriesByCategoryVars); +// Variables can be defined inline as well. +const ref = getRoleCategoriesByCategoryRef({ category: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getRoleCategoriesByCategoryRef(dataConnect, getRoleCategoriesByCategoryVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.roleCategories); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.roleCategories); +}); +``` + +## listStaffAvailabilities +You can execute the `listStaffAvailabilities` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffAvailabilities(vars?: ListStaffAvailabilitiesVariables): QueryPromise; + +interface ListStaffAvailabilitiesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListStaffAvailabilitiesVariables): QueryRef; +} +export const listStaffAvailabilitiesRef: ListStaffAvailabilitiesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffAvailabilities(dc: DataConnect, vars?: ListStaffAvailabilitiesVariables): QueryPromise; + +interface ListStaffAvailabilitiesRef { + ... + (dc: DataConnect, vars?: ListStaffAvailabilitiesVariables): QueryRef; +} +export const listStaffAvailabilitiesRef: ListStaffAvailabilitiesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffAvailabilitiesRef: +```typescript +const name = listStaffAvailabilitiesRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffAvailabilities` query has an optional argument of type `ListStaffAvailabilitiesVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffAvailabilitiesVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listStaffAvailabilities` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffAvailabilitiesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffAvailabilitiesData { + staffAvailabilities: ({ + id: UUIDString; + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status: AvailabilityStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailability_Key)[]; +} +``` +### Using `listStaffAvailabilities`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffAvailabilities, ListStaffAvailabilitiesVariables } from '@dataconnect/generated'; + +// The `listStaffAvailabilities` query has an optional argument of type `ListStaffAvailabilitiesVariables`: +const listStaffAvailabilitiesVars: ListStaffAvailabilitiesVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffAvailabilities()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffAvailabilities(listStaffAvailabilitiesVars); +// Variables can be defined inline as well. +const { data } = await listStaffAvailabilities({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListStaffAvailabilitiesVariables` argument. +const { data } = await listStaffAvailabilities(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffAvailabilities(dataConnect, listStaffAvailabilitiesVars); + +console.log(data.staffAvailabilities); + +// Or, you can use the `Promise` API. +listStaffAvailabilities(listStaffAvailabilitiesVars).then((response) => { + const data = response.data; + console.log(data.staffAvailabilities); +}); +``` + +### Using `listStaffAvailabilities`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffAvailabilitiesRef, ListStaffAvailabilitiesVariables } from '@dataconnect/generated'; + +// The `listStaffAvailabilities` query has an optional argument of type `ListStaffAvailabilitiesVariables`: +const listStaffAvailabilitiesVars: ListStaffAvailabilitiesVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffAvailabilitiesRef()` function to get a reference to the query. +const ref = listStaffAvailabilitiesRef(listStaffAvailabilitiesVars); +// Variables can be defined inline as well. +const ref = listStaffAvailabilitiesRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListStaffAvailabilitiesVariables` argument. +const ref = listStaffAvailabilitiesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffAvailabilitiesRef(dataConnect, listStaffAvailabilitiesVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffAvailabilities); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffAvailabilities); +}); +``` + +## listStaffAvailabilitiesByStaffId +You can execute the `listStaffAvailabilitiesByStaffId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffAvailabilitiesByStaffId(vars: ListStaffAvailabilitiesByStaffIdVariables): QueryPromise; + +interface ListStaffAvailabilitiesByStaffIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffAvailabilitiesByStaffIdVariables): QueryRef; +} +export const listStaffAvailabilitiesByStaffIdRef: ListStaffAvailabilitiesByStaffIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffAvailabilitiesByStaffId(dc: DataConnect, vars: ListStaffAvailabilitiesByStaffIdVariables): QueryPromise; + +interface ListStaffAvailabilitiesByStaffIdRef { + ... + (dc: DataConnect, vars: ListStaffAvailabilitiesByStaffIdVariables): QueryRef; +} +export const listStaffAvailabilitiesByStaffIdRef: ListStaffAvailabilitiesByStaffIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffAvailabilitiesByStaffIdRef: +```typescript +const name = listStaffAvailabilitiesByStaffIdRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffAvailabilitiesByStaffId` query requires an argument of type `ListStaffAvailabilitiesByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffAvailabilitiesByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listStaffAvailabilitiesByStaffId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffAvailabilitiesByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffAvailabilitiesByStaffIdData { + staffAvailabilities: ({ + id: UUIDString; + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status: AvailabilityStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailability_Key)[]; +} +``` +### Using `listStaffAvailabilitiesByStaffId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffAvailabilitiesByStaffId, ListStaffAvailabilitiesByStaffIdVariables } from '@dataconnect/generated'; + +// The `listStaffAvailabilitiesByStaffId` query requires an argument of type `ListStaffAvailabilitiesByStaffIdVariables`: +const listStaffAvailabilitiesByStaffIdVars: ListStaffAvailabilitiesByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffAvailabilitiesByStaffId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffAvailabilitiesByStaffId(listStaffAvailabilitiesByStaffIdVars); +// Variables can be defined inline as well. +const { data } = await listStaffAvailabilitiesByStaffId({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffAvailabilitiesByStaffId(dataConnect, listStaffAvailabilitiesByStaffIdVars); + +console.log(data.staffAvailabilities); + +// Or, you can use the `Promise` API. +listStaffAvailabilitiesByStaffId(listStaffAvailabilitiesByStaffIdVars).then((response) => { + const data = response.data; + console.log(data.staffAvailabilities); +}); +``` + +### Using `listStaffAvailabilitiesByStaffId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffAvailabilitiesByStaffIdRef, ListStaffAvailabilitiesByStaffIdVariables } from '@dataconnect/generated'; + +// The `listStaffAvailabilitiesByStaffId` query requires an argument of type `ListStaffAvailabilitiesByStaffIdVariables`: +const listStaffAvailabilitiesByStaffIdVars: ListStaffAvailabilitiesByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffAvailabilitiesByStaffIdRef()` function to get a reference to the query. +const ref = listStaffAvailabilitiesByStaffIdRef(listStaffAvailabilitiesByStaffIdVars); +// Variables can be defined inline as well. +const ref = listStaffAvailabilitiesByStaffIdRef({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffAvailabilitiesByStaffIdRef(dataConnect, listStaffAvailabilitiesByStaffIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffAvailabilities); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffAvailabilities); +}); +``` + +## getStaffAvailabilityByKey +You can execute the `getStaffAvailabilityByKey` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getStaffAvailabilityByKey(vars: GetStaffAvailabilityByKeyVariables): QueryPromise; + +interface GetStaffAvailabilityByKeyRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffAvailabilityByKeyVariables): QueryRef; +} +export const getStaffAvailabilityByKeyRef: GetStaffAvailabilityByKeyRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getStaffAvailabilityByKey(dc: DataConnect, vars: GetStaffAvailabilityByKeyVariables): QueryPromise; + +interface GetStaffAvailabilityByKeyRef { + ... + (dc: DataConnect, vars: GetStaffAvailabilityByKeyVariables): QueryRef; +} +export const getStaffAvailabilityByKeyRef: GetStaffAvailabilityByKeyRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getStaffAvailabilityByKeyRef: +```typescript +const name = getStaffAvailabilityByKeyRef.operationName; +console.log(name); +``` + +### Variables +The `getStaffAvailabilityByKey` query requires an argument of type `GetStaffAvailabilityByKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetStaffAvailabilityByKeyVariables { + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; +} +``` +### Return Type +Recall that executing the `getStaffAvailabilityByKey` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetStaffAvailabilityByKeyData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetStaffAvailabilityByKeyData { + staffAvailability?: { + id: UUIDString; + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status: AvailabilityStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailability_Key; +} +``` +### Using `getStaffAvailabilityByKey`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getStaffAvailabilityByKey, GetStaffAvailabilityByKeyVariables } from '@dataconnect/generated'; + +// The `getStaffAvailabilityByKey` query requires an argument of type `GetStaffAvailabilityByKeyVariables`: +const getStaffAvailabilityByKeyVars: GetStaffAvailabilityByKeyVariables = { + staffId: ..., + day: ..., + slot: ..., +}; + +// Call the `getStaffAvailabilityByKey()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getStaffAvailabilityByKey(getStaffAvailabilityByKeyVars); +// Variables can be defined inline as well. +const { data } = await getStaffAvailabilityByKey({ staffId: ..., day: ..., slot: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getStaffAvailabilityByKey(dataConnect, getStaffAvailabilityByKeyVars); + +console.log(data.staffAvailability); + +// Or, you can use the `Promise` API. +getStaffAvailabilityByKey(getStaffAvailabilityByKeyVars).then((response) => { + const data = response.data; + console.log(data.staffAvailability); +}); +``` + +### Using `getStaffAvailabilityByKey`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getStaffAvailabilityByKeyRef, GetStaffAvailabilityByKeyVariables } from '@dataconnect/generated'; + +// The `getStaffAvailabilityByKey` query requires an argument of type `GetStaffAvailabilityByKeyVariables`: +const getStaffAvailabilityByKeyVars: GetStaffAvailabilityByKeyVariables = { + staffId: ..., + day: ..., + slot: ..., +}; + +// Call the `getStaffAvailabilityByKeyRef()` function to get a reference to the query. +const ref = getStaffAvailabilityByKeyRef(getStaffAvailabilityByKeyVars); +// Variables can be defined inline as well. +const ref = getStaffAvailabilityByKeyRef({ staffId: ..., day: ..., slot: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getStaffAvailabilityByKeyRef(dataConnect, getStaffAvailabilityByKeyVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffAvailability); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffAvailability); +}); +``` + +## listStaffAvailabilitiesByDay +You can execute the `listStaffAvailabilitiesByDay` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffAvailabilitiesByDay(vars: ListStaffAvailabilitiesByDayVariables): QueryPromise; + +interface ListStaffAvailabilitiesByDayRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffAvailabilitiesByDayVariables): QueryRef; +} +export const listStaffAvailabilitiesByDayRef: ListStaffAvailabilitiesByDayRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffAvailabilitiesByDay(dc: DataConnect, vars: ListStaffAvailabilitiesByDayVariables): QueryPromise; + +interface ListStaffAvailabilitiesByDayRef { + ... + (dc: DataConnect, vars: ListStaffAvailabilitiesByDayVariables): QueryRef; +} +export const listStaffAvailabilitiesByDayRef: ListStaffAvailabilitiesByDayRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffAvailabilitiesByDayRef: +```typescript +const name = listStaffAvailabilitiesByDayRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffAvailabilitiesByDay` query requires an argument of type `ListStaffAvailabilitiesByDayVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffAvailabilitiesByDayVariables { + day: DayOfWeek; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listStaffAvailabilitiesByDay` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffAvailabilitiesByDayData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffAvailabilitiesByDayData { + staffAvailabilities: ({ + id: UUIDString; + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status: AvailabilityStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailability_Key)[]; +} +``` +### Using `listStaffAvailabilitiesByDay`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffAvailabilitiesByDay, ListStaffAvailabilitiesByDayVariables } from '@dataconnect/generated'; + +// The `listStaffAvailabilitiesByDay` query requires an argument of type `ListStaffAvailabilitiesByDayVariables`: +const listStaffAvailabilitiesByDayVars: ListStaffAvailabilitiesByDayVariables = { + day: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffAvailabilitiesByDay()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffAvailabilitiesByDay(listStaffAvailabilitiesByDayVars); +// Variables can be defined inline as well. +const { data } = await listStaffAvailabilitiesByDay({ day: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffAvailabilitiesByDay(dataConnect, listStaffAvailabilitiesByDayVars); + +console.log(data.staffAvailabilities); + +// Or, you can use the `Promise` API. +listStaffAvailabilitiesByDay(listStaffAvailabilitiesByDayVars).then((response) => { + const data = response.data; + console.log(data.staffAvailabilities); +}); +``` + +### Using `listStaffAvailabilitiesByDay`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffAvailabilitiesByDayRef, ListStaffAvailabilitiesByDayVariables } from '@dataconnect/generated'; + +// The `listStaffAvailabilitiesByDay` query requires an argument of type `ListStaffAvailabilitiesByDayVariables`: +const listStaffAvailabilitiesByDayVars: ListStaffAvailabilitiesByDayVariables = { + day: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffAvailabilitiesByDayRef()` function to get a reference to the query. +const ref = listStaffAvailabilitiesByDayRef(listStaffAvailabilitiesByDayVars); +// Variables can be defined inline as well. +const ref = listStaffAvailabilitiesByDayRef({ day: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffAvailabilitiesByDayRef(dataConnect, listStaffAvailabilitiesByDayVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffAvailabilities); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffAvailabilities); +}); +``` + +## listRecentPayments +You can execute the `listRecentPayments` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listRecentPayments(vars?: ListRecentPaymentsVariables): QueryPromise; + +interface ListRecentPaymentsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListRecentPaymentsVariables): QueryRef; +} +export const listRecentPaymentsRef: ListRecentPaymentsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listRecentPayments(dc: DataConnect, vars?: ListRecentPaymentsVariables): QueryPromise; + +interface ListRecentPaymentsRef { + ... + (dc: DataConnect, vars?: ListRecentPaymentsVariables): QueryRef; +} +export const listRecentPaymentsRef: ListRecentPaymentsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listRecentPaymentsRef: +```typescript +const name = listRecentPaymentsRef.operationName; +console.log(name); +``` + +### Variables +The `listRecentPayments` query has an optional argument of type `ListRecentPaymentsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListRecentPaymentsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listRecentPayments` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListRecentPaymentsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListRecentPaymentsData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + role: { + name: string; + costPerHour: number; + }; + shift: { + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + description?: string | null; + }; + }; + }; + invoice: { + status: InvoiceStatus; + invoiceNumber: string; + issueDate: TimestampString; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + }; + } & RecentPayment_Key)[]; +} +``` +### Using `listRecentPayments`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listRecentPayments, ListRecentPaymentsVariables } from '@dataconnect/generated'; + +// The `listRecentPayments` query has an optional argument of type `ListRecentPaymentsVariables`: +const listRecentPaymentsVars: ListRecentPaymentsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPayments()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listRecentPayments(listRecentPaymentsVars); +// Variables can be defined inline as well. +const { data } = await listRecentPayments({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListRecentPaymentsVariables` argument. +const { data } = await listRecentPayments(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listRecentPayments(dataConnect, listRecentPaymentsVars); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +listRecentPayments(listRecentPaymentsVars).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +### Using `listRecentPayments`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listRecentPaymentsRef, ListRecentPaymentsVariables } from '@dataconnect/generated'; + +// The `listRecentPayments` query has an optional argument of type `ListRecentPaymentsVariables`: +const listRecentPaymentsVars: ListRecentPaymentsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPaymentsRef()` function to get a reference to the query. +const ref = listRecentPaymentsRef(listRecentPaymentsVars); +// Variables can be defined inline as well. +const ref = listRecentPaymentsRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListRecentPaymentsVariables` argument. +const ref = listRecentPaymentsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listRecentPaymentsRef(dataConnect, listRecentPaymentsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +## getRecentPaymentById +You can execute the `getRecentPaymentById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getRecentPaymentById(vars: GetRecentPaymentByIdVariables): QueryPromise; + +interface GetRecentPaymentByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetRecentPaymentByIdVariables): QueryRef; +} +export const getRecentPaymentByIdRef: GetRecentPaymentByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getRecentPaymentById(dc: DataConnect, vars: GetRecentPaymentByIdVariables): QueryPromise; + +interface GetRecentPaymentByIdRef { + ... + (dc: DataConnect, vars: GetRecentPaymentByIdVariables): QueryRef; +} +export const getRecentPaymentByIdRef: GetRecentPaymentByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getRecentPaymentByIdRef: +```typescript +const name = getRecentPaymentByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getRecentPaymentById` query requires an argument of type `GetRecentPaymentByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetRecentPaymentByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getRecentPaymentById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetRecentPaymentByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetRecentPaymentByIdData { + recentPayment?: { + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + role: { + name: string; + costPerHour: number; + }; + shift: { + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + description?: string | null; + }; + }; + }; + invoice: { + status: InvoiceStatus; + invoiceNumber: string; + issueDate: TimestampString; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + }; + } & RecentPayment_Key; +} +``` +### Using `getRecentPaymentById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getRecentPaymentById, GetRecentPaymentByIdVariables } from '@dataconnect/generated'; + +// The `getRecentPaymentById` query requires an argument of type `GetRecentPaymentByIdVariables`: +const getRecentPaymentByIdVars: GetRecentPaymentByIdVariables = { + id: ..., +}; + +// Call the `getRecentPaymentById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getRecentPaymentById(getRecentPaymentByIdVars); +// Variables can be defined inline as well. +const { data } = await getRecentPaymentById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getRecentPaymentById(dataConnect, getRecentPaymentByIdVars); + +console.log(data.recentPayment); + +// Or, you can use the `Promise` API. +getRecentPaymentById(getRecentPaymentByIdVars).then((response) => { + const data = response.data; + console.log(data.recentPayment); +}); +``` + +### Using `getRecentPaymentById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getRecentPaymentByIdRef, GetRecentPaymentByIdVariables } from '@dataconnect/generated'; + +// The `getRecentPaymentById` query requires an argument of type `GetRecentPaymentByIdVariables`: +const getRecentPaymentByIdVars: GetRecentPaymentByIdVariables = { + id: ..., +}; + +// Call the `getRecentPaymentByIdRef()` function to get a reference to the query. +const ref = getRecentPaymentByIdRef(getRecentPaymentByIdVars); +// Variables can be defined inline as well. +const ref = getRecentPaymentByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getRecentPaymentByIdRef(dataConnect, getRecentPaymentByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.recentPayment); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.recentPayment); +}); +``` + +## listRecentPaymentsByStaffId +You can execute the `listRecentPaymentsByStaffId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listRecentPaymentsByStaffId(vars: ListRecentPaymentsByStaffIdVariables): QueryPromise; + +interface ListRecentPaymentsByStaffIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRecentPaymentsByStaffIdVariables): QueryRef; +} +export const listRecentPaymentsByStaffIdRef: ListRecentPaymentsByStaffIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listRecentPaymentsByStaffId(dc: DataConnect, vars: ListRecentPaymentsByStaffIdVariables): QueryPromise; + +interface ListRecentPaymentsByStaffIdRef { + ... + (dc: DataConnect, vars: ListRecentPaymentsByStaffIdVariables): QueryRef; +} +export const listRecentPaymentsByStaffIdRef: ListRecentPaymentsByStaffIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listRecentPaymentsByStaffIdRef: +```typescript +const name = listRecentPaymentsByStaffIdRef.operationName; +console.log(name); +``` + +### Variables +The `listRecentPaymentsByStaffId` query requires an argument of type `ListRecentPaymentsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListRecentPaymentsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listRecentPaymentsByStaffId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListRecentPaymentsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListRecentPaymentsByStaffIdData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + status: ApplicationStatus; + shiftRole: { + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} +``` +### Using `listRecentPaymentsByStaffId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listRecentPaymentsByStaffId, ListRecentPaymentsByStaffIdVariables } from '@dataconnect/generated'; + +// The `listRecentPaymentsByStaffId` query requires an argument of type `ListRecentPaymentsByStaffIdVariables`: +const listRecentPaymentsByStaffIdVars: ListRecentPaymentsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPaymentsByStaffId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listRecentPaymentsByStaffId(listRecentPaymentsByStaffIdVars); +// Variables can be defined inline as well. +const { data } = await listRecentPaymentsByStaffId({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listRecentPaymentsByStaffId(dataConnect, listRecentPaymentsByStaffIdVars); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +listRecentPaymentsByStaffId(listRecentPaymentsByStaffIdVars).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +### Using `listRecentPaymentsByStaffId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listRecentPaymentsByStaffIdRef, ListRecentPaymentsByStaffIdVariables } from '@dataconnect/generated'; + +// The `listRecentPaymentsByStaffId` query requires an argument of type `ListRecentPaymentsByStaffIdVariables`: +const listRecentPaymentsByStaffIdVars: ListRecentPaymentsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPaymentsByStaffIdRef()` function to get a reference to the query. +const ref = listRecentPaymentsByStaffIdRef(listRecentPaymentsByStaffIdVars); +// Variables can be defined inline as well. +const ref = listRecentPaymentsByStaffIdRef({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listRecentPaymentsByStaffIdRef(dataConnect, listRecentPaymentsByStaffIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +## listRecentPaymentsByApplicationId +You can execute the `listRecentPaymentsByApplicationId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listRecentPaymentsByApplicationId(vars: ListRecentPaymentsByApplicationIdVariables): QueryPromise; + +interface ListRecentPaymentsByApplicationIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRecentPaymentsByApplicationIdVariables): QueryRef; +} +export const listRecentPaymentsByApplicationIdRef: ListRecentPaymentsByApplicationIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listRecentPaymentsByApplicationId(dc: DataConnect, vars: ListRecentPaymentsByApplicationIdVariables): QueryPromise; + +interface ListRecentPaymentsByApplicationIdRef { + ... + (dc: DataConnect, vars: ListRecentPaymentsByApplicationIdVariables): QueryRef; +} +export const listRecentPaymentsByApplicationIdRef: ListRecentPaymentsByApplicationIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listRecentPaymentsByApplicationIdRef: +```typescript +const name = listRecentPaymentsByApplicationIdRef.operationName; +console.log(name); +``` + +### Variables +The `listRecentPaymentsByApplicationId` query requires an argument of type `ListRecentPaymentsByApplicationIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListRecentPaymentsByApplicationIdVariables { + applicationId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listRecentPaymentsByApplicationId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListRecentPaymentsByApplicationIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListRecentPaymentsByApplicationIdData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + status: ApplicationStatus; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} +``` +### Using `listRecentPaymentsByApplicationId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listRecentPaymentsByApplicationId, ListRecentPaymentsByApplicationIdVariables } from '@dataconnect/generated'; + +// The `listRecentPaymentsByApplicationId` query requires an argument of type `ListRecentPaymentsByApplicationIdVariables`: +const listRecentPaymentsByApplicationIdVars: ListRecentPaymentsByApplicationIdVariables = { + applicationId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPaymentsByApplicationId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listRecentPaymentsByApplicationId(listRecentPaymentsByApplicationIdVars); +// Variables can be defined inline as well. +const { data } = await listRecentPaymentsByApplicationId({ applicationId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listRecentPaymentsByApplicationId(dataConnect, listRecentPaymentsByApplicationIdVars); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +listRecentPaymentsByApplicationId(listRecentPaymentsByApplicationIdVars).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +### Using `listRecentPaymentsByApplicationId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listRecentPaymentsByApplicationIdRef, ListRecentPaymentsByApplicationIdVariables } from '@dataconnect/generated'; + +// The `listRecentPaymentsByApplicationId` query requires an argument of type `ListRecentPaymentsByApplicationIdVariables`: +const listRecentPaymentsByApplicationIdVars: ListRecentPaymentsByApplicationIdVariables = { + applicationId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPaymentsByApplicationIdRef()` function to get a reference to the query. +const ref = listRecentPaymentsByApplicationIdRef(listRecentPaymentsByApplicationIdVars); +// Variables can be defined inline as well. +const ref = listRecentPaymentsByApplicationIdRef({ applicationId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listRecentPaymentsByApplicationIdRef(dataConnect, listRecentPaymentsByApplicationIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +## listRecentPaymentsByInvoiceId +You can execute the `listRecentPaymentsByInvoiceId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listRecentPaymentsByInvoiceId(vars: ListRecentPaymentsByInvoiceIdVariables): QueryPromise; + +interface ListRecentPaymentsByInvoiceIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRecentPaymentsByInvoiceIdVariables): QueryRef; +} +export const listRecentPaymentsByInvoiceIdRef: ListRecentPaymentsByInvoiceIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listRecentPaymentsByInvoiceId(dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdVariables): QueryPromise; + +interface ListRecentPaymentsByInvoiceIdRef { + ... + (dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdVariables): QueryRef; +} +export const listRecentPaymentsByInvoiceIdRef: ListRecentPaymentsByInvoiceIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listRecentPaymentsByInvoiceIdRef: +```typescript +const name = listRecentPaymentsByInvoiceIdRef.operationName; +console.log(name); +``` + +### Variables +The `listRecentPaymentsByInvoiceId` query requires an argument of type `ListRecentPaymentsByInvoiceIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListRecentPaymentsByInvoiceIdVariables { + invoiceId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listRecentPaymentsByInvoiceId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListRecentPaymentsByInvoiceIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListRecentPaymentsByInvoiceIdData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + staffId: UUIDString; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} +``` +### Using `listRecentPaymentsByInvoiceId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listRecentPaymentsByInvoiceId, ListRecentPaymentsByInvoiceIdVariables } from '@dataconnect/generated'; + +// The `listRecentPaymentsByInvoiceId` query requires an argument of type `ListRecentPaymentsByInvoiceIdVariables`: +const listRecentPaymentsByInvoiceIdVars: ListRecentPaymentsByInvoiceIdVariables = { + invoiceId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPaymentsByInvoiceId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listRecentPaymentsByInvoiceId(listRecentPaymentsByInvoiceIdVars); +// Variables can be defined inline as well. +const { data } = await listRecentPaymentsByInvoiceId({ invoiceId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listRecentPaymentsByInvoiceId(dataConnect, listRecentPaymentsByInvoiceIdVars); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +listRecentPaymentsByInvoiceId(listRecentPaymentsByInvoiceIdVars).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +### Using `listRecentPaymentsByInvoiceId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listRecentPaymentsByInvoiceIdRef, ListRecentPaymentsByInvoiceIdVariables } from '@dataconnect/generated'; + +// The `listRecentPaymentsByInvoiceId` query requires an argument of type `ListRecentPaymentsByInvoiceIdVariables`: +const listRecentPaymentsByInvoiceIdVars: ListRecentPaymentsByInvoiceIdVariables = { + invoiceId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPaymentsByInvoiceIdRef()` function to get a reference to the query. +const ref = listRecentPaymentsByInvoiceIdRef(listRecentPaymentsByInvoiceIdVars); +// Variables can be defined inline as well. +const ref = listRecentPaymentsByInvoiceIdRef({ invoiceId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listRecentPaymentsByInvoiceIdRef(dataConnect, listRecentPaymentsByInvoiceIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +## listRecentPaymentsByStatus +You can execute the `listRecentPaymentsByStatus` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listRecentPaymentsByStatus(vars: ListRecentPaymentsByStatusVariables): QueryPromise; + +interface ListRecentPaymentsByStatusRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRecentPaymentsByStatusVariables): QueryRef; +} +export const listRecentPaymentsByStatusRef: ListRecentPaymentsByStatusRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listRecentPaymentsByStatus(dc: DataConnect, vars: ListRecentPaymentsByStatusVariables): QueryPromise; + +interface ListRecentPaymentsByStatusRef { + ... + (dc: DataConnect, vars: ListRecentPaymentsByStatusVariables): QueryRef; +} +export const listRecentPaymentsByStatusRef: ListRecentPaymentsByStatusRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listRecentPaymentsByStatusRef: +```typescript +const name = listRecentPaymentsByStatusRef.operationName; +console.log(name); +``` + +### Variables +The `listRecentPaymentsByStatus` query requires an argument of type `ListRecentPaymentsByStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListRecentPaymentsByStatusVariables { + status: RecentPaymentStatus; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listRecentPaymentsByStatus` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListRecentPaymentsByStatusData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListRecentPaymentsByStatusData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} +``` +### Using `listRecentPaymentsByStatus`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listRecentPaymentsByStatus, ListRecentPaymentsByStatusVariables } from '@dataconnect/generated'; + +// The `listRecentPaymentsByStatus` query requires an argument of type `ListRecentPaymentsByStatusVariables`: +const listRecentPaymentsByStatusVars: ListRecentPaymentsByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPaymentsByStatus()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listRecentPaymentsByStatus(listRecentPaymentsByStatusVars); +// Variables can be defined inline as well. +const { data } = await listRecentPaymentsByStatus({ status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listRecentPaymentsByStatus(dataConnect, listRecentPaymentsByStatusVars); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +listRecentPaymentsByStatus(listRecentPaymentsByStatusVars).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +### Using `listRecentPaymentsByStatus`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listRecentPaymentsByStatusRef, ListRecentPaymentsByStatusVariables } from '@dataconnect/generated'; + +// The `listRecentPaymentsByStatus` query requires an argument of type `ListRecentPaymentsByStatusVariables`: +const listRecentPaymentsByStatusVars: ListRecentPaymentsByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPaymentsByStatusRef()` function to get a reference to the query. +const ref = listRecentPaymentsByStatusRef(listRecentPaymentsByStatusVars); +// Variables can be defined inline as well. +const ref = listRecentPaymentsByStatusRef({ status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listRecentPaymentsByStatusRef(dataConnect, listRecentPaymentsByStatusVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +## listRecentPaymentsByInvoiceIds +You can execute the `listRecentPaymentsByInvoiceIds` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listRecentPaymentsByInvoiceIds(vars: ListRecentPaymentsByInvoiceIdsVariables): QueryPromise; + +interface ListRecentPaymentsByInvoiceIdsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRecentPaymentsByInvoiceIdsVariables): QueryRef; +} +export const listRecentPaymentsByInvoiceIdsRef: ListRecentPaymentsByInvoiceIdsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listRecentPaymentsByInvoiceIds(dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdsVariables): QueryPromise; + +interface ListRecentPaymentsByInvoiceIdsRef { + ... + (dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdsVariables): QueryRef; +} +export const listRecentPaymentsByInvoiceIdsRef: ListRecentPaymentsByInvoiceIdsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listRecentPaymentsByInvoiceIdsRef: +```typescript +const name = listRecentPaymentsByInvoiceIdsRef.operationName; +console.log(name); +``` + +### Variables +The `listRecentPaymentsByInvoiceIds` query requires an argument of type `ListRecentPaymentsByInvoiceIdsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListRecentPaymentsByInvoiceIdsVariables { + invoiceIds: UUIDString[]; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listRecentPaymentsByInvoiceIds` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListRecentPaymentsByInvoiceIdsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListRecentPaymentsByInvoiceIdsData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} +``` +### Using `listRecentPaymentsByInvoiceIds`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listRecentPaymentsByInvoiceIds, ListRecentPaymentsByInvoiceIdsVariables } from '@dataconnect/generated'; + +// The `listRecentPaymentsByInvoiceIds` query requires an argument of type `ListRecentPaymentsByInvoiceIdsVariables`: +const listRecentPaymentsByInvoiceIdsVars: ListRecentPaymentsByInvoiceIdsVariables = { + invoiceIds: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPaymentsByInvoiceIds()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listRecentPaymentsByInvoiceIds(listRecentPaymentsByInvoiceIdsVars); +// Variables can be defined inline as well. +const { data } = await listRecentPaymentsByInvoiceIds({ invoiceIds: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listRecentPaymentsByInvoiceIds(dataConnect, listRecentPaymentsByInvoiceIdsVars); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +listRecentPaymentsByInvoiceIds(listRecentPaymentsByInvoiceIdsVars).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +### Using `listRecentPaymentsByInvoiceIds`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listRecentPaymentsByInvoiceIdsRef, ListRecentPaymentsByInvoiceIdsVariables } from '@dataconnect/generated'; + +// The `listRecentPaymentsByInvoiceIds` query requires an argument of type `ListRecentPaymentsByInvoiceIdsVariables`: +const listRecentPaymentsByInvoiceIdsVars: ListRecentPaymentsByInvoiceIdsVariables = { + invoiceIds: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPaymentsByInvoiceIdsRef()` function to get a reference to the query. +const ref = listRecentPaymentsByInvoiceIdsRef(listRecentPaymentsByInvoiceIdsVars); +// Variables can be defined inline as well. +const ref = listRecentPaymentsByInvoiceIdsRef({ invoiceIds: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listRecentPaymentsByInvoiceIdsRef(dataConnect, listRecentPaymentsByInvoiceIdsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +## listRecentPaymentsByBusinessId +You can execute the `listRecentPaymentsByBusinessId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listRecentPaymentsByBusinessId(vars: ListRecentPaymentsByBusinessIdVariables): QueryPromise; + +interface ListRecentPaymentsByBusinessIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRecentPaymentsByBusinessIdVariables): QueryRef; +} +export const listRecentPaymentsByBusinessIdRef: ListRecentPaymentsByBusinessIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listRecentPaymentsByBusinessId(dc: DataConnect, vars: ListRecentPaymentsByBusinessIdVariables): QueryPromise; + +interface ListRecentPaymentsByBusinessIdRef { + ... + (dc: DataConnect, vars: ListRecentPaymentsByBusinessIdVariables): QueryRef; +} +export const listRecentPaymentsByBusinessIdRef: ListRecentPaymentsByBusinessIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listRecentPaymentsByBusinessIdRef: +```typescript +const name = listRecentPaymentsByBusinessIdRef.operationName; +console.log(name); +``` + +### Variables +The `listRecentPaymentsByBusinessId` query requires an argument of type `ListRecentPaymentsByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListRecentPaymentsByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listRecentPaymentsByBusinessId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListRecentPaymentsByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListRecentPaymentsByBusinessIdData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + staffId: UUIDString; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + shiftRole: { + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + description?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} +``` +### Using `listRecentPaymentsByBusinessId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listRecentPaymentsByBusinessId, ListRecentPaymentsByBusinessIdVariables } from '@dataconnect/generated'; + +// The `listRecentPaymentsByBusinessId` query requires an argument of type `ListRecentPaymentsByBusinessIdVariables`: +const listRecentPaymentsByBusinessIdVars: ListRecentPaymentsByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPaymentsByBusinessId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listRecentPaymentsByBusinessId(listRecentPaymentsByBusinessIdVars); +// Variables can be defined inline as well. +const { data } = await listRecentPaymentsByBusinessId({ businessId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listRecentPaymentsByBusinessId(dataConnect, listRecentPaymentsByBusinessIdVars); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +listRecentPaymentsByBusinessId(listRecentPaymentsByBusinessIdVars).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +### Using `listRecentPaymentsByBusinessId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listRecentPaymentsByBusinessIdRef, ListRecentPaymentsByBusinessIdVariables } from '@dataconnect/generated'; + +// The `listRecentPaymentsByBusinessId` query requires an argument of type `ListRecentPaymentsByBusinessIdVariables`: +const listRecentPaymentsByBusinessIdVars: ListRecentPaymentsByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listRecentPaymentsByBusinessIdRef()` function to get a reference to the query. +const ref = listRecentPaymentsByBusinessIdRef(listRecentPaymentsByBusinessIdVars); +// Variables can be defined inline as well. +const ref = listRecentPaymentsByBusinessIdRef({ businessId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listRecentPaymentsByBusinessIdRef(dataConnect, listRecentPaymentsByBusinessIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.recentPayments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.recentPayments); +}); +``` + +## listBusinesses +You can execute the `listBusinesses` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listBusinesses(): QueryPromise; + +interface ListBusinessesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listBusinessesRef: ListBusinessesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listBusinesses(dc: DataConnect): QueryPromise; + +interface ListBusinessesRef { + ... + (dc: DataConnect): QueryRef; +} +export const listBusinessesRef: ListBusinessesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listBusinessesRef: +```typescript +const name = listBusinessesRef.operationName; +console.log(name); +``` + +### Variables +The `listBusinesses` query has no variables. +### Return Type +Recall that executing the `listBusinesses` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListBusinessesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListBusinessesData { + businesses: ({ + id: UUIDString; + businessName: string; + contactName?: string | null; + userId: string; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup: BusinessRateGroup; + status: BusinessStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & Business_Key)[]; +} +``` +### Using `listBusinesses`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listBusinesses } from '@dataconnect/generated'; + + +// Call the `listBusinesses()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listBusinesses(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listBusinesses(dataConnect); + +console.log(data.businesses); + +// Or, you can use the `Promise` API. +listBusinesses().then((response) => { + const data = response.data; + console.log(data.businesses); +}); +``` + +### Using `listBusinesses`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listBusinessesRef } from '@dataconnect/generated'; + + +// Call the `listBusinessesRef()` function to get a reference to the query. +const ref = listBusinessesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listBusinessesRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.businesses); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.businesses); +}); +``` + +## getBusinessesByUserId +You can execute the `getBusinessesByUserId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getBusinessesByUserId(vars: GetBusinessesByUserIdVariables): QueryPromise; + +interface GetBusinessesByUserIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetBusinessesByUserIdVariables): QueryRef; +} +export const getBusinessesByUserIdRef: GetBusinessesByUserIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getBusinessesByUserId(dc: DataConnect, vars: GetBusinessesByUserIdVariables): QueryPromise; + +interface GetBusinessesByUserIdRef { + ... + (dc: DataConnect, vars: GetBusinessesByUserIdVariables): QueryRef; +} +export const getBusinessesByUserIdRef: GetBusinessesByUserIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getBusinessesByUserIdRef: +```typescript +const name = getBusinessesByUserIdRef.operationName; +console.log(name); +``` + +### Variables +The `getBusinessesByUserId` query requires an argument of type `GetBusinessesByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetBusinessesByUserIdVariables { + userId: string; +} +``` +### Return Type +Recall that executing the `getBusinessesByUserId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetBusinessesByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetBusinessesByUserIdData { + businesses: ({ + id: UUIDString; + businessName: string; + contactName?: string | null; + userId: string; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup: BusinessRateGroup; + status: BusinessStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & Business_Key)[]; +} +``` +### Using `getBusinessesByUserId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getBusinessesByUserId, GetBusinessesByUserIdVariables } from '@dataconnect/generated'; + +// The `getBusinessesByUserId` query requires an argument of type `GetBusinessesByUserIdVariables`: +const getBusinessesByUserIdVars: GetBusinessesByUserIdVariables = { + userId: ..., +}; + +// Call the `getBusinessesByUserId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getBusinessesByUserId(getBusinessesByUserIdVars); +// Variables can be defined inline as well. +const { data } = await getBusinessesByUserId({ userId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getBusinessesByUserId(dataConnect, getBusinessesByUserIdVars); + +console.log(data.businesses); + +// Or, you can use the `Promise` API. +getBusinessesByUserId(getBusinessesByUserIdVars).then((response) => { + const data = response.data; + console.log(data.businesses); +}); +``` + +### Using `getBusinessesByUserId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getBusinessesByUserIdRef, GetBusinessesByUserIdVariables } from '@dataconnect/generated'; + +// The `getBusinessesByUserId` query requires an argument of type `GetBusinessesByUserIdVariables`: +const getBusinessesByUserIdVars: GetBusinessesByUserIdVariables = { + userId: ..., +}; + +// Call the `getBusinessesByUserIdRef()` function to get a reference to the query. +const ref = getBusinessesByUserIdRef(getBusinessesByUserIdVars); +// Variables can be defined inline as well. +const ref = getBusinessesByUserIdRef({ userId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getBusinessesByUserIdRef(dataConnect, getBusinessesByUserIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.businesses); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.businesses); +}); +``` + +## getBusinessById +You can execute the `getBusinessById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getBusinessById(vars: GetBusinessByIdVariables): QueryPromise; + +interface GetBusinessByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetBusinessByIdVariables): QueryRef; +} +export const getBusinessByIdRef: GetBusinessByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getBusinessById(dc: DataConnect, vars: GetBusinessByIdVariables): QueryPromise; + +interface GetBusinessByIdRef { + ... + (dc: DataConnect, vars: GetBusinessByIdVariables): QueryRef; +} +export const getBusinessByIdRef: GetBusinessByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getBusinessByIdRef: +```typescript +const name = getBusinessByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getBusinessById` query requires an argument of type `GetBusinessByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetBusinessByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getBusinessById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetBusinessByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetBusinessByIdData { + business?: { + id: UUIDString; + businessName: string; + contactName?: string | null; + userId: string; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup: BusinessRateGroup; + status: BusinessStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & Business_Key; +} +``` +### Using `getBusinessById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getBusinessById, GetBusinessByIdVariables } from '@dataconnect/generated'; + +// The `getBusinessById` query requires an argument of type `GetBusinessByIdVariables`: +const getBusinessByIdVars: GetBusinessByIdVariables = { + id: ..., +}; + +// Call the `getBusinessById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getBusinessById(getBusinessByIdVars); +// Variables can be defined inline as well. +const { data } = await getBusinessById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getBusinessById(dataConnect, getBusinessByIdVars); + +console.log(data.business); + +// Or, you can use the `Promise` API. +getBusinessById(getBusinessByIdVars).then((response) => { + const data = response.data; + console.log(data.business); +}); +``` + +### Using `getBusinessById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getBusinessByIdRef, GetBusinessByIdVariables } from '@dataconnect/generated'; + +// The `getBusinessById` query requires an argument of type `GetBusinessByIdVariables`: +const getBusinessByIdVars: GetBusinessByIdVariables = { + id: ..., +}; + +// Call the `getBusinessByIdRef()` function to get a reference to the query. +const ref = getBusinessByIdRef(getBusinessByIdVars); +// Variables can be defined inline as well. +const ref = getBusinessByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getBusinessByIdRef(dataConnect, getBusinessByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.business); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.business); +}); +``` + +## listConversations +You can execute the `listConversations` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listConversations(vars?: ListConversationsVariables): QueryPromise; + +interface ListConversationsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListConversationsVariables): QueryRef; +} +export const listConversationsRef: ListConversationsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listConversations(dc: DataConnect, vars?: ListConversationsVariables): QueryPromise; + +interface ListConversationsRef { + ... + (dc: DataConnect, vars?: ListConversationsVariables): QueryRef; +} +export const listConversationsRef: ListConversationsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listConversationsRef: +```typescript +const name = listConversationsRef.operationName; +console.log(name); +``` + +### Variables +The `listConversations` query has an optional argument of type `ListConversationsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListConversationsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listConversations` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListConversationsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListConversationsData { + conversations: ({ + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key)[]; +} +``` +### Using `listConversations`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listConversations, ListConversationsVariables } from '@dataconnect/generated'; + +// The `listConversations` query has an optional argument of type `ListConversationsVariables`: +const listConversationsVars: ListConversationsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listConversations()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listConversations(listConversationsVars); +// Variables can be defined inline as well. +const { data } = await listConversations({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListConversationsVariables` argument. +const { data } = await listConversations(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listConversations(dataConnect, listConversationsVars); + +console.log(data.conversations); + +// Or, you can use the `Promise` API. +listConversations(listConversationsVars).then((response) => { + const data = response.data; + console.log(data.conversations); +}); +``` + +### Using `listConversations`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listConversationsRef, ListConversationsVariables } from '@dataconnect/generated'; + +// The `listConversations` query has an optional argument of type `ListConversationsVariables`: +const listConversationsVars: ListConversationsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listConversationsRef()` function to get a reference to the query. +const ref = listConversationsRef(listConversationsVars); +// Variables can be defined inline as well. +const ref = listConversationsRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListConversationsVariables` argument. +const ref = listConversationsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listConversationsRef(dataConnect, listConversationsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.conversations); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.conversations); +}); +``` + +## getConversationById +You can execute the `getConversationById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getConversationById(vars: GetConversationByIdVariables): QueryPromise; + +interface GetConversationByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetConversationByIdVariables): QueryRef; +} +export const getConversationByIdRef: GetConversationByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getConversationById(dc: DataConnect, vars: GetConversationByIdVariables): QueryPromise; + +interface GetConversationByIdRef { + ... + (dc: DataConnect, vars: GetConversationByIdVariables): QueryRef; +} +export const getConversationByIdRef: GetConversationByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getConversationByIdRef: +```typescript +const name = getConversationByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getConversationById` query requires an argument of type `GetConversationByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetConversationByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getConversationById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetConversationByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetConversationByIdData { + conversation?: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; +} +``` +### Using `getConversationById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getConversationById, GetConversationByIdVariables } from '@dataconnect/generated'; + +// The `getConversationById` query requires an argument of type `GetConversationByIdVariables`: +const getConversationByIdVars: GetConversationByIdVariables = { + id: ..., +}; + +// Call the `getConversationById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getConversationById(getConversationByIdVars); +// Variables can be defined inline as well. +const { data } = await getConversationById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getConversationById(dataConnect, getConversationByIdVars); + +console.log(data.conversation); + +// Or, you can use the `Promise` API. +getConversationById(getConversationByIdVars).then((response) => { + const data = response.data; + console.log(data.conversation); +}); +``` + +### Using `getConversationById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getConversationByIdRef, GetConversationByIdVariables } from '@dataconnect/generated'; + +// The `getConversationById` query requires an argument of type `GetConversationByIdVariables`: +const getConversationByIdVars: GetConversationByIdVariables = { + id: ..., +}; + +// Call the `getConversationByIdRef()` function to get a reference to the query. +const ref = getConversationByIdRef(getConversationByIdVars); +// Variables can be defined inline as well. +const ref = getConversationByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getConversationByIdRef(dataConnect, getConversationByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.conversation); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.conversation); +}); +``` + +## listConversationsByType +You can execute the `listConversationsByType` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listConversationsByType(vars: ListConversationsByTypeVariables): QueryPromise; + +interface ListConversationsByTypeRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListConversationsByTypeVariables): QueryRef; +} +export const listConversationsByTypeRef: ListConversationsByTypeRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listConversationsByType(dc: DataConnect, vars: ListConversationsByTypeVariables): QueryPromise; + +interface ListConversationsByTypeRef { + ... + (dc: DataConnect, vars: ListConversationsByTypeVariables): QueryRef; +} +export const listConversationsByTypeRef: ListConversationsByTypeRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listConversationsByTypeRef: +```typescript +const name = listConversationsByTypeRef.operationName; +console.log(name); +``` + +### Variables +The `listConversationsByType` query requires an argument of type `ListConversationsByTypeVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListConversationsByTypeVariables { + conversationType: ConversationType; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listConversationsByType` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListConversationsByTypeData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListConversationsByTypeData { + conversations: ({ + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key)[]; +} +``` +### Using `listConversationsByType`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listConversationsByType, ListConversationsByTypeVariables } from '@dataconnect/generated'; + +// The `listConversationsByType` query requires an argument of type `ListConversationsByTypeVariables`: +const listConversationsByTypeVars: ListConversationsByTypeVariables = { + conversationType: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listConversationsByType()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listConversationsByType(listConversationsByTypeVars); +// Variables can be defined inline as well. +const { data } = await listConversationsByType({ conversationType: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listConversationsByType(dataConnect, listConversationsByTypeVars); + +console.log(data.conversations); + +// Or, you can use the `Promise` API. +listConversationsByType(listConversationsByTypeVars).then((response) => { + const data = response.data; + console.log(data.conversations); +}); +``` + +### Using `listConversationsByType`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listConversationsByTypeRef, ListConversationsByTypeVariables } from '@dataconnect/generated'; + +// The `listConversationsByType` query requires an argument of type `ListConversationsByTypeVariables`: +const listConversationsByTypeVars: ListConversationsByTypeVariables = { + conversationType: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listConversationsByTypeRef()` function to get a reference to the query. +const ref = listConversationsByTypeRef(listConversationsByTypeVars); +// Variables can be defined inline as well. +const ref = listConversationsByTypeRef({ conversationType: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listConversationsByTypeRef(dataConnect, listConversationsByTypeVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.conversations); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.conversations); +}); +``` + +## listConversationsByStatus +You can execute the `listConversationsByStatus` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listConversationsByStatus(vars: ListConversationsByStatusVariables): QueryPromise; + +interface ListConversationsByStatusRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListConversationsByStatusVariables): QueryRef; +} +export const listConversationsByStatusRef: ListConversationsByStatusRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listConversationsByStatus(dc: DataConnect, vars: ListConversationsByStatusVariables): QueryPromise; + +interface ListConversationsByStatusRef { + ... + (dc: DataConnect, vars: ListConversationsByStatusVariables): QueryRef; +} +export const listConversationsByStatusRef: ListConversationsByStatusRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listConversationsByStatusRef: +```typescript +const name = listConversationsByStatusRef.operationName; +console.log(name); +``` + +### Variables +The `listConversationsByStatus` query requires an argument of type `ListConversationsByStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListConversationsByStatusVariables { + status: ConversationStatus; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listConversationsByStatus` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListConversationsByStatusData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListConversationsByStatusData { + conversations: ({ + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key)[]; +} +``` +### Using `listConversationsByStatus`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listConversationsByStatus, ListConversationsByStatusVariables } from '@dataconnect/generated'; + +// The `listConversationsByStatus` query requires an argument of type `ListConversationsByStatusVariables`: +const listConversationsByStatusVars: ListConversationsByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listConversationsByStatus()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listConversationsByStatus(listConversationsByStatusVars); +// Variables can be defined inline as well. +const { data } = await listConversationsByStatus({ status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listConversationsByStatus(dataConnect, listConversationsByStatusVars); + +console.log(data.conversations); + +// Or, you can use the `Promise` API. +listConversationsByStatus(listConversationsByStatusVars).then((response) => { + const data = response.data; + console.log(data.conversations); +}); +``` + +### Using `listConversationsByStatus`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listConversationsByStatusRef, ListConversationsByStatusVariables } from '@dataconnect/generated'; + +// The `listConversationsByStatus` query requires an argument of type `ListConversationsByStatusVariables`: +const listConversationsByStatusVars: ListConversationsByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listConversationsByStatusRef()` function to get a reference to the query. +const ref = listConversationsByStatusRef(listConversationsByStatusVars); +// Variables can be defined inline as well. +const ref = listConversationsByStatusRef({ status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listConversationsByStatusRef(dataConnect, listConversationsByStatusVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.conversations); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.conversations); +}); +``` + +## filterConversations +You can execute the `filterConversations` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterConversations(vars?: FilterConversationsVariables): QueryPromise; + +interface FilterConversationsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterConversationsVariables): QueryRef; +} +export const filterConversationsRef: FilterConversationsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterConversations(dc: DataConnect, vars?: FilterConversationsVariables): QueryPromise; + +interface FilterConversationsRef { + ... + (dc: DataConnect, vars?: FilterConversationsVariables): QueryRef; +} +export const filterConversationsRef: FilterConversationsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterConversationsRef: +```typescript +const name = filterConversationsRef.operationName; +console.log(name); +``` + +### Variables +The `filterConversations` query has an optional argument of type `FilterConversationsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterConversationsVariables { + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + lastMessageAfter?: TimestampString | null; + lastMessageBefore?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `filterConversations` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterConversationsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterConversationsData { + conversations: ({ + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key)[]; +} +``` +### Using `filterConversations`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterConversations, FilterConversationsVariables } from '@dataconnect/generated'; + +// The `filterConversations` query has an optional argument of type `FilterConversationsVariables`: +const filterConversationsVars: FilterConversationsVariables = { + status: ..., // optional + conversationType: ..., // optional + isGroup: ..., // optional + lastMessageAfter: ..., // optional + lastMessageBefore: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterConversations()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterConversations(filterConversationsVars); +// Variables can be defined inline as well. +const { data } = await filterConversations({ status: ..., conversationType: ..., isGroup: ..., lastMessageAfter: ..., lastMessageBefore: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterConversationsVariables` argument. +const { data } = await filterConversations(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterConversations(dataConnect, filterConversationsVars); + +console.log(data.conversations); + +// Or, you can use the `Promise` API. +filterConversations(filterConversationsVars).then((response) => { + const data = response.data; + console.log(data.conversations); +}); +``` + +### Using `filterConversations`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterConversationsRef, FilterConversationsVariables } from '@dataconnect/generated'; + +// The `filterConversations` query has an optional argument of type `FilterConversationsVariables`: +const filterConversationsVars: FilterConversationsVariables = { + status: ..., // optional + conversationType: ..., // optional + isGroup: ..., // optional + lastMessageAfter: ..., // optional + lastMessageBefore: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterConversationsRef()` function to get a reference to the query. +const ref = filterConversationsRef(filterConversationsVars); +// Variables can be defined inline as well. +const ref = filterConversationsRef({ status: ..., conversationType: ..., isGroup: ..., lastMessageAfter: ..., lastMessageBefore: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterConversationsVariables` argument. +const ref = filterConversationsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterConversationsRef(dataConnect, filterConversationsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.conversations); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.conversations); +}); +``` + +## listOrders +You can execute the `listOrders` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listOrders(vars?: ListOrdersVariables): QueryPromise; + +interface ListOrdersRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListOrdersVariables): QueryRef; +} +export const listOrdersRef: ListOrdersRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listOrders(dc: DataConnect, vars?: ListOrdersVariables): QueryPromise; + +interface ListOrdersRef { + ... + (dc: DataConnect, vars?: ListOrdersVariables): QueryRef; +} +export const listOrdersRef: ListOrdersRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listOrdersRef: +```typescript +const name = listOrdersRef.operationName; +console.log(name); +``` + +### Variables +The `listOrders` query has an optional argument of type `ListOrdersVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListOrdersVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listOrders` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListOrdersData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListOrdersData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} +``` +### Using `listOrders`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listOrders, ListOrdersVariables } from '@dataconnect/generated'; + +// The `listOrders` query has an optional argument of type `ListOrdersVariables`: +const listOrdersVars: ListOrdersVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listOrders()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listOrders(listOrdersVars); +// Variables can be defined inline as well. +const { data } = await listOrders({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListOrdersVariables` argument. +const { data } = await listOrders(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listOrders(dataConnect, listOrdersVars); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +listOrders(listOrdersVars).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +### Using `listOrders`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listOrdersRef, ListOrdersVariables } from '@dataconnect/generated'; + +// The `listOrders` query has an optional argument of type `ListOrdersVariables`: +const listOrdersVars: ListOrdersVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listOrdersRef()` function to get a reference to the query. +const ref = listOrdersRef(listOrdersVars); +// Variables can be defined inline as well. +const ref = listOrdersRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListOrdersVariables` argument. +const ref = listOrdersRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listOrdersRef(dataConnect, listOrdersVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +## getOrderById +You can execute the `getOrderById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getOrderById(vars: GetOrderByIdVariables): QueryPromise; + +interface GetOrderByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetOrderByIdVariables): QueryRef; +} +export const getOrderByIdRef: GetOrderByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getOrderById(dc: DataConnect, vars: GetOrderByIdVariables): QueryPromise; + +interface GetOrderByIdRef { + ... + (dc: DataConnect, vars: GetOrderByIdVariables): QueryRef; +} +export const getOrderByIdRef: GetOrderByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getOrderByIdRef: +```typescript +const name = getOrderByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getOrderById` query requires an argument of type `GetOrderByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetOrderByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getOrderById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetOrderByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetOrderByIdData { + order?: { + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; +} +``` +### Using `getOrderById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getOrderById, GetOrderByIdVariables } from '@dataconnect/generated'; + +// The `getOrderById` query requires an argument of type `GetOrderByIdVariables`: +const getOrderByIdVars: GetOrderByIdVariables = { + id: ..., +}; + +// Call the `getOrderById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getOrderById(getOrderByIdVars); +// Variables can be defined inline as well. +const { data } = await getOrderById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getOrderById(dataConnect, getOrderByIdVars); + +console.log(data.order); + +// Or, you can use the `Promise` API. +getOrderById(getOrderByIdVars).then((response) => { + const data = response.data; + console.log(data.order); +}); +``` + +### Using `getOrderById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getOrderByIdRef, GetOrderByIdVariables } from '@dataconnect/generated'; + +// The `getOrderById` query requires an argument of type `GetOrderByIdVariables`: +const getOrderByIdVars: GetOrderByIdVariables = { + id: ..., +}; + +// Call the `getOrderByIdRef()` function to get a reference to the query. +const ref = getOrderByIdRef(getOrderByIdVars); +// Variables can be defined inline as well. +const ref = getOrderByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getOrderByIdRef(dataConnect, getOrderByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.order); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.order); +}); +``` + +## getOrdersByBusinessId +You can execute the `getOrdersByBusinessId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getOrdersByBusinessId(vars: GetOrdersByBusinessIdVariables): QueryPromise; + +interface GetOrdersByBusinessIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetOrdersByBusinessIdVariables): QueryRef; +} +export const getOrdersByBusinessIdRef: GetOrdersByBusinessIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getOrdersByBusinessId(dc: DataConnect, vars: GetOrdersByBusinessIdVariables): QueryPromise; + +interface GetOrdersByBusinessIdRef { + ... + (dc: DataConnect, vars: GetOrdersByBusinessIdVariables): QueryRef; +} +export const getOrdersByBusinessIdRef: GetOrdersByBusinessIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getOrdersByBusinessIdRef: +```typescript +const name = getOrdersByBusinessIdRef.operationName; +console.log(name); +``` + +### Variables +The `getOrdersByBusinessId` query requires an argument of type `GetOrdersByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetOrdersByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `getOrdersByBusinessId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetOrdersByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetOrdersByBusinessIdData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} +``` +### Using `getOrdersByBusinessId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getOrdersByBusinessId, GetOrdersByBusinessIdVariables } from '@dataconnect/generated'; + +// The `getOrdersByBusinessId` query requires an argument of type `GetOrdersByBusinessIdVariables`: +const getOrdersByBusinessIdVars: GetOrdersByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getOrdersByBusinessId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getOrdersByBusinessId(getOrdersByBusinessIdVars); +// Variables can be defined inline as well. +const { data } = await getOrdersByBusinessId({ businessId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getOrdersByBusinessId(dataConnect, getOrdersByBusinessIdVars); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +getOrdersByBusinessId(getOrdersByBusinessIdVars).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +### Using `getOrdersByBusinessId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getOrdersByBusinessIdRef, GetOrdersByBusinessIdVariables } from '@dataconnect/generated'; + +// The `getOrdersByBusinessId` query requires an argument of type `GetOrdersByBusinessIdVariables`: +const getOrdersByBusinessIdVars: GetOrdersByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getOrdersByBusinessIdRef()` function to get a reference to the query. +const ref = getOrdersByBusinessIdRef(getOrdersByBusinessIdVars); +// Variables can be defined inline as well. +const ref = getOrdersByBusinessIdRef({ businessId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getOrdersByBusinessIdRef(dataConnect, getOrdersByBusinessIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +## getOrdersByVendorId +You can execute the `getOrdersByVendorId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getOrdersByVendorId(vars: GetOrdersByVendorIdVariables): QueryPromise; + +interface GetOrdersByVendorIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetOrdersByVendorIdVariables): QueryRef; +} +export const getOrdersByVendorIdRef: GetOrdersByVendorIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getOrdersByVendorId(dc: DataConnect, vars: GetOrdersByVendorIdVariables): QueryPromise; + +interface GetOrdersByVendorIdRef { + ... + (dc: DataConnect, vars: GetOrdersByVendorIdVariables): QueryRef; +} +export const getOrdersByVendorIdRef: GetOrdersByVendorIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getOrdersByVendorIdRef: +```typescript +const name = getOrdersByVendorIdRef.operationName; +console.log(name); +``` + +### Variables +The `getOrdersByVendorId` query requires an argument of type `GetOrdersByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetOrdersByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `getOrdersByVendorId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetOrdersByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetOrdersByVendorIdData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} +``` +### Using `getOrdersByVendorId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getOrdersByVendorId, GetOrdersByVendorIdVariables } from '@dataconnect/generated'; + +// The `getOrdersByVendorId` query requires an argument of type `GetOrdersByVendorIdVariables`: +const getOrdersByVendorIdVars: GetOrdersByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getOrdersByVendorId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getOrdersByVendorId(getOrdersByVendorIdVars); +// Variables can be defined inline as well. +const { data } = await getOrdersByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getOrdersByVendorId(dataConnect, getOrdersByVendorIdVars); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +getOrdersByVendorId(getOrdersByVendorIdVars).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +### Using `getOrdersByVendorId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getOrdersByVendorIdRef, GetOrdersByVendorIdVariables } from '@dataconnect/generated'; + +// The `getOrdersByVendorId` query requires an argument of type `GetOrdersByVendorIdVariables`: +const getOrdersByVendorIdVars: GetOrdersByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getOrdersByVendorIdRef()` function to get a reference to the query. +const ref = getOrdersByVendorIdRef(getOrdersByVendorIdVars); +// Variables can be defined inline as well. +const ref = getOrdersByVendorIdRef({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getOrdersByVendorIdRef(dataConnect, getOrdersByVendorIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +## getOrdersByStatus +You can execute the `getOrdersByStatus` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getOrdersByStatus(vars: GetOrdersByStatusVariables): QueryPromise; + +interface GetOrdersByStatusRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetOrdersByStatusVariables): QueryRef; +} +export const getOrdersByStatusRef: GetOrdersByStatusRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getOrdersByStatus(dc: DataConnect, vars: GetOrdersByStatusVariables): QueryPromise; + +interface GetOrdersByStatusRef { + ... + (dc: DataConnect, vars: GetOrdersByStatusVariables): QueryRef; +} +export const getOrdersByStatusRef: GetOrdersByStatusRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getOrdersByStatusRef: +```typescript +const name = getOrdersByStatusRef.operationName; +console.log(name); +``` + +### Variables +The `getOrdersByStatus` query requires an argument of type `GetOrdersByStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetOrdersByStatusVariables { + status: OrderStatus; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `getOrdersByStatus` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetOrdersByStatusData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetOrdersByStatusData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} +``` +### Using `getOrdersByStatus`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getOrdersByStatus, GetOrdersByStatusVariables } from '@dataconnect/generated'; + +// The `getOrdersByStatus` query requires an argument of type `GetOrdersByStatusVariables`: +const getOrdersByStatusVars: GetOrdersByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getOrdersByStatus()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getOrdersByStatus(getOrdersByStatusVars); +// Variables can be defined inline as well. +const { data } = await getOrdersByStatus({ status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getOrdersByStatus(dataConnect, getOrdersByStatusVars); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +getOrdersByStatus(getOrdersByStatusVars).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +### Using `getOrdersByStatus`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getOrdersByStatusRef, GetOrdersByStatusVariables } from '@dataconnect/generated'; + +// The `getOrdersByStatus` query requires an argument of type `GetOrdersByStatusVariables`: +const getOrdersByStatusVars: GetOrdersByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getOrdersByStatusRef()` function to get a reference to the query. +const ref = getOrdersByStatusRef(getOrdersByStatusVars); +// Variables can be defined inline as well. +const ref = getOrdersByStatusRef({ status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getOrdersByStatusRef(dataConnect, getOrdersByStatusVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +## getOrdersByDateRange +You can execute the `getOrdersByDateRange` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getOrdersByDateRange(vars: GetOrdersByDateRangeVariables): QueryPromise; + +interface GetOrdersByDateRangeRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetOrdersByDateRangeVariables): QueryRef; +} +export const getOrdersByDateRangeRef: GetOrdersByDateRangeRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getOrdersByDateRange(dc: DataConnect, vars: GetOrdersByDateRangeVariables): QueryPromise; + +interface GetOrdersByDateRangeRef { + ... + (dc: DataConnect, vars: GetOrdersByDateRangeVariables): QueryRef; +} +export const getOrdersByDateRangeRef: GetOrdersByDateRangeRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getOrdersByDateRangeRef: +```typescript +const name = getOrdersByDateRangeRef.operationName; +console.log(name); +``` + +### Variables +The `getOrdersByDateRange` query requires an argument of type `GetOrdersByDateRangeVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetOrdersByDateRangeVariables { + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `getOrdersByDateRange` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetOrdersByDateRangeData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetOrdersByDateRangeData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} +``` +### Using `getOrdersByDateRange`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getOrdersByDateRange, GetOrdersByDateRangeVariables } from '@dataconnect/generated'; + +// The `getOrdersByDateRange` query requires an argument of type `GetOrdersByDateRangeVariables`: +const getOrdersByDateRangeVars: GetOrdersByDateRangeVariables = { + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getOrdersByDateRange()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getOrdersByDateRange(getOrdersByDateRangeVars); +// Variables can be defined inline as well. +const { data } = await getOrdersByDateRange({ start: ..., end: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getOrdersByDateRange(dataConnect, getOrdersByDateRangeVars); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +getOrdersByDateRange(getOrdersByDateRangeVars).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +### Using `getOrdersByDateRange`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getOrdersByDateRangeRef, GetOrdersByDateRangeVariables } from '@dataconnect/generated'; + +// The `getOrdersByDateRange` query requires an argument of type `GetOrdersByDateRangeVariables`: +const getOrdersByDateRangeVars: GetOrdersByDateRangeVariables = { + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getOrdersByDateRangeRef()` function to get a reference to the query. +const ref = getOrdersByDateRangeRef(getOrdersByDateRangeVars); +// Variables can be defined inline as well. +const ref = getOrdersByDateRangeRef({ start: ..., end: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getOrdersByDateRangeRef(dataConnect, getOrdersByDateRangeVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +## getRapidOrders +You can execute the `getRapidOrders` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getRapidOrders(vars?: GetRapidOrdersVariables): QueryPromise; + +interface GetRapidOrdersRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: GetRapidOrdersVariables): QueryRef; +} +export const getRapidOrdersRef: GetRapidOrdersRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getRapidOrders(dc: DataConnect, vars?: GetRapidOrdersVariables): QueryPromise; + +interface GetRapidOrdersRef { + ... + (dc: DataConnect, vars?: GetRapidOrdersVariables): QueryRef; +} +export const getRapidOrdersRef: GetRapidOrdersRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getRapidOrdersRef: +```typescript +const name = getRapidOrdersRef.operationName; +console.log(name); +``` + +### Variables +The `getRapidOrders` query has an optional argument of type `GetRapidOrdersVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetRapidOrdersVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `getRapidOrders` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetRapidOrdersData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetRapidOrdersData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} +``` +### Using `getRapidOrders`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getRapidOrders, GetRapidOrdersVariables } from '@dataconnect/generated'; + +// The `getRapidOrders` query has an optional argument of type `GetRapidOrdersVariables`: +const getRapidOrdersVars: GetRapidOrdersVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getRapidOrders()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getRapidOrders(getRapidOrdersVars); +// Variables can be defined inline as well. +const { data } = await getRapidOrders({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `GetRapidOrdersVariables` argument. +const { data } = await getRapidOrders(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getRapidOrders(dataConnect, getRapidOrdersVars); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +getRapidOrders(getRapidOrdersVars).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +### Using `getRapidOrders`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getRapidOrdersRef, GetRapidOrdersVariables } from '@dataconnect/generated'; + +// The `getRapidOrders` query has an optional argument of type `GetRapidOrdersVariables`: +const getRapidOrdersVars: GetRapidOrdersVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getRapidOrdersRef()` function to get a reference to the query. +const ref = getRapidOrdersRef(getRapidOrdersVars); +// Variables can be defined inline as well. +const ref = getRapidOrdersRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `GetRapidOrdersVariables` argument. +const ref = getRapidOrdersRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getRapidOrdersRef(dataConnect, getRapidOrdersVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +## listOrdersByBusinessAndTeamHub +You can execute the `listOrdersByBusinessAndTeamHub` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listOrdersByBusinessAndTeamHub(vars: ListOrdersByBusinessAndTeamHubVariables): QueryPromise; + +interface ListOrdersByBusinessAndTeamHubRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListOrdersByBusinessAndTeamHubVariables): QueryRef; +} +export const listOrdersByBusinessAndTeamHubRef: ListOrdersByBusinessAndTeamHubRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listOrdersByBusinessAndTeamHub(dc: DataConnect, vars: ListOrdersByBusinessAndTeamHubVariables): QueryPromise; + +interface ListOrdersByBusinessAndTeamHubRef { + ... + (dc: DataConnect, vars: ListOrdersByBusinessAndTeamHubVariables): QueryRef; +} +export const listOrdersByBusinessAndTeamHubRef: ListOrdersByBusinessAndTeamHubRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listOrdersByBusinessAndTeamHubRef: +```typescript +const name = listOrdersByBusinessAndTeamHubRef.operationName; +console.log(name); +``` + +### Variables +The `listOrdersByBusinessAndTeamHub` query requires an argument of type `ListOrdersByBusinessAndTeamHubVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListOrdersByBusinessAndTeamHubVariables { + businessId: UUIDString; + teamHubId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listOrdersByBusinessAndTeamHub` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListOrdersByBusinessAndTeamHubData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListOrdersByBusinessAndTeamHubData { + orders: ({ + id: UUIDString; + eventName?: string | null; + orderType: OrderType; + status: OrderStatus; + duration?: OrderDuration | null; + businessId: UUIDString; + vendorId?: UUIDString | null; + teamHubId: UUIDString; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + requested?: number | null; + total?: number | null; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Order_Key)[]; +} +``` +### Using `listOrdersByBusinessAndTeamHub`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listOrdersByBusinessAndTeamHub, ListOrdersByBusinessAndTeamHubVariables } from '@dataconnect/generated'; + +// The `listOrdersByBusinessAndTeamHub` query requires an argument of type `ListOrdersByBusinessAndTeamHubVariables`: +const listOrdersByBusinessAndTeamHubVars: ListOrdersByBusinessAndTeamHubVariables = { + businessId: ..., + teamHubId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listOrdersByBusinessAndTeamHub()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listOrdersByBusinessAndTeamHub(listOrdersByBusinessAndTeamHubVars); +// Variables can be defined inline as well. +const { data } = await listOrdersByBusinessAndTeamHub({ businessId: ..., teamHubId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listOrdersByBusinessAndTeamHub(dataConnect, listOrdersByBusinessAndTeamHubVars); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +listOrdersByBusinessAndTeamHub(listOrdersByBusinessAndTeamHubVars).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +### Using `listOrdersByBusinessAndTeamHub`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listOrdersByBusinessAndTeamHubRef, ListOrdersByBusinessAndTeamHubVariables } from '@dataconnect/generated'; + +// The `listOrdersByBusinessAndTeamHub` query requires an argument of type `ListOrdersByBusinessAndTeamHubVariables`: +const listOrdersByBusinessAndTeamHubVars: ListOrdersByBusinessAndTeamHubVariables = { + businessId: ..., + teamHubId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listOrdersByBusinessAndTeamHubRef()` function to get a reference to the query. +const ref = listOrdersByBusinessAndTeamHubRef(listOrdersByBusinessAndTeamHubVars); +// Variables can be defined inline as well. +const ref = listOrdersByBusinessAndTeamHubRef({ businessId: ..., teamHubId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listOrdersByBusinessAndTeamHubRef(dataConnect, listOrdersByBusinessAndTeamHubVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.orders); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.orders); +}); +``` + +## listStaffRoles +You can execute the `listStaffRoles` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffRoles(vars?: ListStaffRolesVariables): QueryPromise; + +interface ListStaffRolesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListStaffRolesVariables): QueryRef; +} +export const listStaffRolesRef: ListStaffRolesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffRoles(dc: DataConnect, vars?: ListStaffRolesVariables): QueryPromise; + +interface ListStaffRolesRef { + ... + (dc: DataConnect, vars?: ListStaffRolesVariables): QueryRef; +} +export const listStaffRolesRef: ListStaffRolesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffRolesRef: +```typescript +const name = listStaffRolesRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffRoles` query has an optional argument of type `ListStaffRolesVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffRolesVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listStaffRoles` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffRolesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffRolesData { + staffRoles: ({ + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + staff: { + id: UUIDString; + fullName: string; + userId: string; + email?: string | null; + phone?: string | null; + } & Staff_Key; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + } & StaffRole_Key)[]; +} +``` +### Using `listStaffRoles`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffRoles, ListStaffRolesVariables } from '@dataconnect/generated'; + +// The `listStaffRoles` query has an optional argument of type `ListStaffRolesVariables`: +const listStaffRolesVars: ListStaffRolesVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffRoles()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffRoles(listStaffRolesVars); +// Variables can be defined inline as well. +const { data } = await listStaffRoles({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListStaffRolesVariables` argument. +const { data } = await listStaffRoles(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffRoles(dataConnect, listStaffRolesVars); + +console.log(data.staffRoles); + +// Or, you can use the `Promise` API. +listStaffRoles(listStaffRolesVars).then((response) => { + const data = response.data; + console.log(data.staffRoles); +}); +``` + +### Using `listStaffRoles`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffRolesRef, ListStaffRolesVariables } from '@dataconnect/generated'; + +// The `listStaffRoles` query has an optional argument of type `ListStaffRolesVariables`: +const listStaffRolesVars: ListStaffRolesVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffRolesRef()` function to get a reference to the query. +const ref = listStaffRolesRef(listStaffRolesVars); +// Variables can be defined inline as well. +const ref = listStaffRolesRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListStaffRolesVariables` argument. +const ref = listStaffRolesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffRolesRef(dataConnect, listStaffRolesVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffRoles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffRoles); +}); +``` + +## getStaffRoleByKey +You can execute the `getStaffRoleByKey` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getStaffRoleByKey(vars: GetStaffRoleByKeyVariables): QueryPromise; + +interface GetStaffRoleByKeyRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffRoleByKeyVariables): QueryRef; +} +export const getStaffRoleByKeyRef: GetStaffRoleByKeyRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getStaffRoleByKey(dc: DataConnect, vars: GetStaffRoleByKeyVariables): QueryPromise; + +interface GetStaffRoleByKeyRef { + ... + (dc: DataConnect, vars: GetStaffRoleByKeyVariables): QueryRef; +} +export const getStaffRoleByKeyRef: GetStaffRoleByKeyRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getStaffRoleByKeyRef: +```typescript +const name = getStaffRoleByKeyRef.operationName; +console.log(name); +``` + +### Variables +The `getStaffRoleByKey` query requires an argument of type `GetStaffRoleByKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetStaffRoleByKeyVariables { + staffId: UUIDString; + roleId: UUIDString; +} +``` +### Return Type +Recall that executing the `getStaffRoleByKey` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetStaffRoleByKeyData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetStaffRoleByKeyData { + staffRole?: { + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + staff: { + id: UUIDString; + fullName: string; + userId: string; + email?: string | null; + phone?: string | null; + } & Staff_Key; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + } & StaffRole_Key; +} +``` +### Using `getStaffRoleByKey`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getStaffRoleByKey, GetStaffRoleByKeyVariables } from '@dataconnect/generated'; + +// The `getStaffRoleByKey` query requires an argument of type `GetStaffRoleByKeyVariables`: +const getStaffRoleByKeyVars: GetStaffRoleByKeyVariables = { + staffId: ..., + roleId: ..., +}; + +// Call the `getStaffRoleByKey()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getStaffRoleByKey(getStaffRoleByKeyVars); +// Variables can be defined inline as well. +const { data } = await getStaffRoleByKey({ staffId: ..., roleId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getStaffRoleByKey(dataConnect, getStaffRoleByKeyVars); + +console.log(data.staffRole); + +// Or, you can use the `Promise` API. +getStaffRoleByKey(getStaffRoleByKeyVars).then((response) => { + const data = response.data; + console.log(data.staffRole); +}); +``` + +### Using `getStaffRoleByKey`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getStaffRoleByKeyRef, GetStaffRoleByKeyVariables } from '@dataconnect/generated'; + +// The `getStaffRoleByKey` query requires an argument of type `GetStaffRoleByKeyVariables`: +const getStaffRoleByKeyVars: GetStaffRoleByKeyVariables = { + staffId: ..., + roleId: ..., +}; + +// Call the `getStaffRoleByKeyRef()` function to get a reference to the query. +const ref = getStaffRoleByKeyRef(getStaffRoleByKeyVars); +// Variables can be defined inline as well. +const ref = getStaffRoleByKeyRef({ staffId: ..., roleId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getStaffRoleByKeyRef(dataConnect, getStaffRoleByKeyVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffRole); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffRole); +}); +``` + +## listStaffRolesByStaffId +You can execute the `listStaffRolesByStaffId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffRolesByStaffId(vars: ListStaffRolesByStaffIdVariables): QueryPromise; + +interface ListStaffRolesByStaffIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffRolesByStaffIdVariables): QueryRef; +} +export const listStaffRolesByStaffIdRef: ListStaffRolesByStaffIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffRolesByStaffId(dc: DataConnect, vars: ListStaffRolesByStaffIdVariables): QueryPromise; + +interface ListStaffRolesByStaffIdRef { + ... + (dc: DataConnect, vars: ListStaffRolesByStaffIdVariables): QueryRef; +} +export const listStaffRolesByStaffIdRef: ListStaffRolesByStaffIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffRolesByStaffIdRef: +```typescript +const name = listStaffRolesByStaffIdRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffRolesByStaffId` query requires an argument of type `ListStaffRolesByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffRolesByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listStaffRolesByStaffId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffRolesByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffRolesByStaffIdData { + staffRoles: ({ + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + } & StaffRole_Key)[]; +} +``` +### Using `listStaffRolesByStaffId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffRolesByStaffId, ListStaffRolesByStaffIdVariables } from '@dataconnect/generated'; + +// The `listStaffRolesByStaffId` query requires an argument of type `ListStaffRolesByStaffIdVariables`: +const listStaffRolesByStaffIdVars: ListStaffRolesByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffRolesByStaffId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffRolesByStaffId(listStaffRolesByStaffIdVars); +// Variables can be defined inline as well. +const { data } = await listStaffRolesByStaffId({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffRolesByStaffId(dataConnect, listStaffRolesByStaffIdVars); + +console.log(data.staffRoles); + +// Or, you can use the `Promise` API. +listStaffRolesByStaffId(listStaffRolesByStaffIdVars).then((response) => { + const data = response.data; + console.log(data.staffRoles); +}); +``` + +### Using `listStaffRolesByStaffId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffRolesByStaffIdRef, ListStaffRolesByStaffIdVariables } from '@dataconnect/generated'; + +// The `listStaffRolesByStaffId` query requires an argument of type `ListStaffRolesByStaffIdVariables`: +const listStaffRolesByStaffIdVars: ListStaffRolesByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffRolesByStaffIdRef()` function to get a reference to the query. +const ref = listStaffRolesByStaffIdRef(listStaffRolesByStaffIdVars); +// Variables can be defined inline as well. +const ref = listStaffRolesByStaffIdRef({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffRolesByStaffIdRef(dataConnect, listStaffRolesByStaffIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffRoles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffRoles); +}); +``` + +## listStaffRolesByRoleId +You can execute the `listStaffRolesByRoleId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffRolesByRoleId(vars: ListStaffRolesByRoleIdVariables): QueryPromise; + +interface ListStaffRolesByRoleIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffRolesByRoleIdVariables): QueryRef; +} +export const listStaffRolesByRoleIdRef: ListStaffRolesByRoleIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffRolesByRoleId(dc: DataConnect, vars: ListStaffRolesByRoleIdVariables): QueryPromise; + +interface ListStaffRolesByRoleIdRef { + ... + (dc: DataConnect, vars: ListStaffRolesByRoleIdVariables): QueryRef; +} +export const listStaffRolesByRoleIdRef: ListStaffRolesByRoleIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffRolesByRoleIdRef: +```typescript +const name = listStaffRolesByRoleIdRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffRolesByRoleId` query requires an argument of type `ListStaffRolesByRoleIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffRolesByRoleIdVariables { + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listStaffRolesByRoleId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffRolesByRoleIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffRolesByRoleIdData { + staffRoles: ({ + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + staff: { + id: UUIDString; + fullName: string; + userId: string; + email?: string | null; + phone?: string | null; + } & Staff_Key; + } & StaffRole_Key)[]; +} +``` +### Using `listStaffRolesByRoleId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffRolesByRoleId, ListStaffRolesByRoleIdVariables } from '@dataconnect/generated'; + +// The `listStaffRolesByRoleId` query requires an argument of type `ListStaffRolesByRoleIdVariables`: +const listStaffRolesByRoleIdVars: ListStaffRolesByRoleIdVariables = { + roleId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffRolesByRoleId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffRolesByRoleId(listStaffRolesByRoleIdVars); +// Variables can be defined inline as well. +const { data } = await listStaffRolesByRoleId({ roleId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffRolesByRoleId(dataConnect, listStaffRolesByRoleIdVars); + +console.log(data.staffRoles); + +// Or, you can use the `Promise` API. +listStaffRolesByRoleId(listStaffRolesByRoleIdVars).then((response) => { + const data = response.data; + console.log(data.staffRoles); +}); +``` + +### Using `listStaffRolesByRoleId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffRolesByRoleIdRef, ListStaffRolesByRoleIdVariables } from '@dataconnect/generated'; + +// The `listStaffRolesByRoleId` query requires an argument of type `ListStaffRolesByRoleIdVariables`: +const listStaffRolesByRoleIdVars: ListStaffRolesByRoleIdVariables = { + roleId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffRolesByRoleIdRef()` function to get a reference to the query. +const ref = listStaffRolesByRoleIdRef(listStaffRolesByRoleIdVars); +// Variables can be defined inline as well. +const ref = listStaffRolesByRoleIdRef({ roleId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffRolesByRoleIdRef(dataConnect, listStaffRolesByRoleIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffRoles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffRoles); +}); +``` + +## filterStaffRoles +You can execute the `filterStaffRoles` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterStaffRoles(vars?: FilterStaffRolesVariables): QueryPromise; + +interface FilterStaffRolesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterStaffRolesVariables): QueryRef; +} +export const filterStaffRolesRef: FilterStaffRolesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterStaffRoles(dc: DataConnect, vars?: FilterStaffRolesVariables): QueryPromise; + +interface FilterStaffRolesRef { + ... + (dc: DataConnect, vars?: FilterStaffRolesVariables): QueryRef; +} +export const filterStaffRolesRef: FilterStaffRolesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterStaffRolesRef: +```typescript +const name = filterStaffRolesRef.operationName; +console.log(name); +``` + +### Variables +The `filterStaffRoles` query has an optional argument of type `FilterStaffRolesVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterStaffRolesVariables { + staffId?: UUIDString | null; + roleId?: UUIDString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `filterStaffRoles` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterStaffRolesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterStaffRolesData { + staffRoles: ({ + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + } & StaffRole_Key)[]; +} +``` +### Using `filterStaffRoles`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterStaffRoles, FilterStaffRolesVariables } from '@dataconnect/generated'; + +// The `filterStaffRoles` query has an optional argument of type `FilterStaffRolesVariables`: +const filterStaffRolesVars: FilterStaffRolesVariables = { + staffId: ..., // optional + roleId: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterStaffRoles()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterStaffRoles(filterStaffRolesVars); +// Variables can be defined inline as well. +const { data } = await filterStaffRoles({ staffId: ..., roleId: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterStaffRolesVariables` argument. +const { data } = await filterStaffRoles(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterStaffRoles(dataConnect, filterStaffRolesVars); + +console.log(data.staffRoles); + +// Or, you can use the `Promise` API. +filterStaffRoles(filterStaffRolesVars).then((response) => { + const data = response.data; + console.log(data.staffRoles); +}); +``` + +### Using `filterStaffRoles`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterStaffRolesRef, FilterStaffRolesVariables } from '@dataconnect/generated'; + +// The `filterStaffRoles` query has an optional argument of type `FilterStaffRolesVariables`: +const filterStaffRolesVars: FilterStaffRolesVariables = { + staffId: ..., // optional + roleId: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterStaffRolesRef()` function to get a reference to the query. +const ref = filterStaffRolesRef(filterStaffRolesVars); +// Variables can be defined inline as well. +const ref = filterStaffRolesRef({ staffId: ..., roleId: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterStaffRolesVariables` argument. +const ref = filterStaffRolesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterStaffRolesRef(dataConnect, filterStaffRolesVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffRoles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffRoles); +}); +``` + +## listTaskComments +You can execute the `listTaskComments` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listTaskComments(): QueryPromise; + +interface ListTaskCommentsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listTaskCommentsRef: ListTaskCommentsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listTaskComments(dc: DataConnect): QueryPromise; + +interface ListTaskCommentsRef { + ... + (dc: DataConnect): QueryRef; +} +export const listTaskCommentsRef: ListTaskCommentsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listTaskCommentsRef: +```typescript +const name = listTaskCommentsRef.operationName; +console.log(name); +``` + +### Variables +The `listTaskComments` query has no variables. +### Return Type +Recall that executing the `listTaskComments` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListTaskCommentsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListTaskCommentsData { + taskComments: ({ + id: UUIDString; + taskId: UUIDString; + teamMemberId: UUIDString; + comment: string; + isSystem: boolean; + createdAt?: TimestampString | null; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + } & TaskComment_Key)[]; +} +``` +### Using `listTaskComments`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listTaskComments } from '@dataconnect/generated'; + + +// Call the `listTaskComments()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listTaskComments(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listTaskComments(dataConnect); + +console.log(data.taskComments); + +// Or, you can use the `Promise` API. +listTaskComments().then((response) => { + const data = response.data; + console.log(data.taskComments); +}); +``` + +### Using `listTaskComments`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listTaskCommentsRef } from '@dataconnect/generated'; + + +// Call the `listTaskCommentsRef()` function to get a reference to the query. +const ref = listTaskCommentsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listTaskCommentsRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.taskComments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.taskComments); +}); +``` + +## getTaskCommentById +You can execute the `getTaskCommentById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getTaskCommentById(vars: GetTaskCommentByIdVariables): QueryPromise; + +interface GetTaskCommentByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTaskCommentByIdVariables): QueryRef; +} +export const getTaskCommentByIdRef: GetTaskCommentByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getTaskCommentById(dc: DataConnect, vars: GetTaskCommentByIdVariables): QueryPromise; + +interface GetTaskCommentByIdRef { + ... + (dc: DataConnect, vars: GetTaskCommentByIdVariables): QueryRef; +} +export const getTaskCommentByIdRef: GetTaskCommentByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getTaskCommentByIdRef: +```typescript +const name = getTaskCommentByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getTaskCommentById` query requires an argument of type `GetTaskCommentByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetTaskCommentByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getTaskCommentById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetTaskCommentByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetTaskCommentByIdData { + taskComment?: { + id: UUIDString; + taskId: UUIDString; + teamMemberId: UUIDString; + comment: string; + isSystem: boolean; + createdAt?: TimestampString | null; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + } & TaskComment_Key; +} +``` +### Using `getTaskCommentById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getTaskCommentById, GetTaskCommentByIdVariables } from '@dataconnect/generated'; + +// The `getTaskCommentById` query requires an argument of type `GetTaskCommentByIdVariables`: +const getTaskCommentByIdVars: GetTaskCommentByIdVariables = { + id: ..., +}; + +// Call the `getTaskCommentById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getTaskCommentById(getTaskCommentByIdVars); +// Variables can be defined inline as well. +const { data } = await getTaskCommentById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getTaskCommentById(dataConnect, getTaskCommentByIdVars); + +console.log(data.taskComment); + +// Or, you can use the `Promise` API. +getTaskCommentById(getTaskCommentByIdVars).then((response) => { + const data = response.data; + console.log(data.taskComment); +}); +``` + +### Using `getTaskCommentById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getTaskCommentByIdRef, GetTaskCommentByIdVariables } from '@dataconnect/generated'; + +// The `getTaskCommentById` query requires an argument of type `GetTaskCommentByIdVariables`: +const getTaskCommentByIdVars: GetTaskCommentByIdVariables = { + id: ..., +}; + +// Call the `getTaskCommentByIdRef()` function to get a reference to the query. +const ref = getTaskCommentByIdRef(getTaskCommentByIdVars); +// Variables can be defined inline as well. +const ref = getTaskCommentByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getTaskCommentByIdRef(dataConnect, getTaskCommentByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.taskComment); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.taskComment); +}); +``` + +## getTaskCommentsByTaskId +You can execute the `getTaskCommentsByTaskId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getTaskCommentsByTaskId(vars: GetTaskCommentsByTaskIdVariables): QueryPromise; + +interface GetTaskCommentsByTaskIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTaskCommentsByTaskIdVariables): QueryRef; +} +export const getTaskCommentsByTaskIdRef: GetTaskCommentsByTaskIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getTaskCommentsByTaskId(dc: DataConnect, vars: GetTaskCommentsByTaskIdVariables): QueryPromise; + +interface GetTaskCommentsByTaskIdRef { + ... + (dc: DataConnect, vars: GetTaskCommentsByTaskIdVariables): QueryRef; +} +export const getTaskCommentsByTaskIdRef: GetTaskCommentsByTaskIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getTaskCommentsByTaskIdRef: +```typescript +const name = getTaskCommentsByTaskIdRef.operationName; +console.log(name); +``` + +### Variables +The `getTaskCommentsByTaskId` query requires an argument of type `GetTaskCommentsByTaskIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetTaskCommentsByTaskIdVariables { + taskId: UUIDString; +} +``` +### Return Type +Recall that executing the `getTaskCommentsByTaskId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetTaskCommentsByTaskIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetTaskCommentsByTaskIdData { + taskComments: ({ + id: UUIDString; + taskId: UUIDString; + teamMemberId: UUIDString; + comment: string; + isSystem: boolean; + createdAt?: TimestampString | null; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + } & TaskComment_Key)[]; +} +``` +### Using `getTaskCommentsByTaskId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getTaskCommentsByTaskId, GetTaskCommentsByTaskIdVariables } from '@dataconnect/generated'; + +// The `getTaskCommentsByTaskId` query requires an argument of type `GetTaskCommentsByTaskIdVariables`: +const getTaskCommentsByTaskIdVars: GetTaskCommentsByTaskIdVariables = { + taskId: ..., +}; + +// Call the `getTaskCommentsByTaskId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getTaskCommentsByTaskId(getTaskCommentsByTaskIdVars); +// Variables can be defined inline as well. +const { data } = await getTaskCommentsByTaskId({ taskId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getTaskCommentsByTaskId(dataConnect, getTaskCommentsByTaskIdVars); + +console.log(data.taskComments); + +// Or, you can use the `Promise` API. +getTaskCommentsByTaskId(getTaskCommentsByTaskIdVars).then((response) => { + const data = response.data; + console.log(data.taskComments); +}); +``` + +### Using `getTaskCommentsByTaskId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getTaskCommentsByTaskIdRef, GetTaskCommentsByTaskIdVariables } from '@dataconnect/generated'; + +// The `getTaskCommentsByTaskId` query requires an argument of type `GetTaskCommentsByTaskIdVariables`: +const getTaskCommentsByTaskIdVars: GetTaskCommentsByTaskIdVariables = { + taskId: ..., +}; + +// Call the `getTaskCommentsByTaskIdRef()` function to get a reference to the query. +const ref = getTaskCommentsByTaskIdRef(getTaskCommentsByTaskIdVars); +// Variables can be defined inline as well. +const ref = getTaskCommentsByTaskIdRef({ taskId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getTaskCommentsByTaskIdRef(dataConnect, getTaskCommentsByTaskIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.taskComments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.taskComments); +}); +``` + +## listDocuments +You can execute the `listDocuments` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listDocuments(): QueryPromise; + +interface ListDocumentsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listDocumentsRef: ListDocumentsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listDocuments(dc: DataConnect): QueryPromise; + +interface ListDocumentsRef { + ... + (dc: DataConnect): QueryRef; +} +export const listDocumentsRef: ListDocumentsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listDocumentsRef: +```typescript +const name = listDocumentsRef.operationName; +console.log(name); +``` + +### Variables +The `listDocuments` query has no variables. +### Return Type +Recall that executing the `listDocuments` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListDocumentsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListDocumentsData { + documents: ({ + id: UUIDString; + documentType: DocumentType; + name: string; + description?: string | null; + createdAt?: TimestampString | null; + } & Document_Key)[]; +} +``` +### Using `listDocuments`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listDocuments } from '@dataconnect/generated'; + + +// Call the `listDocuments()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listDocuments(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listDocuments(dataConnect); + +console.log(data.documents); + +// Or, you can use the `Promise` API. +listDocuments().then((response) => { + const data = response.data; + console.log(data.documents); +}); +``` + +### Using `listDocuments`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listDocumentsRef } from '@dataconnect/generated'; + + +// Call the `listDocumentsRef()` function to get a reference to the query. +const ref = listDocumentsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listDocumentsRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.documents); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.documents); +}); +``` + +## getDocumentById +You can execute the `getDocumentById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getDocumentById(vars: GetDocumentByIdVariables): QueryPromise; + +interface GetDocumentByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetDocumentByIdVariables): QueryRef; +} +export const getDocumentByIdRef: GetDocumentByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getDocumentById(dc: DataConnect, vars: GetDocumentByIdVariables): QueryPromise; + +interface GetDocumentByIdRef { + ... + (dc: DataConnect, vars: GetDocumentByIdVariables): QueryRef; +} +export const getDocumentByIdRef: GetDocumentByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getDocumentByIdRef: +```typescript +const name = getDocumentByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getDocumentById` query requires an argument of type `GetDocumentByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetDocumentByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getDocumentById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetDocumentByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetDocumentByIdData { + document?: { + id: UUIDString; + documentType: DocumentType; + name: string; + description?: string | null; + createdAt?: TimestampString | null; + } & Document_Key; +} +``` +### Using `getDocumentById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getDocumentById, GetDocumentByIdVariables } from '@dataconnect/generated'; + +// The `getDocumentById` query requires an argument of type `GetDocumentByIdVariables`: +const getDocumentByIdVars: GetDocumentByIdVariables = { + id: ..., +}; + +// Call the `getDocumentById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getDocumentById(getDocumentByIdVars); +// Variables can be defined inline as well. +const { data } = await getDocumentById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getDocumentById(dataConnect, getDocumentByIdVars); + +console.log(data.document); + +// Or, you can use the `Promise` API. +getDocumentById(getDocumentByIdVars).then((response) => { + const data = response.data; + console.log(data.document); +}); +``` + +### Using `getDocumentById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getDocumentByIdRef, GetDocumentByIdVariables } from '@dataconnect/generated'; + +// The `getDocumentById` query requires an argument of type `GetDocumentByIdVariables`: +const getDocumentByIdVars: GetDocumentByIdVariables = { + id: ..., +}; + +// Call the `getDocumentByIdRef()` function to get a reference to the query. +const ref = getDocumentByIdRef(getDocumentByIdVars); +// Variables can be defined inline as well. +const ref = getDocumentByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getDocumentByIdRef(dataConnect, getDocumentByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.document); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.document); +}); +``` + +## filterDocuments +You can execute the `filterDocuments` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterDocuments(vars?: FilterDocumentsVariables): QueryPromise; + +interface FilterDocumentsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterDocumentsVariables): QueryRef; +} +export const filterDocumentsRef: FilterDocumentsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterDocuments(dc: DataConnect, vars?: FilterDocumentsVariables): QueryPromise; + +interface FilterDocumentsRef { + ... + (dc: DataConnect, vars?: FilterDocumentsVariables): QueryRef; +} +export const filterDocumentsRef: FilterDocumentsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterDocumentsRef: +```typescript +const name = filterDocumentsRef.operationName; +console.log(name); +``` + +### Variables +The `filterDocuments` query has an optional argument of type `FilterDocumentsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterDocumentsVariables { + documentType?: DocumentType | null; +} +``` +### Return Type +Recall that executing the `filterDocuments` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterDocumentsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterDocumentsData { + documents: ({ + id: UUIDString; + documentType: DocumentType; + name: string; + description?: string | null; + createdAt?: TimestampString | null; + } & Document_Key)[]; +} +``` +### Using `filterDocuments`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterDocuments, FilterDocumentsVariables } from '@dataconnect/generated'; + +// The `filterDocuments` query has an optional argument of type `FilterDocumentsVariables`: +const filterDocumentsVars: FilterDocumentsVariables = { + documentType: ..., // optional +}; + +// Call the `filterDocuments()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterDocuments(filterDocumentsVars); +// Variables can be defined inline as well. +const { data } = await filterDocuments({ documentType: ..., }); +// Since all variables are optional for this query, you can omit the `FilterDocumentsVariables` argument. +const { data } = await filterDocuments(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterDocuments(dataConnect, filterDocumentsVars); + +console.log(data.documents); + +// Or, you can use the `Promise` API. +filterDocuments(filterDocumentsVars).then((response) => { + const data = response.data; + console.log(data.documents); +}); +``` + +### Using `filterDocuments`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterDocumentsRef, FilterDocumentsVariables } from '@dataconnect/generated'; + +// The `filterDocuments` query has an optional argument of type `FilterDocumentsVariables`: +const filterDocumentsVars: FilterDocumentsVariables = { + documentType: ..., // optional +}; + +// Call the `filterDocumentsRef()` function to get a reference to the query. +const ref = filterDocumentsRef(filterDocumentsVars); +// Variables can be defined inline as well. +const ref = filterDocumentsRef({ documentType: ..., }); +// Since all variables are optional for this query, you can omit the `FilterDocumentsVariables` argument. +const ref = filterDocumentsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterDocumentsRef(dataConnect, filterDocumentsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.documents); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.documents); +}); +``` + +## listShiftsForCoverage +You can execute the `listShiftsForCoverage` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftsForCoverage(vars: ListShiftsForCoverageVariables): QueryPromise; + +interface ListShiftsForCoverageRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForCoverageVariables): QueryRef; +} +export const listShiftsForCoverageRef: ListShiftsForCoverageRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftsForCoverage(dc: DataConnect, vars: ListShiftsForCoverageVariables): QueryPromise; + +interface ListShiftsForCoverageRef { + ... + (dc: DataConnect, vars: ListShiftsForCoverageVariables): QueryRef; +} +export const listShiftsForCoverageRef: ListShiftsForCoverageRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftsForCoverageRef: +```typescript +const name = listShiftsForCoverageRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftsForCoverage` query requires an argument of type `ListShiftsForCoverageVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftsForCoverageVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that executing the `listShiftsForCoverage` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftsForCoverageData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftsForCoverageData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} +``` +### Using `listShiftsForCoverage`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForCoverage, ListShiftsForCoverageVariables } from '@dataconnect/generated'; + +// The `listShiftsForCoverage` query requires an argument of type `ListShiftsForCoverageVariables`: +const listShiftsForCoverageVars: ListShiftsForCoverageVariables = { + businessId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForCoverage()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftsForCoverage(listShiftsForCoverageVars); +// Variables can be defined inline as well. +const { data } = await listShiftsForCoverage({ businessId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftsForCoverage(dataConnect, listShiftsForCoverageVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +listShiftsForCoverage(listShiftsForCoverageVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `listShiftsForCoverage`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForCoverageRef, ListShiftsForCoverageVariables } from '@dataconnect/generated'; + +// The `listShiftsForCoverage` query requires an argument of type `ListShiftsForCoverageVariables`: +const listShiftsForCoverageVars: ListShiftsForCoverageVariables = { + businessId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForCoverageRef()` function to get a reference to the query. +const ref = listShiftsForCoverageRef(listShiftsForCoverageVars); +// Variables can be defined inline as well. +const ref = listShiftsForCoverageRef({ businessId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftsForCoverageRef(dataConnect, listShiftsForCoverageVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## listApplicationsForCoverage +You can execute the `listApplicationsForCoverage` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listApplicationsForCoverage(vars: ListApplicationsForCoverageVariables): QueryPromise; + +interface ListApplicationsForCoverageRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListApplicationsForCoverageVariables): QueryRef; +} +export const listApplicationsForCoverageRef: ListApplicationsForCoverageRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listApplicationsForCoverage(dc: DataConnect, vars: ListApplicationsForCoverageVariables): QueryPromise; + +interface ListApplicationsForCoverageRef { + ... + (dc: DataConnect, vars: ListApplicationsForCoverageVariables): QueryRef; +} +export const listApplicationsForCoverageRef: ListApplicationsForCoverageRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listApplicationsForCoverageRef: +```typescript +const name = listApplicationsForCoverageRef.operationName; +console.log(name); +``` + +### Variables +The `listApplicationsForCoverage` query requires an argument of type `ListApplicationsForCoverageVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListApplicationsForCoverageVariables { + shiftIds: UUIDString[]; +} +``` +### Return Type +Recall that executing the `listApplicationsForCoverage` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListApplicationsForCoverageData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListApplicationsForCoverageData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + } & Application_Key)[]; +} +``` +### Using `listApplicationsForCoverage`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listApplicationsForCoverage, ListApplicationsForCoverageVariables } from '@dataconnect/generated'; + +// The `listApplicationsForCoverage` query requires an argument of type `ListApplicationsForCoverageVariables`: +const listApplicationsForCoverageVars: ListApplicationsForCoverageVariables = { + shiftIds: ..., +}; + +// Call the `listApplicationsForCoverage()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listApplicationsForCoverage(listApplicationsForCoverageVars); +// Variables can be defined inline as well. +const { data } = await listApplicationsForCoverage({ shiftIds: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listApplicationsForCoverage(dataConnect, listApplicationsForCoverageVars); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +listApplicationsForCoverage(listApplicationsForCoverageVars).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `listApplicationsForCoverage`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listApplicationsForCoverageRef, ListApplicationsForCoverageVariables } from '@dataconnect/generated'; + +// The `listApplicationsForCoverage` query requires an argument of type `ListApplicationsForCoverageVariables`: +const listApplicationsForCoverageVars: ListApplicationsForCoverageVariables = { + shiftIds: ..., +}; + +// Call the `listApplicationsForCoverageRef()` function to get a reference to the query. +const ref = listApplicationsForCoverageRef(listApplicationsForCoverageVars); +// Variables can be defined inline as well. +const ref = listApplicationsForCoverageRef({ shiftIds: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listApplicationsForCoverageRef(dataConnect, listApplicationsForCoverageVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## listShiftsForDailyOpsByBusiness +You can execute the `listShiftsForDailyOpsByBusiness` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftsForDailyOpsByBusiness(vars: ListShiftsForDailyOpsByBusinessVariables): QueryPromise; + +interface ListShiftsForDailyOpsByBusinessRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForDailyOpsByBusinessVariables): QueryRef; +} +export const listShiftsForDailyOpsByBusinessRef: ListShiftsForDailyOpsByBusinessRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftsForDailyOpsByBusiness(dc: DataConnect, vars: ListShiftsForDailyOpsByBusinessVariables): QueryPromise; + +interface ListShiftsForDailyOpsByBusinessRef { + ... + (dc: DataConnect, vars: ListShiftsForDailyOpsByBusinessVariables): QueryRef; +} +export const listShiftsForDailyOpsByBusinessRef: ListShiftsForDailyOpsByBusinessRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftsForDailyOpsByBusinessRef: +```typescript +const name = listShiftsForDailyOpsByBusinessRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftsForDailyOpsByBusiness` query requires an argument of type `ListShiftsForDailyOpsByBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftsForDailyOpsByBusinessVariables { + businessId: UUIDString; + date: TimestampString; +} +``` +### Return Type +Recall that executing the `listShiftsForDailyOpsByBusiness` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftsForDailyOpsByBusinessData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftsForDailyOpsByBusinessData { + shifts: ({ + id: UUIDString; + title: string; + location?: string | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} +``` +### Using `listShiftsForDailyOpsByBusiness`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForDailyOpsByBusiness, ListShiftsForDailyOpsByBusinessVariables } from '@dataconnect/generated'; + +// The `listShiftsForDailyOpsByBusiness` query requires an argument of type `ListShiftsForDailyOpsByBusinessVariables`: +const listShiftsForDailyOpsByBusinessVars: ListShiftsForDailyOpsByBusinessVariables = { + businessId: ..., + date: ..., +}; + +// Call the `listShiftsForDailyOpsByBusiness()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftsForDailyOpsByBusiness(listShiftsForDailyOpsByBusinessVars); +// Variables can be defined inline as well. +const { data } = await listShiftsForDailyOpsByBusiness({ businessId: ..., date: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftsForDailyOpsByBusiness(dataConnect, listShiftsForDailyOpsByBusinessVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +listShiftsForDailyOpsByBusiness(listShiftsForDailyOpsByBusinessVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `listShiftsForDailyOpsByBusiness`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForDailyOpsByBusinessRef, ListShiftsForDailyOpsByBusinessVariables } from '@dataconnect/generated'; + +// The `listShiftsForDailyOpsByBusiness` query requires an argument of type `ListShiftsForDailyOpsByBusinessVariables`: +const listShiftsForDailyOpsByBusinessVars: ListShiftsForDailyOpsByBusinessVariables = { + businessId: ..., + date: ..., +}; + +// Call the `listShiftsForDailyOpsByBusinessRef()` function to get a reference to the query. +const ref = listShiftsForDailyOpsByBusinessRef(listShiftsForDailyOpsByBusinessVars); +// Variables can be defined inline as well. +const ref = listShiftsForDailyOpsByBusinessRef({ businessId: ..., date: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftsForDailyOpsByBusinessRef(dataConnect, listShiftsForDailyOpsByBusinessVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## listShiftsForDailyOpsByVendor +You can execute the `listShiftsForDailyOpsByVendor` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftsForDailyOpsByVendor(vars: ListShiftsForDailyOpsByVendorVariables): QueryPromise; + +interface ListShiftsForDailyOpsByVendorRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForDailyOpsByVendorVariables): QueryRef; +} +export const listShiftsForDailyOpsByVendorRef: ListShiftsForDailyOpsByVendorRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftsForDailyOpsByVendor(dc: DataConnect, vars: ListShiftsForDailyOpsByVendorVariables): QueryPromise; + +interface ListShiftsForDailyOpsByVendorRef { + ... + (dc: DataConnect, vars: ListShiftsForDailyOpsByVendorVariables): QueryRef; +} +export const listShiftsForDailyOpsByVendorRef: ListShiftsForDailyOpsByVendorRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftsForDailyOpsByVendorRef: +```typescript +const name = listShiftsForDailyOpsByVendorRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftsForDailyOpsByVendor` query requires an argument of type `ListShiftsForDailyOpsByVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftsForDailyOpsByVendorVariables { + vendorId: UUIDString; + date: TimestampString; +} +``` +### Return Type +Recall that executing the `listShiftsForDailyOpsByVendor` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftsForDailyOpsByVendorData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftsForDailyOpsByVendorData { + shifts: ({ + id: UUIDString; + title: string; + location?: string | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} +``` +### Using `listShiftsForDailyOpsByVendor`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForDailyOpsByVendor, ListShiftsForDailyOpsByVendorVariables } from '@dataconnect/generated'; + +// The `listShiftsForDailyOpsByVendor` query requires an argument of type `ListShiftsForDailyOpsByVendorVariables`: +const listShiftsForDailyOpsByVendorVars: ListShiftsForDailyOpsByVendorVariables = { + vendorId: ..., + date: ..., +}; + +// Call the `listShiftsForDailyOpsByVendor()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftsForDailyOpsByVendor(listShiftsForDailyOpsByVendorVars); +// Variables can be defined inline as well. +const { data } = await listShiftsForDailyOpsByVendor({ vendorId: ..., date: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftsForDailyOpsByVendor(dataConnect, listShiftsForDailyOpsByVendorVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +listShiftsForDailyOpsByVendor(listShiftsForDailyOpsByVendorVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `listShiftsForDailyOpsByVendor`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForDailyOpsByVendorRef, ListShiftsForDailyOpsByVendorVariables } from '@dataconnect/generated'; + +// The `listShiftsForDailyOpsByVendor` query requires an argument of type `ListShiftsForDailyOpsByVendorVariables`: +const listShiftsForDailyOpsByVendorVars: ListShiftsForDailyOpsByVendorVariables = { + vendorId: ..., + date: ..., +}; + +// Call the `listShiftsForDailyOpsByVendorRef()` function to get a reference to the query. +const ref = listShiftsForDailyOpsByVendorRef(listShiftsForDailyOpsByVendorVars); +// Variables can be defined inline as well. +const ref = listShiftsForDailyOpsByVendorRef({ vendorId: ..., date: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftsForDailyOpsByVendorRef(dataConnect, listShiftsForDailyOpsByVendorVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## listApplicationsForDailyOps +You can execute the `listApplicationsForDailyOps` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listApplicationsForDailyOps(vars: ListApplicationsForDailyOpsVariables): QueryPromise; + +interface ListApplicationsForDailyOpsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListApplicationsForDailyOpsVariables): QueryRef; +} +export const listApplicationsForDailyOpsRef: ListApplicationsForDailyOpsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listApplicationsForDailyOps(dc: DataConnect, vars: ListApplicationsForDailyOpsVariables): QueryPromise; + +interface ListApplicationsForDailyOpsRef { + ... + (dc: DataConnect, vars: ListApplicationsForDailyOpsVariables): QueryRef; +} +export const listApplicationsForDailyOpsRef: ListApplicationsForDailyOpsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listApplicationsForDailyOpsRef: +```typescript +const name = listApplicationsForDailyOpsRef.operationName; +console.log(name); +``` + +### Variables +The `listApplicationsForDailyOps` query requires an argument of type `ListApplicationsForDailyOpsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListApplicationsForDailyOpsVariables { + shiftIds: UUIDString[]; +} +``` +### Return Type +Recall that executing the `listApplicationsForDailyOps` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListApplicationsForDailyOpsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListApplicationsForDailyOpsData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + } & Application_Key)[]; +} +``` +### Using `listApplicationsForDailyOps`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listApplicationsForDailyOps, ListApplicationsForDailyOpsVariables } from '@dataconnect/generated'; + +// The `listApplicationsForDailyOps` query requires an argument of type `ListApplicationsForDailyOpsVariables`: +const listApplicationsForDailyOpsVars: ListApplicationsForDailyOpsVariables = { + shiftIds: ..., +}; + +// Call the `listApplicationsForDailyOps()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listApplicationsForDailyOps(listApplicationsForDailyOpsVars); +// Variables can be defined inline as well. +const { data } = await listApplicationsForDailyOps({ shiftIds: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listApplicationsForDailyOps(dataConnect, listApplicationsForDailyOpsVars); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +listApplicationsForDailyOps(listApplicationsForDailyOpsVars).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `listApplicationsForDailyOps`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listApplicationsForDailyOpsRef, ListApplicationsForDailyOpsVariables } from '@dataconnect/generated'; + +// The `listApplicationsForDailyOps` query requires an argument of type `ListApplicationsForDailyOpsVariables`: +const listApplicationsForDailyOpsVars: ListApplicationsForDailyOpsVariables = { + shiftIds: ..., +}; + +// Call the `listApplicationsForDailyOpsRef()` function to get a reference to the query. +const ref = listApplicationsForDailyOpsRef(listApplicationsForDailyOpsVars); +// Variables can be defined inline as well. +const ref = listApplicationsForDailyOpsRef({ shiftIds: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listApplicationsForDailyOpsRef(dataConnect, listApplicationsForDailyOpsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## listShiftsForForecastByBusiness +You can execute the `listShiftsForForecastByBusiness` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftsForForecastByBusiness(vars: ListShiftsForForecastByBusinessVariables): QueryPromise; + +interface ListShiftsForForecastByBusinessRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForForecastByBusinessVariables): QueryRef; +} +export const listShiftsForForecastByBusinessRef: ListShiftsForForecastByBusinessRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftsForForecastByBusiness(dc: DataConnect, vars: ListShiftsForForecastByBusinessVariables): QueryPromise; + +interface ListShiftsForForecastByBusinessRef { + ... + (dc: DataConnect, vars: ListShiftsForForecastByBusinessVariables): QueryRef; +} +export const listShiftsForForecastByBusinessRef: ListShiftsForForecastByBusinessRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftsForForecastByBusinessRef: +```typescript +const name = listShiftsForForecastByBusinessRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftsForForecastByBusiness` query requires an argument of type `ListShiftsForForecastByBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftsForForecastByBusinessVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that executing the `listShiftsForForecastByBusiness` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftsForForecastByBusinessData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftsForForecastByBusinessData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + workersNeeded?: number | null; + hours?: number | null; + cost?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} +``` +### Using `listShiftsForForecastByBusiness`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForForecastByBusiness, ListShiftsForForecastByBusinessVariables } from '@dataconnect/generated'; + +// The `listShiftsForForecastByBusiness` query requires an argument of type `ListShiftsForForecastByBusinessVariables`: +const listShiftsForForecastByBusinessVars: ListShiftsForForecastByBusinessVariables = { + businessId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForForecastByBusiness()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftsForForecastByBusiness(listShiftsForForecastByBusinessVars); +// Variables can be defined inline as well. +const { data } = await listShiftsForForecastByBusiness({ businessId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftsForForecastByBusiness(dataConnect, listShiftsForForecastByBusinessVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +listShiftsForForecastByBusiness(listShiftsForForecastByBusinessVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `listShiftsForForecastByBusiness`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForForecastByBusinessRef, ListShiftsForForecastByBusinessVariables } from '@dataconnect/generated'; + +// The `listShiftsForForecastByBusiness` query requires an argument of type `ListShiftsForForecastByBusinessVariables`: +const listShiftsForForecastByBusinessVars: ListShiftsForForecastByBusinessVariables = { + businessId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForForecastByBusinessRef()` function to get a reference to the query. +const ref = listShiftsForForecastByBusinessRef(listShiftsForForecastByBusinessVars); +// Variables can be defined inline as well. +const ref = listShiftsForForecastByBusinessRef({ businessId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftsForForecastByBusinessRef(dataConnect, listShiftsForForecastByBusinessVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## listShiftsForForecastByVendor +You can execute the `listShiftsForForecastByVendor` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftsForForecastByVendor(vars: ListShiftsForForecastByVendorVariables): QueryPromise; + +interface ListShiftsForForecastByVendorRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForForecastByVendorVariables): QueryRef; +} +export const listShiftsForForecastByVendorRef: ListShiftsForForecastByVendorRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftsForForecastByVendor(dc: DataConnect, vars: ListShiftsForForecastByVendorVariables): QueryPromise; + +interface ListShiftsForForecastByVendorRef { + ... + (dc: DataConnect, vars: ListShiftsForForecastByVendorVariables): QueryRef; +} +export const listShiftsForForecastByVendorRef: ListShiftsForForecastByVendorRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftsForForecastByVendorRef: +```typescript +const name = listShiftsForForecastByVendorRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftsForForecastByVendor` query requires an argument of type `ListShiftsForForecastByVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftsForForecastByVendorVariables { + vendorId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that executing the `listShiftsForForecastByVendor` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftsForForecastByVendorData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftsForForecastByVendorData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + workersNeeded?: number | null; + hours?: number | null; + cost?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} +``` +### Using `listShiftsForForecastByVendor`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForForecastByVendor, ListShiftsForForecastByVendorVariables } from '@dataconnect/generated'; + +// The `listShiftsForForecastByVendor` query requires an argument of type `ListShiftsForForecastByVendorVariables`: +const listShiftsForForecastByVendorVars: ListShiftsForForecastByVendorVariables = { + vendorId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForForecastByVendor()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftsForForecastByVendor(listShiftsForForecastByVendorVars); +// Variables can be defined inline as well. +const { data } = await listShiftsForForecastByVendor({ vendorId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftsForForecastByVendor(dataConnect, listShiftsForForecastByVendorVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +listShiftsForForecastByVendor(listShiftsForForecastByVendorVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `listShiftsForForecastByVendor`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForForecastByVendorRef, ListShiftsForForecastByVendorVariables } from '@dataconnect/generated'; + +// The `listShiftsForForecastByVendor` query requires an argument of type `ListShiftsForForecastByVendorVariables`: +const listShiftsForForecastByVendorVars: ListShiftsForForecastByVendorVariables = { + vendorId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForForecastByVendorRef()` function to get a reference to the query. +const ref = listShiftsForForecastByVendorRef(listShiftsForForecastByVendorVars); +// Variables can be defined inline as well. +const ref = listShiftsForForecastByVendorRef({ vendorId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftsForForecastByVendorRef(dataConnect, listShiftsForForecastByVendorVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## listShiftsForNoShowRangeByBusiness +You can execute the `listShiftsForNoShowRangeByBusiness` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftsForNoShowRangeByBusiness(vars: ListShiftsForNoShowRangeByBusinessVariables): QueryPromise; + +interface ListShiftsForNoShowRangeByBusinessRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForNoShowRangeByBusinessVariables): QueryRef; +} +export const listShiftsForNoShowRangeByBusinessRef: ListShiftsForNoShowRangeByBusinessRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftsForNoShowRangeByBusiness(dc: DataConnect, vars: ListShiftsForNoShowRangeByBusinessVariables): QueryPromise; + +interface ListShiftsForNoShowRangeByBusinessRef { + ... + (dc: DataConnect, vars: ListShiftsForNoShowRangeByBusinessVariables): QueryRef; +} +export const listShiftsForNoShowRangeByBusinessRef: ListShiftsForNoShowRangeByBusinessRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftsForNoShowRangeByBusinessRef: +```typescript +const name = listShiftsForNoShowRangeByBusinessRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftsForNoShowRangeByBusiness` query requires an argument of type `ListShiftsForNoShowRangeByBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftsForNoShowRangeByBusinessVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that executing the `listShiftsForNoShowRangeByBusiness` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftsForNoShowRangeByBusinessData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftsForNoShowRangeByBusinessData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + } & Shift_Key)[]; +} +``` +### Using `listShiftsForNoShowRangeByBusiness`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForNoShowRangeByBusiness, ListShiftsForNoShowRangeByBusinessVariables } from '@dataconnect/generated'; + +// The `listShiftsForNoShowRangeByBusiness` query requires an argument of type `ListShiftsForNoShowRangeByBusinessVariables`: +const listShiftsForNoShowRangeByBusinessVars: ListShiftsForNoShowRangeByBusinessVariables = { + businessId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForNoShowRangeByBusiness()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftsForNoShowRangeByBusiness(listShiftsForNoShowRangeByBusinessVars); +// Variables can be defined inline as well. +const { data } = await listShiftsForNoShowRangeByBusiness({ businessId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftsForNoShowRangeByBusiness(dataConnect, listShiftsForNoShowRangeByBusinessVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +listShiftsForNoShowRangeByBusiness(listShiftsForNoShowRangeByBusinessVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `listShiftsForNoShowRangeByBusiness`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForNoShowRangeByBusinessRef, ListShiftsForNoShowRangeByBusinessVariables } from '@dataconnect/generated'; + +// The `listShiftsForNoShowRangeByBusiness` query requires an argument of type `ListShiftsForNoShowRangeByBusinessVariables`: +const listShiftsForNoShowRangeByBusinessVars: ListShiftsForNoShowRangeByBusinessVariables = { + businessId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForNoShowRangeByBusinessRef()` function to get a reference to the query. +const ref = listShiftsForNoShowRangeByBusinessRef(listShiftsForNoShowRangeByBusinessVars); +// Variables can be defined inline as well. +const ref = listShiftsForNoShowRangeByBusinessRef({ businessId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftsForNoShowRangeByBusinessRef(dataConnect, listShiftsForNoShowRangeByBusinessVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## listShiftsForNoShowRangeByVendor +You can execute the `listShiftsForNoShowRangeByVendor` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftsForNoShowRangeByVendor(vars: ListShiftsForNoShowRangeByVendorVariables): QueryPromise; + +interface ListShiftsForNoShowRangeByVendorRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForNoShowRangeByVendorVariables): QueryRef; +} +export const listShiftsForNoShowRangeByVendorRef: ListShiftsForNoShowRangeByVendorRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftsForNoShowRangeByVendor(dc: DataConnect, vars: ListShiftsForNoShowRangeByVendorVariables): QueryPromise; + +interface ListShiftsForNoShowRangeByVendorRef { + ... + (dc: DataConnect, vars: ListShiftsForNoShowRangeByVendorVariables): QueryRef; +} +export const listShiftsForNoShowRangeByVendorRef: ListShiftsForNoShowRangeByVendorRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftsForNoShowRangeByVendorRef: +```typescript +const name = listShiftsForNoShowRangeByVendorRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftsForNoShowRangeByVendor` query requires an argument of type `ListShiftsForNoShowRangeByVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftsForNoShowRangeByVendorVariables { + vendorId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that executing the `listShiftsForNoShowRangeByVendor` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftsForNoShowRangeByVendorData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftsForNoShowRangeByVendorData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + } & Shift_Key)[]; +} +``` +### Using `listShiftsForNoShowRangeByVendor`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForNoShowRangeByVendor, ListShiftsForNoShowRangeByVendorVariables } from '@dataconnect/generated'; + +// The `listShiftsForNoShowRangeByVendor` query requires an argument of type `ListShiftsForNoShowRangeByVendorVariables`: +const listShiftsForNoShowRangeByVendorVars: ListShiftsForNoShowRangeByVendorVariables = { + vendorId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForNoShowRangeByVendor()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftsForNoShowRangeByVendor(listShiftsForNoShowRangeByVendorVars); +// Variables can be defined inline as well. +const { data } = await listShiftsForNoShowRangeByVendor({ vendorId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftsForNoShowRangeByVendor(dataConnect, listShiftsForNoShowRangeByVendorVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +listShiftsForNoShowRangeByVendor(listShiftsForNoShowRangeByVendorVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `listShiftsForNoShowRangeByVendor`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForNoShowRangeByVendorRef, ListShiftsForNoShowRangeByVendorVariables } from '@dataconnect/generated'; + +// The `listShiftsForNoShowRangeByVendor` query requires an argument of type `ListShiftsForNoShowRangeByVendorVariables`: +const listShiftsForNoShowRangeByVendorVars: ListShiftsForNoShowRangeByVendorVariables = { + vendorId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForNoShowRangeByVendorRef()` function to get a reference to the query. +const ref = listShiftsForNoShowRangeByVendorRef(listShiftsForNoShowRangeByVendorVars); +// Variables can be defined inline as well. +const ref = listShiftsForNoShowRangeByVendorRef({ vendorId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftsForNoShowRangeByVendorRef(dataConnect, listShiftsForNoShowRangeByVendorVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## listApplicationsForNoShowRange +You can execute the `listApplicationsForNoShowRange` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listApplicationsForNoShowRange(vars: ListApplicationsForNoShowRangeVariables): QueryPromise; + +interface ListApplicationsForNoShowRangeRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListApplicationsForNoShowRangeVariables): QueryRef; +} +export const listApplicationsForNoShowRangeRef: ListApplicationsForNoShowRangeRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listApplicationsForNoShowRange(dc: DataConnect, vars: ListApplicationsForNoShowRangeVariables): QueryPromise; + +interface ListApplicationsForNoShowRangeRef { + ... + (dc: DataConnect, vars: ListApplicationsForNoShowRangeVariables): QueryRef; +} +export const listApplicationsForNoShowRangeRef: ListApplicationsForNoShowRangeRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listApplicationsForNoShowRangeRef: +```typescript +const name = listApplicationsForNoShowRangeRef.operationName; +console.log(name); +``` + +### Variables +The `listApplicationsForNoShowRange` query requires an argument of type `ListApplicationsForNoShowRangeVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListApplicationsForNoShowRangeVariables { + shiftIds: UUIDString[]; +} +``` +### Return Type +Recall that executing the `listApplicationsForNoShowRange` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListApplicationsForNoShowRangeData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListApplicationsForNoShowRangeData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + } & Application_Key)[]; +} +``` +### Using `listApplicationsForNoShowRange`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listApplicationsForNoShowRange, ListApplicationsForNoShowRangeVariables } from '@dataconnect/generated'; + +// The `listApplicationsForNoShowRange` query requires an argument of type `ListApplicationsForNoShowRangeVariables`: +const listApplicationsForNoShowRangeVars: ListApplicationsForNoShowRangeVariables = { + shiftIds: ..., +}; + +// Call the `listApplicationsForNoShowRange()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listApplicationsForNoShowRange(listApplicationsForNoShowRangeVars); +// Variables can be defined inline as well. +const { data } = await listApplicationsForNoShowRange({ shiftIds: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listApplicationsForNoShowRange(dataConnect, listApplicationsForNoShowRangeVars); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +listApplicationsForNoShowRange(listApplicationsForNoShowRangeVars).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `listApplicationsForNoShowRange`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listApplicationsForNoShowRangeRef, ListApplicationsForNoShowRangeVariables } from '@dataconnect/generated'; + +// The `listApplicationsForNoShowRange` query requires an argument of type `ListApplicationsForNoShowRangeVariables`: +const listApplicationsForNoShowRangeVars: ListApplicationsForNoShowRangeVariables = { + shiftIds: ..., +}; + +// Call the `listApplicationsForNoShowRangeRef()` function to get a reference to the query. +const ref = listApplicationsForNoShowRangeRef(listApplicationsForNoShowRangeVars); +// Variables can be defined inline as well. +const ref = listApplicationsForNoShowRangeRef({ shiftIds: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listApplicationsForNoShowRangeRef(dataConnect, listApplicationsForNoShowRangeVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## listStaffForNoShowReport +You can execute the `listStaffForNoShowReport` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffForNoShowReport(vars: ListStaffForNoShowReportVariables): QueryPromise; + +interface ListStaffForNoShowReportRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffForNoShowReportVariables): QueryRef; +} +export const listStaffForNoShowReportRef: ListStaffForNoShowReportRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffForNoShowReport(dc: DataConnect, vars: ListStaffForNoShowReportVariables): QueryPromise; + +interface ListStaffForNoShowReportRef { + ... + (dc: DataConnect, vars: ListStaffForNoShowReportVariables): QueryRef; +} +export const listStaffForNoShowReportRef: ListStaffForNoShowReportRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffForNoShowReportRef: +```typescript +const name = listStaffForNoShowReportRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffForNoShowReport` query requires an argument of type `ListStaffForNoShowReportVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffForNoShowReportVariables { + staffIds: UUIDString[]; +} +``` +### Return Type +Recall that executing the `listStaffForNoShowReport` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffForNoShowReportData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffForNoShowReportData { + staffs: ({ + id: UUIDString; + fullName: string; + noShowCount?: number | null; + reliabilityScore?: number | null; + } & Staff_Key)[]; +} +``` +### Using `listStaffForNoShowReport`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffForNoShowReport, ListStaffForNoShowReportVariables } from '@dataconnect/generated'; + +// The `listStaffForNoShowReport` query requires an argument of type `ListStaffForNoShowReportVariables`: +const listStaffForNoShowReportVars: ListStaffForNoShowReportVariables = { + staffIds: ..., +}; + +// Call the `listStaffForNoShowReport()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffForNoShowReport(listStaffForNoShowReportVars); +// Variables can be defined inline as well. +const { data } = await listStaffForNoShowReport({ staffIds: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffForNoShowReport(dataConnect, listStaffForNoShowReportVars); + +console.log(data.staffs); + +// Or, you can use the `Promise` API. +listStaffForNoShowReport(listStaffForNoShowReportVars).then((response) => { + const data = response.data; + console.log(data.staffs); +}); +``` + +### Using `listStaffForNoShowReport`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffForNoShowReportRef, ListStaffForNoShowReportVariables } from '@dataconnect/generated'; + +// The `listStaffForNoShowReport` query requires an argument of type `ListStaffForNoShowReportVariables`: +const listStaffForNoShowReportVars: ListStaffForNoShowReportVariables = { + staffIds: ..., +}; + +// Call the `listStaffForNoShowReportRef()` function to get a reference to the query. +const ref = listStaffForNoShowReportRef(listStaffForNoShowReportVars); +// Variables can be defined inline as well. +const ref = listStaffForNoShowReportRef({ staffIds: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffForNoShowReportRef(dataConnect, listStaffForNoShowReportVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffs); +}); +``` + +## listInvoicesForSpendByBusiness +You can execute the `listInvoicesForSpendByBusiness` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listInvoicesForSpendByBusiness(vars: ListInvoicesForSpendByBusinessVariables): QueryPromise; + +interface ListInvoicesForSpendByBusinessRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesForSpendByBusinessVariables): QueryRef; +} +export const listInvoicesForSpendByBusinessRef: ListInvoicesForSpendByBusinessRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listInvoicesForSpendByBusiness(dc: DataConnect, vars: ListInvoicesForSpendByBusinessVariables): QueryPromise; + +interface ListInvoicesForSpendByBusinessRef { + ... + (dc: DataConnect, vars: ListInvoicesForSpendByBusinessVariables): QueryRef; +} +export const listInvoicesForSpendByBusinessRef: ListInvoicesForSpendByBusinessRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listInvoicesForSpendByBusinessRef: +```typescript +const name = listInvoicesForSpendByBusinessRef.operationName; +console.log(name); +``` + +### Variables +The `listInvoicesForSpendByBusiness` query requires an argument of type `ListInvoicesForSpendByBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListInvoicesForSpendByBusinessVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that executing the `listInvoicesForSpendByBusiness` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListInvoicesForSpendByBusinessData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListInvoicesForSpendByBusinessData { + invoices: ({ + id: UUIDString; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + status: InvoiceStatus; + invoiceNumber: string; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + } & Invoice_Key)[]; +} +``` +### Using `listInvoicesForSpendByBusiness`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesForSpendByBusiness, ListInvoicesForSpendByBusinessVariables } from '@dataconnect/generated'; + +// The `listInvoicesForSpendByBusiness` query requires an argument of type `ListInvoicesForSpendByBusinessVariables`: +const listInvoicesForSpendByBusinessVars: ListInvoicesForSpendByBusinessVariables = { + businessId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listInvoicesForSpendByBusiness()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listInvoicesForSpendByBusiness(listInvoicesForSpendByBusinessVars); +// Variables can be defined inline as well. +const { data } = await listInvoicesForSpendByBusiness({ businessId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listInvoicesForSpendByBusiness(dataConnect, listInvoicesForSpendByBusinessVars); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +listInvoicesForSpendByBusiness(listInvoicesForSpendByBusinessVars).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +### Using `listInvoicesForSpendByBusiness`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesForSpendByBusinessRef, ListInvoicesForSpendByBusinessVariables } from '@dataconnect/generated'; + +// The `listInvoicesForSpendByBusiness` query requires an argument of type `ListInvoicesForSpendByBusinessVariables`: +const listInvoicesForSpendByBusinessVars: ListInvoicesForSpendByBusinessVariables = { + businessId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listInvoicesForSpendByBusinessRef()` function to get a reference to the query. +const ref = listInvoicesForSpendByBusinessRef(listInvoicesForSpendByBusinessVars); +// Variables can be defined inline as well. +const ref = listInvoicesForSpendByBusinessRef({ businessId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listInvoicesForSpendByBusinessRef(dataConnect, listInvoicesForSpendByBusinessVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +## listInvoicesForSpendByVendor +You can execute the `listInvoicesForSpendByVendor` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listInvoicesForSpendByVendor(vars: ListInvoicesForSpendByVendorVariables): QueryPromise; + +interface ListInvoicesForSpendByVendorRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesForSpendByVendorVariables): QueryRef; +} +export const listInvoicesForSpendByVendorRef: ListInvoicesForSpendByVendorRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listInvoicesForSpendByVendor(dc: DataConnect, vars: ListInvoicesForSpendByVendorVariables): QueryPromise; + +interface ListInvoicesForSpendByVendorRef { + ... + (dc: DataConnect, vars: ListInvoicesForSpendByVendorVariables): QueryRef; +} +export const listInvoicesForSpendByVendorRef: ListInvoicesForSpendByVendorRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listInvoicesForSpendByVendorRef: +```typescript +const name = listInvoicesForSpendByVendorRef.operationName; +console.log(name); +``` + +### Variables +The `listInvoicesForSpendByVendor` query requires an argument of type `ListInvoicesForSpendByVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListInvoicesForSpendByVendorVariables { + vendorId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that executing the `listInvoicesForSpendByVendor` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListInvoicesForSpendByVendorData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListInvoicesForSpendByVendorData { + invoices: ({ + id: UUIDString; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + status: InvoiceStatus; + invoiceNumber: string; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + } & Invoice_Key)[]; +} +``` +### Using `listInvoicesForSpendByVendor`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesForSpendByVendor, ListInvoicesForSpendByVendorVariables } from '@dataconnect/generated'; + +// The `listInvoicesForSpendByVendor` query requires an argument of type `ListInvoicesForSpendByVendorVariables`: +const listInvoicesForSpendByVendorVars: ListInvoicesForSpendByVendorVariables = { + vendorId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listInvoicesForSpendByVendor()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listInvoicesForSpendByVendor(listInvoicesForSpendByVendorVars); +// Variables can be defined inline as well. +const { data } = await listInvoicesForSpendByVendor({ vendorId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listInvoicesForSpendByVendor(dataConnect, listInvoicesForSpendByVendorVars); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +listInvoicesForSpendByVendor(listInvoicesForSpendByVendorVars).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +### Using `listInvoicesForSpendByVendor`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesForSpendByVendorRef, ListInvoicesForSpendByVendorVariables } from '@dataconnect/generated'; + +// The `listInvoicesForSpendByVendor` query requires an argument of type `ListInvoicesForSpendByVendorVariables`: +const listInvoicesForSpendByVendorVars: ListInvoicesForSpendByVendorVariables = { + vendorId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listInvoicesForSpendByVendorRef()` function to get a reference to the query. +const ref = listInvoicesForSpendByVendorRef(listInvoicesForSpendByVendorVars); +// Variables can be defined inline as well. +const ref = listInvoicesForSpendByVendorRef({ vendorId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listInvoicesForSpendByVendorRef(dataConnect, listInvoicesForSpendByVendorVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +## listInvoicesForSpendByOrder +You can execute the `listInvoicesForSpendByOrder` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listInvoicesForSpendByOrder(vars: ListInvoicesForSpendByOrderVariables): QueryPromise; + +interface ListInvoicesForSpendByOrderRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesForSpendByOrderVariables): QueryRef; +} +export const listInvoicesForSpendByOrderRef: ListInvoicesForSpendByOrderRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listInvoicesForSpendByOrder(dc: DataConnect, vars: ListInvoicesForSpendByOrderVariables): QueryPromise; + +interface ListInvoicesForSpendByOrderRef { + ... + (dc: DataConnect, vars: ListInvoicesForSpendByOrderVariables): QueryRef; +} +export const listInvoicesForSpendByOrderRef: ListInvoicesForSpendByOrderRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listInvoicesForSpendByOrderRef: +```typescript +const name = listInvoicesForSpendByOrderRef.operationName; +console.log(name); +``` + +### Variables +The `listInvoicesForSpendByOrder` query requires an argument of type `ListInvoicesForSpendByOrderVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListInvoicesForSpendByOrderVariables { + orderId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that executing the `listInvoicesForSpendByOrder` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListInvoicesForSpendByOrderData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListInvoicesForSpendByOrderData { + invoices: ({ + id: UUIDString; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + status: InvoiceStatus; + invoiceNumber: string; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + } & Invoice_Key)[]; +} +``` +### Using `listInvoicesForSpendByOrder`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesForSpendByOrder, ListInvoicesForSpendByOrderVariables } from '@dataconnect/generated'; + +// The `listInvoicesForSpendByOrder` query requires an argument of type `ListInvoicesForSpendByOrderVariables`: +const listInvoicesForSpendByOrderVars: ListInvoicesForSpendByOrderVariables = { + orderId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listInvoicesForSpendByOrder()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listInvoicesForSpendByOrder(listInvoicesForSpendByOrderVars); +// Variables can be defined inline as well. +const { data } = await listInvoicesForSpendByOrder({ orderId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listInvoicesForSpendByOrder(dataConnect, listInvoicesForSpendByOrderVars); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +listInvoicesForSpendByOrder(listInvoicesForSpendByOrderVars).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +### Using `listInvoicesForSpendByOrder`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesForSpendByOrderRef, ListInvoicesForSpendByOrderVariables } from '@dataconnect/generated'; + +// The `listInvoicesForSpendByOrder` query requires an argument of type `ListInvoicesForSpendByOrderVariables`: +const listInvoicesForSpendByOrderVars: ListInvoicesForSpendByOrderVariables = { + orderId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listInvoicesForSpendByOrderRef()` function to get a reference to the query. +const ref = listInvoicesForSpendByOrderRef(listInvoicesForSpendByOrderVars); +// Variables can be defined inline as well. +const ref = listInvoicesForSpendByOrderRef({ orderId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listInvoicesForSpendByOrderRef(dataConnect, listInvoicesForSpendByOrderVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +## listTimesheetsForSpend +You can execute the `listTimesheetsForSpend` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listTimesheetsForSpend(vars: ListTimesheetsForSpendVariables): QueryPromise; + +interface ListTimesheetsForSpendRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListTimesheetsForSpendVariables): QueryRef; +} +export const listTimesheetsForSpendRef: ListTimesheetsForSpendRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listTimesheetsForSpend(dc: DataConnect, vars: ListTimesheetsForSpendVariables): QueryPromise; + +interface ListTimesheetsForSpendRef { + ... + (dc: DataConnect, vars: ListTimesheetsForSpendVariables): QueryRef; +} +export const listTimesheetsForSpendRef: ListTimesheetsForSpendRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listTimesheetsForSpendRef: +```typescript +const name = listTimesheetsForSpendRef.operationName; +console.log(name); +``` + +### Variables +The `listTimesheetsForSpend` query requires an argument of type `ListTimesheetsForSpendVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListTimesheetsForSpendVariables { + startTime: TimestampString; + endTime: TimestampString; +} +``` +### Return Type +Recall that executing the `listTimesheetsForSpend` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListTimesheetsForSpendData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListTimesheetsForSpendData { + shiftRoles: ({ + id: UUIDString; + hours?: number | null; + totalValue?: number | null; + shift: { + title: string; + location?: string | null; + status?: ShiftStatus | null; + date?: TimestampString | null; + order: { + business: { + businessName: string; + }; + }; + }; + role: { + costPerHour: number; + }; + })[]; +} +``` +### Using `listTimesheetsForSpend`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listTimesheetsForSpend, ListTimesheetsForSpendVariables } from '@dataconnect/generated'; + +// The `listTimesheetsForSpend` query requires an argument of type `ListTimesheetsForSpendVariables`: +const listTimesheetsForSpendVars: ListTimesheetsForSpendVariables = { + startTime: ..., + endTime: ..., +}; + +// Call the `listTimesheetsForSpend()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listTimesheetsForSpend(listTimesheetsForSpendVars); +// Variables can be defined inline as well. +const { data } = await listTimesheetsForSpend({ startTime: ..., endTime: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listTimesheetsForSpend(dataConnect, listTimesheetsForSpendVars); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +listTimesheetsForSpend(listTimesheetsForSpendVars).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +### Using `listTimesheetsForSpend`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listTimesheetsForSpendRef, ListTimesheetsForSpendVariables } from '@dataconnect/generated'; + +// The `listTimesheetsForSpend` query requires an argument of type `ListTimesheetsForSpendVariables`: +const listTimesheetsForSpendVars: ListTimesheetsForSpendVariables = { + startTime: ..., + endTime: ..., +}; + +// Call the `listTimesheetsForSpendRef()` function to get a reference to the query. +const ref = listTimesheetsForSpendRef(listTimesheetsForSpendVars); +// Variables can be defined inline as well. +const ref = listTimesheetsForSpendRef({ startTime: ..., endTime: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listTimesheetsForSpendRef(dataConnect, listTimesheetsForSpendVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +## listShiftsForPerformanceByBusiness +You can execute the `listShiftsForPerformanceByBusiness` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftsForPerformanceByBusiness(vars: ListShiftsForPerformanceByBusinessVariables): QueryPromise; + +interface ListShiftsForPerformanceByBusinessRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForPerformanceByBusinessVariables): QueryRef; +} +export const listShiftsForPerformanceByBusinessRef: ListShiftsForPerformanceByBusinessRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftsForPerformanceByBusiness(dc: DataConnect, vars: ListShiftsForPerformanceByBusinessVariables): QueryPromise; + +interface ListShiftsForPerformanceByBusinessRef { + ... + (dc: DataConnect, vars: ListShiftsForPerformanceByBusinessVariables): QueryRef; +} +export const listShiftsForPerformanceByBusinessRef: ListShiftsForPerformanceByBusinessRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftsForPerformanceByBusinessRef: +```typescript +const name = listShiftsForPerformanceByBusinessRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftsForPerformanceByBusiness` query requires an argument of type `ListShiftsForPerformanceByBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftsForPerformanceByBusinessVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that executing the `listShiftsForPerformanceByBusiness` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftsForPerformanceByBusinessData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftsForPerformanceByBusinessData { + shifts: ({ + id: UUIDString; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + createdAt?: TimestampString | null; + filledAt?: TimestampString | null; + } & Shift_Key)[]; +} +``` +### Using `listShiftsForPerformanceByBusiness`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForPerformanceByBusiness, ListShiftsForPerformanceByBusinessVariables } from '@dataconnect/generated'; + +// The `listShiftsForPerformanceByBusiness` query requires an argument of type `ListShiftsForPerformanceByBusinessVariables`: +const listShiftsForPerformanceByBusinessVars: ListShiftsForPerformanceByBusinessVariables = { + businessId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForPerformanceByBusiness()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftsForPerformanceByBusiness(listShiftsForPerformanceByBusinessVars); +// Variables can be defined inline as well. +const { data } = await listShiftsForPerformanceByBusiness({ businessId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftsForPerformanceByBusiness(dataConnect, listShiftsForPerformanceByBusinessVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +listShiftsForPerformanceByBusiness(listShiftsForPerformanceByBusinessVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `listShiftsForPerformanceByBusiness`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForPerformanceByBusinessRef, ListShiftsForPerformanceByBusinessVariables } from '@dataconnect/generated'; + +// The `listShiftsForPerformanceByBusiness` query requires an argument of type `ListShiftsForPerformanceByBusinessVariables`: +const listShiftsForPerformanceByBusinessVars: ListShiftsForPerformanceByBusinessVariables = { + businessId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForPerformanceByBusinessRef()` function to get a reference to the query. +const ref = listShiftsForPerformanceByBusinessRef(listShiftsForPerformanceByBusinessVars); +// Variables can be defined inline as well. +const ref = listShiftsForPerformanceByBusinessRef({ businessId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftsForPerformanceByBusinessRef(dataConnect, listShiftsForPerformanceByBusinessVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## listShiftsForPerformanceByVendor +You can execute the `listShiftsForPerformanceByVendor` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftsForPerformanceByVendor(vars: ListShiftsForPerformanceByVendorVariables): QueryPromise; + +interface ListShiftsForPerformanceByVendorRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForPerformanceByVendorVariables): QueryRef; +} +export const listShiftsForPerformanceByVendorRef: ListShiftsForPerformanceByVendorRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftsForPerformanceByVendor(dc: DataConnect, vars: ListShiftsForPerformanceByVendorVariables): QueryPromise; + +interface ListShiftsForPerformanceByVendorRef { + ... + (dc: DataConnect, vars: ListShiftsForPerformanceByVendorVariables): QueryRef; +} +export const listShiftsForPerformanceByVendorRef: ListShiftsForPerformanceByVendorRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftsForPerformanceByVendorRef: +```typescript +const name = listShiftsForPerformanceByVendorRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftsForPerformanceByVendor` query requires an argument of type `ListShiftsForPerformanceByVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftsForPerformanceByVendorVariables { + vendorId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that executing the `listShiftsForPerformanceByVendor` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftsForPerformanceByVendorData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftsForPerformanceByVendorData { + shifts: ({ + id: UUIDString; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + createdAt?: TimestampString | null; + filledAt?: TimestampString | null; + } & Shift_Key)[]; +} +``` +### Using `listShiftsForPerformanceByVendor`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForPerformanceByVendor, ListShiftsForPerformanceByVendorVariables } from '@dataconnect/generated'; + +// The `listShiftsForPerformanceByVendor` query requires an argument of type `ListShiftsForPerformanceByVendorVariables`: +const listShiftsForPerformanceByVendorVars: ListShiftsForPerformanceByVendorVariables = { + vendorId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForPerformanceByVendor()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftsForPerformanceByVendor(listShiftsForPerformanceByVendorVars); +// Variables can be defined inline as well. +const { data } = await listShiftsForPerformanceByVendor({ vendorId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftsForPerformanceByVendor(dataConnect, listShiftsForPerformanceByVendorVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +listShiftsForPerformanceByVendor(listShiftsForPerformanceByVendorVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `listShiftsForPerformanceByVendor`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftsForPerformanceByVendorRef, ListShiftsForPerformanceByVendorVariables } from '@dataconnect/generated'; + +// The `listShiftsForPerformanceByVendor` query requires an argument of type `ListShiftsForPerformanceByVendorVariables`: +const listShiftsForPerformanceByVendorVars: ListShiftsForPerformanceByVendorVariables = { + vendorId: ..., + startDate: ..., + endDate: ..., +}; + +// Call the `listShiftsForPerformanceByVendorRef()` function to get a reference to the query. +const ref = listShiftsForPerformanceByVendorRef(listShiftsForPerformanceByVendorVars); +// Variables can be defined inline as well. +const ref = listShiftsForPerformanceByVendorRef({ vendorId: ..., startDate: ..., endDate: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftsForPerformanceByVendorRef(dataConnect, listShiftsForPerformanceByVendorVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## listApplicationsForPerformance +You can execute the `listApplicationsForPerformance` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listApplicationsForPerformance(vars: ListApplicationsForPerformanceVariables): QueryPromise; + +interface ListApplicationsForPerformanceRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListApplicationsForPerformanceVariables): QueryRef; +} +export const listApplicationsForPerformanceRef: ListApplicationsForPerformanceRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listApplicationsForPerformance(dc: DataConnect, vars: ListApplicationsForPerformanceVariables): QueryPromise; + +interface ListApplicationsForPerformanceRef { + ... + (dc: DataConnect, vars: ListApplicationsForPerformanceVariables): QueryRef; +} +export const listApplicationsForPerformanceRef: ListApplicationsForPerformanceRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listApplicationsForPerformanceRef: +```typescript +const name = listApplicationsForPerformanceRef.operationName; +console.log(name); +``` + +### Variables +The `listApplicationsForPerformance` query requires an argument of type `ListApplicationsForPerformanceVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListApplicationsForPerformanceVariables { + shiftIds: UUIDString[]; +} +``` +### Return Type +Recall that executing the `listApplicationsForPerformance` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListApplicationsForPerformanceData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListApplicationsForPerformanceData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + } & Application_Key)[]; +} +``` +### Using `listApplicationsForPerformance`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listApplicationsForPerformance, ListApplicationsForPerformanceVariables } from '@dataconnect/generated'; + +// The `listApplicationsForPerformance` query requires an argument of type `ListApplicationsForPerformanceVariables`: +const listApplicationsForPerformanceVars: ListApplicationsForPerformanceVariables = { + shiftIds: ..., +}; + +// Call the `listApplicationsForPerformance()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listApplicationsForPerformance(listApplicationsForPerformanceVars); +// Variables can be defined inline as well. +const { data } = await listApplicationsForPerformance({ shiftIds: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listApplicationsForPerformance(dataConnect, listApplicationsForPerformanceVars); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +listApplicationsForPerformance(listApplicationsForPerformanceVars).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +### Using `listApplicationsForPerformance`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listApplicationsForPerformanceRef, ListApplicationsForPerformanceVariables } from '@dataconnect/generated'; + +// The `listApplicationsForPerformance` query requires an argument of type `ListApplicationsForPerformanceVariables`: +const listApplicationsForPerformanceVars: ListApplicationsForPerformanceVariables = { + shiftIds: ..., +}; + +// Call the `listApplicationsForPerformanceRef()` function to get a reference to the query. +const ref = listApplicationsForPerformanceRef(listApplicationsForPerformanceVars); +// Variables can be defined inline as well. +const ref = listApplicationsForPerformanceRef({ shiftIds: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listApplicationsForPerformanceRef(dataConnect, listApplicationsForPerformanceVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.applications); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.applications); +}); +``` + +## listStaffForPerformance +You can execute the `listStaffForPerformance` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffForPerformance(vars: ListStaffForPerformanceVariables): QueryPromise; + +interface ListStaffForPerformanceRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffForPerformanceVariables): QueryRef; +} +export const listStaffForPerformanceRef: ListStaffForPerformanceRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffForPerformance(dc: DataConnect, vars: ListStaffForPerformanceVariables): QueryPromise; + +interface ListStaffForPerformanceRef { + ... + (dc: DataConnect, vars: ListStaffForPerformanceVariables): QueryRef; +} +export const listStaffForPerformanceRef: ListStaffForPerformanceRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffForPerformanceRef: +```typescript +const name = listStaffForPerformanceRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffForPerformance` query requires an argument of type `ListStaffForPerformanceVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffForPerformanceVariables { + staffIds: UUIDString[]; +} +``` +### Return Type +Recall that executing the `listStaffForPerformance` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffForPerformanceData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffForPerformanceData { + staffs: ({ + id: UUIDString; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + reliabilityScore?: number | null; + } & Staff_Key)[]; +} +``` +### Using `listStaffForPerformance`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffForPerformance, ListStaffForPerformanceVariables } from '@dataconnect/generated'; + +// The `listStaffForPerformance` query requires an argument of type `ListStaffForPerformanceVariables`: +const listStaffForPerformanceVars: ListStaffForPerformanceVariables = { + staffIds: ..., +}; + +// Call the `listStaffForPerformance()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffForPerformance(listStaffForPerformanceVars); +// Variables can be defined inline as well. +const { data } = await listStaffForPerformance({ staffIds: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffForPerformance(dataConnect, listStaffForPerformanceVars); + +console.log(data.staffs); + +// Or, you can use the `Promise` API. +listStaffForPerformance(listStaffForPerformanceVars).then((response) => { + const data = response.data; + console.log(data.staffs); +}); +``` + +### Using `listStaffForPerformance`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffForPerformanceRef, ListStaffForPerformanceVariables } from '@dataconnect/generated'; + +// The `listStaffForPerformance` query requires an argument of type `ListStaffForPerformanceVariables`: +const listStaffForPerformanceVars: ListStaffForPerformanceVariables = { + staffIds: ..., +}; + +// Call the `listStaffForPerformanceRef()` function to get a reference to the query. +const ref = listStaffForPerformanceRef(listStaffForPerformanceVars); +// Variables can be defined inline as well. +const ref = listStaffForPerformanceRef({ staffIds: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffForPerformanceRef(dataConnect, listStaffForPerformanceVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffs); +}); +``` + +## listRoles +You can execute the `listRoles` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listRoles(): QueryPromise; + +interface ListRolesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listRolesRef: ListRolesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listRoles(dc: DataConnect): QueryPromise; + +interface ListRolesRef { + ... + (dc: DataConnect): QueryRef; +} +export const listRolesRef: ListRolesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listRolesRef: +```typescript +const name = listRolesRef.operationName; +console.log(name); +``` + +### Variables +The `listRoles` query has no variables. +### Return Type +Recall that executing the `listRoles` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListRolesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListRolesData { + roles: ({ + id: UUIDString; + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; + createdAt?: TimestampString | null; + } & Role_Key)[]; +} +``` +### Using `listRoles`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listRoles } from '@dataconnect/generated'; + + +// Call the `listRoles()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listRoles(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listRoles(dataConnect); + +console.log(data.roles); + +// Or, you can use the `Promise` API. +listRoles().then((response) => { + const data = response.data; + console.log(data.roles); +}); +``` + +### Using `listRoles`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listRolesRef } from '@dataconnect/generated'; + + +// Call the `listRolesRef()` function to get a reference to the query. +const ref = listRolesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listRolesRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.roles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.roles); +}); +``` + +## getRoleById +You can execute the `getRoleById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getRoleById(vars: GetRoleByIdVariables): QueryPromise; + +interface GetRoleByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetRoleByIdVariables): QueryRef; +} +export const getRoleByIdRef: GetRoleByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getRoleById(dc: DataConnect, vars: GetRoleByIdVariables): QueryPromise; + +interface GetRoleByIdRef { + ... + (dc: DataConnect, vars: GetRoleByIdVariables): QueryRef; +} +export const getRoleByIdRef: GetRoleByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getRoleByIdRef: +```typescript +const name = getRoleByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getRoleById` query requires an argument of type `GetRoleByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetRoleByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getRoleById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetRoleByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetRoleByIdData { + role?: { + id: UUIDString; + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; + createdAt?: TimestampString | null; + } & Role_Key; +} +``` +### Using `getRoleById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getRoleById, GetRoleByIdVariables } from '@dataconnect/generated'; + +// The `getRoleById` query requires an argument of type `GetRoleByIdVariables`: +const getRoleByIdVars: GetRoleByIdVariables = { + id: ..., +}; + +// Call the `getRoleById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getRoleById(getRoleByIdVars); +// Variables can be defined inline as well. +const { data } = await getRoleById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getRoleById(dataConnect, getRoleByIdVars); + +console.log(data.role); + +// Or, you can use the `Promise` API. +getRoleById(getRoleByIdVars).then((response) => { + const data = response.data; + console.log(data.role); +}); +``` + +### Using `getRoleById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getRoleByIdRef, GetRoleByIdVariables } from '@dataconnect/generated'; + +// The `getRoleById` query requires an argument of type `GetRoleByIdVariables`: +const getRoleByIdVars: GetRoleByIdVariables = { + id: ..., +}; + +// Call the `getRoleByIdRef()` function to get a reference to the query. +const ref = getRoleByIdRef(getRoleByIdVars); +// Variables can be defined inline as well. +const ref = getRoleByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getRoleByIdRef(dataConnect, getRoleByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.role); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.role); +}); +``` + +## listRolesByVendorId +You can execute the `listRolesByVendorId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listRolesByVendorId(vars: ListRolesByVendorIdVariables): QueryPromise; + +interface ListRolesByVendorIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRolesByVendorIdVariables): QueryRef; +} +export const listRolesByVendorIdRef: ListRolesByVendorIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listRolesByVendorId(dc: DataConnect, vars: ListRolesByVendorIdVariables): QueryPromise; + +interface ListRolesByVendorIdRef { + ... + (dc: DataConnect, vars: ListRolesByVendorIdVariables): QueryRef; +} +export const listRolesByVendorIdRef: ListRolesByVendorIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listRolesByVendorIdRef: +```typescript +const name = listRolesByVendorIdRef.operationName; +console.log(name); +``` + +### Variables +The `listRolesByVendorId` query requires an argument of type `ListRolesByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListRolesByVendorIdVariables { + vendorId: UUIDString; +} +``` +### Return Type +Recall that executing the `listRolesByVendorId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListRolesByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListRolesByVendorIdData { + roles: ({ + id: UUIDString; + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; + createdAt?: TimestampString | null; + } & Role_Key)[]; +} +``` +### Using `listRolesByVendorId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listRolesByVendorId, ListRolesByVendorIdVariables } from '@dataconnect/generated'; + +// The `listRolesByVendorId` query requires an argument of type `ListRolesByVendorIdVariables`: +const listRolesByVendorIdVars: ListRolesByVendorIdVariables = { + vendorId: ..., +}; + +// Call the `listRolesByVendorId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listRolesByVendorId(listRolesByVendorIdVars); +// Variables can be defined inline as well. +const { data } = await listRolesByVendorId({ vendorId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listRolesByVendorId(dataConnect, listRolesByVendorIdVars); + +console.log(data.roles); + +// Or, you can use the `Promise` API. +listRolesByVendorId(listRolesByVendorIdVars).then((response) => { + const data = response.data; + console.log(data.roles); +}); +``` + +### Using `listRolesByVendorId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listRolesByVendorIdRef, ListRolesByVendorIdVariables } from '@dataconnect/generated'; + +// The `listRolesByVendorId` query requires an argument of type `ListRolesByVendorIdVariables`: +const listRolesByVendorIdVars: ListRolesByVendorIdVariables = { + vendorId: ..., +}; + +// Call the `listRolesByVendorIdRef()` function to get a reference to the query. +const ref = listRolesByVendorIdRef(listRolesByVendorIdVars); +// Variables can be defined inline as well. +const ref = listRolesByVendorIdRef({ vendorId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listRolesByVendorIdRef(dataConnect, listRolesByVendorIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.roles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.roles); +}); +``` + +## listRolesByroleCategoryId +You can execute the `listRolesByroleCategoryId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listRolesByroleCategoryId(vars: ListRolesByroleCategoryIdVariables): QueryPromise; + +interface ListRolesByroleCategoryIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRolesByroleCategoryIdVariables): QueryRef; +} +export const listRolesByroleCategoryIdRef: ListRolesByroleCategoryIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listRolesByroleCategoryId(dc: DataConnect, vars: ListRolesByroleCategoryIdVariables): QueryPromise; + +interface ListRolesByroleCategoryIdRef { + ... + (dc: DataConnect, vars: ListRolesByroleCategoryIdVariables): QueryRef; +} +export const listRolesByroleCategoryIdRef: ListRolesByroleCategoryIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listRolesByroleCategoryIdRef: +```typescript +const name = listRolesByroleCategoryIdRef.operationName; +console.log(name); +``` + +### Variables +The `listRolesByroleCategoryId` query requires an argument of type `ListRolesByroleCategoryIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListRolesByroleCategoryIdVariables { + roleCategoryId: UUIDString; +} +``` +### Return Type +Recall that executing the `listRolesByroleCategoryId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListRolesByroleCategoryIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListRolesByroleCategoryIdData { + roles: ({ + id: UUIDString; + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; + createdAt?: TimestampString | null; + } & Role_Key)[]; +} +``` +### Using `listRolesByroleCategoryId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listRolesByroleCategoryId, ListRolesByroleCategoryIdVariables } from '@dataconnect/generated'; + +// The `listRolesByroleCategoryId` query requires an argument of type `ListRolesByroleCategoryIdVariables`: +const listRolesByroleCategoryIdVars: ListRolesByroleCategoryIdVariables = { + roleCategoryId: ..., +}; + +// Call the `listRolesByroleCategoryId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listRolesByroleCategoryId(listRolesByroleCategoryIdVars); +// Variables can be defined inline as well. +const { data } = await listRolesByroleCategoryId({ roleCategoryId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listRolesByroleCategoryId(dataConnect, listRolesByroleCategoryIdVars); + +console.log(data.roles); + +// Or, you can use the `Promise` API. +listRolesByroleCategoryId(listRolesByroleCategoryIdVars).then((response) => { + const data = response.data; + console.log(data.roles); +}); +``` + +### Using `listRolesByroleCategoryId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listRolesByroleCategoryIdRef, ListRolesByroleCategoryIdVariables } from '@dataconnect/generated'; + +// The `listRolesByroleCategoryId` query requires an argument of type `ListRolesByroleCategoryIdVariables`: +const listRolesByroleCategoryIdVars: ListRolesByroleCategoryIdVariables = { + roleCategoryId: ..., +}; + +// Call the `listRolesByroleCategoryIdRef()` function to get a reference to the query. +const ref = listRolesByroleCategoryIdRef(listRolesByroleCategoryIdVars); +// Variables can be defined inline as well. +const ref = listRolesByroleCategoryIdRef({ roleCategoryId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listRolesByroleCategoryIdRef(dataConnect, listRolesByroleCategoryIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.roles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.roles); +}); +``` + +## getShiftRoleById +You can execute the `getShiftRoleById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getShiftRoleById(vars: GetShiftRoleByIdVariables): QueryPromise; + +interface GetShiftRoleByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetShiftRoleByIdVariables): QueryRef; +} +export const getShiftRoleByIdRef: GetShiftRoleByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getShiftRoleById(dc: DataConnect, vars: GetShiftRoleByIdVariables): QueryPromise; + +interface GetShiftRoleByIdRef { + ... + (dc: DataConnect, vars: GetShiftRoleByIdVariables): QueryRef; +} +export const getShiftRoleByIdRef: GetShiftRoleByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getShiftRoleByIdRef: +```typescript +const name = getShiftRoleByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getShiftRoleById` query requires an argument of type `GetShiftRoleByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetShiftRoleByIdVariables { + shiftId: UUIDString; + roleId: UUIDString; +} +``` +### Return Type +Recall that executing the `getShiftRoleById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetShiftRoleByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetShiftRoleByIdData { + shiftRole?: { + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + order: { + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + hubName: string; + }; + }; + }; + } & ShiftRole_Key; +} +``` +### Using `getShiftRoleById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getShiftRoleById, GetShiftRoleByIdVariables } from '@dataconnect/generated'; + +// The `getShiftRoleById` query requires an argument of type `GetShiftRoleByIdVariables`: +const getShiftRoleByIdVars: GetShiftRoleByIdVariables = { + shiftId: ..., + roleId: ..., +}; + +// Call the `getShiftRoleById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getShiftRoleById(getShiftRoleByIdVars); +// Variables can be defined inline as well. +const { data } = await getShiftRoleById({ shiftId: ..., roleId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getShiftRoleById(dataConnect, getShiftRoleByIdVars); + +console.log(data.shiftRole); + +// Or, you can use the `Promise` API. +getShiftRoleById(getShiftRoleByIdVars).then((response) => { + const data = response.data; + console.log(data.shiftRole); +}); +``` + +### Using `getShiftRoleById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getShiftRoleByIdRef, GetShiftRoleByIdVariables } from '@dataconnect/generated'; + +// The `getShiftRoleById` query requires an argument of type `GetShiftRoleByIdVariables`: +const getShiftRoleByIdVars: GetShiftRoleByIdVariables = { + shiftId: ..., + roleId: ..., +}; + +// Call the `getShiftRoleByIdRef()` function to get a reference to the query. +const ref = getShiftRoleByIdRef(getShiftRoleByIdVars); +// Variables can be defined inline as well. +const ref = getShiftRoleByIdRef({ shiftId: ..., roleId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getShiftRoleByIdRef(dataConnect, getShiftRoleByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shiftRole); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shiftRole); +}); +``` + +## listShiftRolesByShiftId +You can execute the `listShiftRolesByShiftId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftRolesByShiftId(vars: ListShiftRolesByShiftIdVariables): QueryPromise; + +interface ListShiftRolesByShiftIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByShiftIdVariables): QueryRef; +} +export const listShiftRolesByShiftIdRef: ListShiftRolesByShiftIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftRolesByShiftId(dc: DataConnect, vars: ListShiftRolesByShiftIdVariables): QueryPromise; + +interface ListShiftRolesByShiftIdRef { + ... + (dc: DataConnect, vars: ListShiftRolesByShiftIdVariables): QueryRef; +} +export const listShiftRolesByShiftIdRef: ListShiftRolesByShiftIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftRolesByShiftIdRef: +```typescript +const name = listShiftRolesByShiftIdRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftRolesByShiftId` query requires an argument of type `ListShiftRolesByShiftIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftRolesByShiftIdVariables { + shiftId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listShiftRolesByShiftId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftRolesByShiftIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftRolesByShiftIdData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + order: { + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + }; + }; + } & ShiftRole_Key)[]; +} +``` +### Using `listShiftRolesByShiftId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByShiftId, ListShiftRolesByShiftIdVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByShiftId` query requires an argument of type `ListShiftRolesByShiftIdVariables`: +const listShiftRolesByShiftIdVars: ListShiftRolesByShiftIdVariables = { + shiftId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByShiftId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftRolesByShiftId(listShiftRolesByShiftIdVars); +// Variables can be defined inline as well. +const { data } = await listShiftRolesByShiftId({ shiftId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftRolesByShiftId(dataConnect, listShiftRolesByShiftIdVars); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +listShiftRolesByShiftId(listShiftRolesByShiftIdVars).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +### Using `listShiftRolesByShiftId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByShiftIdRef, ListShiftRolesByShiftIdVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByShiftId` query requires an argument of type `ListShiftRolesByShiftIdVariables`: +const listShiftRolesByShiftIdVars: ListShiftRolesByShiftIdVariables = { + shiftId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByShiftIdRef()` function to get a reference to the query. +const ref = listShiftRolesByShiftIdRef(listShiftRolesByShiftIdVars); +// Variables can be defined inline as well. +const ref = listShiftRolesByShiftIdRef({ shiftId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftRolesByShiftIdRef(dataConnect, listShiftRolesByShiftIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +## listShiftRolesByRoleId +You can execute the `listShiftRolesByRoleId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftRolesByRoleId(vars: ListShiftRolesByRoleIdVariables): QueryPromise; + +interface ListShiftRolesByRoleIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByRoleIdVariables): QueryRef; +} +export const listShiftRolesByRoleIdRef: ListShiftRolesByRoleIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftRolesByRoleId(dc: DataConnect, vars: ListShiftRolesByRoleIdVariables): QueryPromise; + +interface ListShiftRolesByRoleIdRef { + ... + (dc: DataConnect, vars: ListShiftRolesByRoleIdVariables): QueryRef; +} +export const listShiftRolesByRoleIdRef: ListShiftRolesByRoleIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftRolesByRoleIdRef: +```typescript +const name = listShiftRolesByRoleIdRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftRolesByRoleId` query requires an argument of type `ListShiftRolesByRoleIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftRolesByRoleIdVariables { + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listShiftRolesByRoleId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftRolesByRoleIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftRolesByRoleIdData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + order: { + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + }; + }; + } & ShiftRole_Key)[]; +} +``` +### Using `listShiftRolesByRoleId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByRoleId, ListShiftRolesByRoleIdVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByRoleId` query requires an argument of type `ListShiftRolesByRoleIdVariables`: +const listShiftRolesByRoleIdVars: ListShiftRolesByRoleIdVariables = { + roleId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByRoleId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftRolesByRoleId(listShiftRolesByRoleIdVars); +// Variables can be defined inline as well. +const { data } = await listShiftRolesByRoleId({ roleId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftRolesByRoleId(dataConnect, listShiftRolesByRoleIdVars); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +listShiftRolesByRoleId(listShiftRolesByRoleIdVars).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +### Using `listShiftRolesByRoleId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByRoleIdRef, ListShiftRolesByRoleIdVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByRoleId` query requires an argument of type `ListShiftRolesByRoleIdVariables`: +const listShiftRolesByRoleIdVars: ListShiftRolesByRoleIdVariables = { + roleId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByRoleIdRef()` function to get a reference to the query. +const ref = listShiftRolesByRoleIdRef(listShiftRolesByRoleIdVars); +// Variables can be defined inline as well. +const ref = listShiftRolesByRoleIdRef({ roleId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftRolesByRoleIdRef(dataConnect, listShiftRolesByRoleIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +## listShiftRolesByShiftIdAndTimeRange +You can execute the `listShiftRolesByShiftIdAndTimeRange` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftRolesByShiftIdAndTimeRange(vars: ListShiftRolesByShiftIdAndTimeRangeVariables): QueryPromise; + +interface ListShiftRolesByShiftIdAndTimeRangeRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByShiftIdAndTimeRangeVariables): QueryRef; +} +export const listShiftRolesByShiftIdAndTimeRangeRef: ListShiftRolesByShiftIdAndTimeRangeRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftRolesByShiftIdAndTimeRange(dc: DataConnect, vars: ListShiftRolesByShiftIdAndTimeRangeVariables): QueryPromise; + +interface ListShiftRolesByShiftIdAndTimeRangeRef { + ... + (dc: DataConnect, vars: ListShiftRolesByShiftIdAndTimeRangeVariables): QueryRef; +} +export const listShiftRolesByShiftIdAndTimeRangeRef: ListShiftRolesByShiftIdAndTimeRangeRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftRolesByShiftIdAndTimeRangeRef: +```typescript +const name = listShiftRolesByShiftIdAndTimeRangeRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftRolesByShiftIdAndTimeRange` query requires an argument of type `ListShiftRolesByShiftIdAndTimeRangeVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftRolesByShiftIdAndTimeRangeVariables { + shiftId: UUIDString; + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listShiftRolesByShiftIdAndTimeRange` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftRolesByShiftIdAndTimeRangeData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftRolesByShiftIdAndTimeRangeData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + order: { + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + }; + }; + } & ShiftRole_Key)[]; +} +``` +### Using `listShiftRolesByShiftIdAndTimeRange`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByShiftIdAndTimeRange, ListShiftRolesByShiftIdAndTimeRangeVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByShiftIdAndTimeRange` query requires an argument of type `ListShiftRolesByShiftIdAndTimeRangeVariables`: +const listShiftRolesByShiftIdAndTimeRangeVars: ListShiftRolesByShiftIdAndTimeRangeVariables = { + shiftId: ..., + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByShiftIdAndTimeRange()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftRolesByShiftIdAndTimeRange(listShiftRolesByShiftIdAndTimeRangeVars); +// Variables can be defined inline as well. +const { data } = await listShiftRolesByShiftIdAndTimeRange({ shiftId: ..., start: ..., end: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftRolesByShiftIdAndTimeRange(dataConnect, listShiftRolesByShiftIdAndTimeRangeVars); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +listShiftRolesByShiftIdAndTimeRange(listShiftRolesByShiftIdAndTimeRangeVars).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +### Using `listShiftRolesByShiftIdAndTimeRange`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByShiftIdAndTimeRangeRef, ListShiftRolesByShiftIdAndTimeRangeVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByShiftIdAndTimeRange` query requires an argument of type `ListShiftRolesByShiftIdAndTimeRangeVariables`: +const listShiftRolesByShiftIdAndTimeRangeVars: ListShiftRolesByShiftIdAndTimeRangeVariables = { + shiftId: ..., + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByShiftIdAndTimeRangeRef()` function to get a reference to the query. +const ref = listShiftRolesByShiftIdAndTimeRangeRef(listShiftRolesByShiftIdAndTimeRangeVars); +// Variables can be defined inline as well. +const ref = listShiftRolesByShiftIdAndTimeRangeRef({ shiftId: ..., start: ..., end: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftRolesByShiftIdAndTimeRangeRef(dataConnect, listShiftRolesByShiftIdAndTimeRangeVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +## listShiftRolesByVendorId +You can execute the `listShiftRolesByVendorId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftRolesByVendorId(vars: ListShiftRolesByVendorIdVariables): QueryPromise; + +interface ListShiftRolesByVendorIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByVendorIdVariables): QueryRef; +} +export const listShiftRolesByVendorIdRef: ListShiftRolesByVendorIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftRolesByVendorId(dc: DataConnect, vars: ListShiftRolesByVendorIdVariables): QueryPromise; + +interface ListShiftRolesByVendorIdRef { + ... + (dc: DataConnect, vars: ListShiftRolesByVendorIdVariables): QueryRef; +} +export const listShiftRolesByVendorIdRef: ListShiftRolesByVendorIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftRolesByVendorIdRef: +```typescript +const name = listShiftRolesByVendorIdRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftRolesByVendorId` query requires an argument of type `ListShiftRolesByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftRolesByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listShiftRolesByVendorId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftRolesByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftRolesByVendorIdData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + status?: ShiftStatus | null; + durationDays?: number | null; + order: { + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + } & ShiftRole_Key)[]; +} +``` +### Using `listShiftRolesByVendorId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByVendorId, ListShiftRolesByVendorIdVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByVendorId` query requires an argument of type `ListShiftRolesByVendorIdVariables`: +const listShiftRolesByVendorIdVars: ListShiftRolesByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByVendorId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftRolesByVendorId(listShiftRolesByVendorIdVars); +// Variables can be defined inline as well. +const { data } = await listShiftRolesByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftRolesByVendorId(dataConnect, listShiftRolesByVendorIdVars); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +listShiftRolesByVendorId(listShiftRolesByVendorIdVars).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +### Using `listShiftRolesByVendorId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByVendorIdRef, ListShiftRolesByVendorIdVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByVendorId` query requires an argument of type `ListShiftRolesByVendorIdVariables`: +const listShiftRolesByVendorIdVars: ListShiftRolesByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByVendorIdRef()` function to get a reference to the query. +const ref = listShiftRolesByVendorIdRef(listShiftRolesByVendorIdVars); +// Variables can be defined inline as well. +const ref = listShiftRolesByVendorIdRef({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftRolesByVendorIdRef(dataConnect, listShiftRolesByVendorIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +## listShiftRolesByBusinessAndDateRange +You can execute the `listShiftRolesByBusinessAndDateRange` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftRolesByBusinessAndDateRange(vars: ListShiftRolesByBusinessAndDateRangeVariables): QueryPromise; + +interface ListShiftRolesByBusinessAndDateRangeRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByBusinessAndDateRangeVariables): QueryRef; +} +export const listShiftRolesByBusinessAndDateRangeRef: ListShiftRolesByBusinessAndDateRangeRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftRolesByBusinessAndDateRange(dc: DataConnect, vars: ListShiftRolesByBusinessAndDateRangeVariables): QueryPromise; + +interface ListShiftRolesByBusinessAndDateRangeRef { + ... + (dc: DataConnect, vars: ListShiftRolesByBusinessAndDateRangeVariables): QueryRef; +} +export const listShiftRolesByBusinessAndDateRangeRef: ListShiftRolesByBusinessAndDateRangeRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftRolesByBusinessAndDateRangeRef: +```typescript +const name = listShiftRolesByBusinessAndDateRangeRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftRolesByBusinessAndDateRange` query requires an argument of type `ListShiftRolesByBusinessAndDateRangeVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftRolesByBusinessAndDateRangeVariables { + businessId: UUIDString; + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; + status?: ShiftStatus | null; +} +``` +### Return Type +Recall that executing the `listShiftRolesByBusinessAndDateRange` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftRolesByBusinessAndDateRangeData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftRolesByBusinessAndDateRangeData { + shiftRoles: ({ + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + hours?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + } & Role_Key; + shift: { + id: UUIDString; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + title: string; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + } & Shift_Key; + } & ShiftRole_Key)[]; +} +``` +### Using `listShiftRolesByBusinessAndDateRange`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByBusinessAndDateRange, ListShiftRolesByBusinessAndDateRangeVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByBusinessAndDateRange` query requires an argument of type `ListShiftRolesByBusinessAndDateRangeVariables`: +const listShiftRolesByBusinessAndDateRangeVars: ListShiftRolesByBusinessAndDateRangeVariables = { + businessId: ..., + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional + status: ..., // optional +}; + +// Call the `listShiftRolesByBusinessAndDateRange()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftRolesByBusinessAndDateRange(listShiftRolesByBusinessAndDateRangeVars); +// Variables can be defined inline as well. +const { data } = await listShiftRolesByBusinessAndDateRange({ businessId: ..., start: ..., end: ..., offset: ..., limit: ..., status: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftRolesByBusinessAndDateRange(dataConnect, listShiftRolesByBusinessAndDateRangeVars); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +listShiftRolesByBusinessAndDateRange(listShiftRolesByBusinessAndDateRangeVars).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +### Using `listShiftRolesByBusinessAndDateRange`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByBusinessAndDateRangeRef, ListShiftRolesByBusinessAndDateRangeVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByBusinessAndDateRange` query requires an argument of type `ListShiftRolesByBusinessAndDateRangeVariables`: +const listShiftRolesByBusinessAndDateRangeVars: ListShiftRolesByBusinessAndDateRangeVariables = { + businessId: ..., + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional + status: ..., // optional +}; + +// Call the `listShiftRolesByBusinessAndDateRangeRef()` function to get a reference to the query. +const ref = listShiftRolesByBusinessAndDateRangeRef(listShiftRolesByBusinessAndDateRangeVars); +// Variables can be defined inline as well. +const ref = listShiftRolesByBusinessAndDateRangeRef({ businessId: ..., start: ..., end: ..., offset: ..., limit: ..., status: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftRolesByBusinessAndDateRangeRef(dataConnect, listShiftRolesByBusinessAndDateRangeVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +## listShiftRolesByBusinessAndOrder +You can execute the `listShiftRolesByBusinessAndOrder` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftRolesByBusinessAndOrder(vars: ListShiftRolesByBusinessAndOrderVariables): QueryPromise; + +interface ListShiftRolesByBusinessAndOrderRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByBusinessAndOrderVariables): QueryRef; +} +export const listShiftRolesByBusinessAndOrderRef: ListShiftRolesByBusinessAndOrderRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftRolesByBusinessAndOrder(dc: DataConnect, vars: ListShiftRolesByBusinessAndOrderVariables): QueryPromise; + +interface ListShiftRolesByBusinessAndOrderRef { + ... + (dc: DataConnect, vars: ListShiftRolesByBusinessAndOrderVariables): QueryRef; +} +export const listShiftRolesByBusinessAndOrderRef: ListShiftRolesByBusinessAndOrderRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftRolesByBusinessAndOrderRef: +```typescript +const name = listShiftRolesByBusinessAndOrderRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftRolesByBusinessAndOrder` query requires an argument of type `ListShiftRolesByBusinessAndOrderVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftRolesByBusinessAndOrderVariables { + businessId: UUIDString; + orderId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listShiftRolesByBusinessAndOrder` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftRolesByBusinessAndOrderData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftRolesByBusinessAndOrderData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + orderId: UUIDString; + location?: string | null; + locationAddress?: string | null; + order: { + vendorId?: UUIDString | null; + eventName?: string | null; + date?: TimestampString | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Shift_Key; + } & ShiftRole_Key)[]; +} +``` +### Using `listShiftRolesByBusinessAndOrder`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByBusinessAndOrder, ListShiftRolesByBusinessAndOrderVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByBusinessAndOrder` query requires an argument of type `ListShiftRolesByBusinessAndOrderVariables`: +const listShiftRolesByBusinessAndOrderVars: ListShiftRolesByBusinessAndOrderVariables = { + businessId: ..., + orderId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByBusinessAndOrder()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftRolesByBusinessAndOrder(listShiftRolesByBusinessAndOrderVars); +// Variables can be defined inline as well. +const { data } = await listShiftRolesByBusinessAndOrder({ businessId: ..., orderId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftRolesByBusinessAndOrder(dataConnect, listShiftRolesByBusinessAndOrderVars); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +listShiftRolesByBusinessAndOrder(listShiftRolesByBusinessAndOrderVars).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +### Using `listShiftRolesByBusinessAndOrder`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByBusinessAndOrderRef, ListShiftRolesByBusinessAndOrderVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByBusinessAndOrder` query requires an argument of type `ListShiftRolesByBusinessAndOrderVariables`: +const listShiftRolesByBusinessAndOrderVars: ListShiftRolesByBusinessAndOrderVariables = { + businessId: ..., + orderId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByBusinessAndOrderRef()` function to get a reference to the query. +const ref = listShiftRolesByBusinessAndOrderRef(listShiftRolesByBusinessAndOrderVars); +// Variables can be defined inline as well. +const ref = listShiftRolesByBusinessAndOrderRef({ businessId: ..., orderId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftRolesByBusinessAndOrderRef(dataConnect, listShiftRolesByBusinessAndOrderVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +## listShiftRolesByBusinessDateRangeCompletedOrders +You can execute the `listShiftRolesByBusinessDateRangeCompletedOrders` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftRolesByBusinessDateRangeCompletedOrders(vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables): QueryPromise; + +interface ListShiftRolesByBusinessDateRangeCompletedOrdersRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables): QueryRef; +} +export const listShiftRolesByBusinessDateRangeCompletedOrdersRef: ListShiftRolesByBusinessDateRangeCompletedOrdersRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftRolesByBusinessDateRangeCompletedOrders(dc: DataConnect, vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables): QueryPromise; + +interface ListShiftRolesByBusinessDateRangeCompletedOrdersRef { + ... + (dc: DataConnect, vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables): QueryRef; +} +export const listShiftRolesByBusinessDateRangeCompletedOrdersRef: ListShiftRolesByBusinessDateRangeCompletedOrdersRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftRolesByBusinessDateRangeCompletedOrdersRef: +```typescript +const name = listShiftRolesByBusinessDateRangeCompletedOrdersRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftRolesByBusinessDateRangeCompletedOrders` query requires an argument of type `ListShiftRolesByBusinessDateRangeCompletedOrdersVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftRolesByBusinessDateRangeCompletedOrdersVariables { + businessId: UUIDString; + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listShiftRolesByBusinessDateRangeCompletedOrders` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftRolesByBusinessDateRangeCompletedOrdersData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftRolesByBusinessDateRangeCompletedOrdersData { + shiftRoles: ({ + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + hours?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + title: string; + status?: ShiftStatus | null; + order: { + id: UUIDString; + orderType: OrderType; + } & Order_Key; + } & Shift_Key; + } & ShiftRole_Key)[]; +} +``` +### Using `listShiftRolesByBusinessDateRangeCompletedOrders`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByBusinessDateRangeCompletedOrders, ListShiftRolesByBusinessDateRangeCompletedOrdersVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByBusinessDateRangeCompletedOrders` query requires an argument of type `ListShiftRolesByBusinessDateRangeCompletedOrdersVariables`: +const listShiftRolesByBusinessDateRangeCompletedOrdersVars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables = { + businessId: ..., + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByBusinessDateRangeCompletedOrders()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftRolesByBusinessDateRangeCompletedOrders(listShiftRolesByBusinessDateRangeCompletedOrdersVars); +// Variables can be defined inline as well. +const { data } = await listShiftRolesByBusinessDateRangeCompletedOrders({ businessId: ..., start: ..., end: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftRolesByBusinessDateRangeCompletedOrders(dataConnect, listShiftRolesByBusinessDateRangeCompletedOrdersVars); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +listShiftRolesByBusinessDateRangeCompletedOrders(listShiftRolesByBusinessDateRangeCompletedOrdersVars).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +### Using `listShiftRolesByBusinessDateRangeCompletedOrders`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByBusinessDateRangeCompletedOrdersRef, ListShiftRolesByBusinessDateRangeCompletedOrdersVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByBusinessDateRangeCompletedOrders` query requires an argument of type `ListShiftRolesByBusinessDateRangeCompletedOrdersVariables`: +const listShiftRolesByBusinessDateRangeCompletedOrdersVars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables = { + businessId: ..., + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByBusinessDateRangeCompletedOrdersRef()` function to get a reference to the query. +const ref = listShiftRolesByBusinessDateRangeCompletedOrdersRef(listShiftRolesByBusinessDateRangeCompletedOrdersVars); +// Variables can be defined inline as well. +const ref = listShiftRolesByBusinessDateRangeCompletedOrdersRef({ businessId: ..., start: ..., end: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftRolesByBusinessDateRangeCompletedOrdersRef(dataConnect, listShiftRolesByBusinessDateRangeCompletedOrdersVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +## listShiftRolesByBusinessAndDatesSummary +You can execute the `listShiftRolesByBusinessAndDatesSummary` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listShiftRolesByBusinessAndDatesSummary(vars: ListShiftRolesByBusinessAndDatesSummaryVariables): QueryPromise; + +interface ListShiftRolesByBusinessAndDatesSummaryRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByBusinessAndDatesSummaryVariables): QueryRef; +} +export const listShiftRolesByBusinessAndDatesSummaryRef: ListShiftRolesByBusinessAndDatesSummaryRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listShiftRolesByBusinessAndDatesSummary(dc: DataConnect, vars: ListShiftRolesByBusinessAndDatesSummaryVariables): QueryPromise; + +interface ListShiftRolesByBusinessAndDatesSummaryRef { + ... + (dc: DataConnect, vars: ListShiftRolesByBusinessAndDatesSummaryVariables): QueryRef; +} +export const listShiftRolesByBusinessAndDatesSummaryRef: ListShiftRolesByBusinessAndDatesSummaryRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listShiftRolesByBusinessAndDatesSummaryRef: +```typescript +const name = listShiftRolesByBusinessAndDatesSummaryRef.operationName; +console.log(name); +``` + +### Variables +The `listShiftRolesByBusinessAndDatesSummary` query requires an argument of type `ListShiftRolesByBusinessAndDatesSummaryVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListShiftRolesByBusinessAndDatesSummaryVariables { + businessId: UUIDString; + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listShiftRolesByBusinessAndDatesSummary` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListShiftRolesByBusinessAndDatesSummaryData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListShiftRolesByBusinessAndDatesSummaryData { + shiftRoles: ({ + roleId: UUIDString; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + } & Role_Key; + })[]; +} +``` +### Using `listShiftRolesByBusinessAndDatesSummary`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByBusinessAndDatesSummary, ListShiftRolesByBusinessAndDatesSummaryVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByBusinessAndDatesSummary` query requires an argument of type `ListShiftRolesByBusinessAndDatesSummaryVariables`: +const listShiftRolesByBusinessAndDatesSummaryVars: ListShiftRolesByBusinessAndDatesSummaryVariables = { + businessId: ..., + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByBusinessAndDatesSummary()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listShiftRolesByBusinessAndDatesSummary(listShiftRolesByBusinessAndDatesSummaryVars); +// Variables can be defined inline as well. +const { data } = await listShiftRolesByBusinessAndDatesSummary({ businessId: ..., start: ..., end: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listShiftRolesByBusinessAndDatesSummary(dataConnect, listShiftRolesByBusinessAndDatesSummaryVars); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +listShiftRolesByBusinessAndDatesSummary(listShiftRolesByBusinessAndDatesSummaryVars).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +### Using `listShiftRolesByBusinessAndDatesSummary`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listShiftRolesByBusinessAndDatesSummaryRef, ListShiftRolesByBusinessAndDatesSummaryVariables } from '@dataconnect/generated'; + +// The `listShiftRolesByBusinessAndDatesSummary` query requires an argument of type `ListShiftRolesByBusinessAndDatesSummaryVariables`: +const listShiftRolesByBusinessAndDatesSummaryVars: ListShiftRolesByBusinessAndDatesSummaryVariables = { + businessId: ..., + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listShiftRolesByBusinessAndDatesSummaryRef()` function to get a reference to the query. +const ref = listShiftRolesByBusinessAndDatesSummaryRef(listShiftRolesByBusinessAndDatesSummaryVars); +// Variables can be defined inline as well. +const ref = listShiftRolesByBusinessAndDatesSummaryRef({ businessId: ..., start: ..., end: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listShiftRolesByBusinessAndDatesSummaryRef(dataConnect, listShiftRolesByBusinessAndDatesSummaryVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shiftRoles); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shiftRoles); +}); +``` + +## getCompletedShiftsByBusinessId +You can execute the `getCompletedShiftsByBusinessId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getCompletedShiftsByBusinessId(vars: GetCompletedShiftsByBusinessIdVariables): QueryPromise; + +interface GetCompletedShiftsByBusinessIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetCompletedShiftsByBusinessIdVariables): QueryRef; +} +export const getCompletedShiftsByBusinessIdRef: GetCompletedShiftsByBusinessIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getCompletedShiftsByBusinessId(dc: DataConnect, vars: GetCompletedShiftsByBusinessIdVariables): QueryPromise; + +interface GetCompletedShiftsByBusinessIdRef { + ... + (dc: DataConnect, vars: GetCompletedShiftsByBusinessIdVariables): QueryRef; +} +export const getCompletedShiftsByBusinessIdRef: GetCompletedShiftsByBusinessIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getCompletedShiftsByBusinessIdRef: +```typescript +const name = getCompletedShiftsByBusinessIdRef.operationName; +console.log(name); +``` + +### Variables +The `getCompletedShiftsByBusinessId` query requires an argument of type `GetCompletedShiftsByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetCompletedShiftsByBusinessIdVariables { + businessId: UUIDString; + dateFrom: TimestampString; + dateTo: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `getCompletedShiftsByBusinessId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetCompletedShiftsByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetCompletedShiftsByBusinessIdData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + workersNeeded?: number | null; + filled?: number | null; + createdAt?: TimestampString | null; + order: { + status: OrderStatus; + }; + } & Shift_Key)[]; +} +``` +### Using `getCompletedShiftsByBusinessId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getCompletedShiftsByBusinessId, GetCompletedShiftsByBusinessIdVariables } from '@dataconnect/generated'; + +// The `getCompletedShiftsByBusinessId` query requires an argument of type `GetCompletedShiftsByBusinessIdVariables`: +const getCompletedShiftsByBusinessIdVars: GetCompletedShiftsByBusinessIdVariables = { + businessId: ..., + dateFrom: ..., + dateTo: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getCompletedShiftsByBusinessId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getCompletedShiftsByBusinessId(getCompletedShiftsByBusinessIdVars); +// Variables can be defined inline as well. +const { data } = await getCompletedShiftsByBusinessId({ businessId: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getCompletedShiftsByBusinessId(dataConnect, getCompletedShiftsByBusinessIdVars); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +getCompletedShiftsByBusinessId(getCompletedShiftsByBusinessIdVars).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +### Using `getCompletedShiftsByBusinessId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getCompletedShiftsByBusinessIdRef, GetCompletedShiftsByBusinessIdVariables } from '@dataconnect/generated'; + +// The `getCompletedShiftsByBusinessId` query requires an argument of type `GetCompletedShiftsByBusinessIdVariables`: +const getCompletedShiftsByBusinessIdVars: GetCompletedShiftsByBusinessIdVariables = { + businessId: ..., + dateFrom: ..., + dateTo: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getCompletedShiftsByBusinessIdRef()` function to get a reference to the query. +const ref = getCompletedShiftsByBusinessIdRef(getCompletedShiftsByBusinessIdVars); +// Variables can be defined inline as well. +const ref = getCompletedShiftsByBusinessIdRef({ businessId: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getCompletedShiftsByBusinessIdRef(dataConnect, getCompletedShiftsByBusinessIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.shifts); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.shifts); +}); +``` + +## listTaxForms +You can execute the `listTaxForms` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listTaxForms(vars?: ListTaxFormsVariables): QueryPromise; + +interface ListTaxFormsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListTaxFormsVariables): QueryRef; +} +export const listTaxFormsRef: ListTaxFormsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listTaxForms(dc: DataConnect, vars?: ListTaxFormsVariables): QueryPromise; + +interface ListTaxFormsRef { + ... + (dc: DataConnect, vars?: ListTaxFormsVariables): QueryRef; +} +export const listTaxFormsRef: ListTaxFormsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listTaxFormsRef: +```typescript +const name = listTaxFormsRef.operationName; +console.log(name); +``` + +### Variables +The `listTaxForms` query has an optional argument of type `ListTaxFormsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListTaxFormsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listTaxForms` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListTaxFormsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListTaxFormsData { + taxForms: ({ + id: UUIDString; + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + street?: string | null; + country?: string | null; + apt?: string | null; + state?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & TaxForm_Key)[]; +} +``` +### Using `listTaxForms`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listTaxForms, ListTaxFormsVariables } from '@dataconnect/generated'; + +// The `listTaxForms` query has an optional argument of type `ListTaxFormsVariables`: +const listTaxFormsVars: ListTaxFormsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listTaxForms()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listTaxForms(listTaxFormsVars); +// Variables can be defined inline as well. +const { data } = await listTaxForms({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListTaxFormsVariables` argument. +const { data } = await listTaxForms(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listTaxForms(dataConnect, listTaxFormsVars); + +console.log(data.taxForms); + +// Or, you can use the `Promise` API. +listTaxForms(listTaxFormsVars).then((response) => { + const data = response.data; + console.log(data.taxForms); +}); +``` + +### Using `listTaxForms`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listTaxFormsRef, ListTaxFormsVariables } from '@dataconnect/generated'; + +// The `listTaxForms` query has an optional argument of type `ListTaxFormsVariables`: +const listTaxFormsVars: ListTaxFormsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listTaxFormsRef()` function to get a reference to the query. +const ref = listTaxFormsRef(listTaxFormsVars); +// Variables can be defined inline as well. +const ref = listTaxFormsRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListTaxFormsVariables` argument. +const ref = listTaxFormsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listTaxFormsRef(dataConnect, listTaxFormsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.taxForms); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.taxForms); +}); +``` + +## getTaxFormById +You can execute the `getTaxFormById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getTaxFormById(vars: GetTaxFormByIdVariables): QueryPromise; + +interface GetTaxFormByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTaxFormByIdVariables): QueryRef; +} +export const getTaxFormByIdRef: GetTaxFormByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getTaxFormById(dc: DataConnect, vars: GetTaxFormByIdVariables): QueryPromise; + +interface GetTaxFormByIdRef { + ... + (dc: DataConnect, vars: GetTaxFormByIdVariables): QueryRef; +} +export const getTaxFormByIdRef: GetTaxFormByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getTaxFormByIdRef: +```typescript +const name = getTaxFormByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getTaxFormById` query requires an argument of type `GetTaxFormByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetTaxFormByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getTaxFormById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetTaxFormByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetTaxFormByIdData { + taxForm?: { + id: UUIDString; + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + street?: string | null; + country?: string | null; + apt?: string | null; + state?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & TaxForm_Key; +} +``` +### Using `getTaxFormById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getTaxFormById, GetTaxFormByIdVariables } from '@dataconnect/generated'; + +// The `getTaxFormById` query requires an argument of type `GetTaxFormByIdVariables`: +const getTaxFormByIdVars: GetTaxFormByIdVariables = { + id: ..., +}; + +// Call the `getTaxFormById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getTaxFormById(getTaxFormByIdVars); +// Variables can be defined inline as well. +const { data } = await getTaxFormById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getTaxFormById(dataConnect, getTaxFormByIdVars); + +console.log(data.taxForm); + +// Or, you can use the `Promise` API. +getTaxFormById(getTaxFormByIdVars).then((response) => { + const data = response.data; + console.log(data.taxForm); +}); +``` + +### Using `getTaxFormById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getTaxFormByIdRef, GetTaxFormByIdVariables } from '@dataconnect/generated'; + +// The `getTaxFormById` query requires an argument of type `GetTaxFormByIdVariables`: +const getTaxFormByIdVars: GetTaxFormByIdVariables = { + id: ..., +}; + +// Call the `getTaxFormByIdRef()` function to get a reference to the query. +const ref = getTaxFormByIdRef(getTaxFormByIdVars); +// Variables can be defined inline as well. +const ref = getTaxFormByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getTaxFormByIdRef(dataConnect, getTaxFormByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.taxForm); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.taxForm); +}); +``` + +## getTaxFormsByStaffId +You can execute the `getTaxFormsByStaffId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getTaxFormsByStaffId(vars: GetTaxFormsByStaffIdVariables): QueryPromise; + +interface GetTaxFormsByStaffIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTaxFormsByStaffIdVariables): QueryRef; +} +export const getTaxFormsByStaffIdRef: GetTaxFormsByStaffIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getTaxFormsByStaffId(dc: DataConnect, vars: GetTaxFormsByStaffIdVariables): QueryPromise; + +interface GetTaxFormsByStaffIdRef { + ... + (dc: DataConnect, vars: GetTaxFormsByStaffIdVariables): QueryRef; +} +export const getTaxFormsByStaffIdRef: GetTaxFormsByStaffIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getTaxFormsByStaffIdRef: +```typescript +const name = getTaxFormsByStaffIdRef.operationName; +console.log(name); +``` + +### Variables +The `getTaxFormsByStaffId` query requires an argument of type `GetTaxFormsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetTaxFormsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `getTaxFormsByStaffId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetTaxFormsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetTaxFormsByStaffIdData { + taxForms: ({ + id: UUIDString; + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + street?: string | null; + country?: string | null; + apt?: string | null; + state?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & TaxForm_Key)[]; +} +``` +### Using `getTaxFormsByStaffId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getTaxFormsByStaffId, GetTaxFormsByStaffIdVariables } from '@dataconnect/generated'; + +// The `getTaxFormsByStaffId` query requires an argument of type `GetTaxFormsByStaffIdVariables`: +const getTaxFormsByStaffIdVars: GetTaxFormsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getTaxFormsByStaffId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getTaxFormsByStaffId(getTaxFormsByStaffIdVars); +// Variables can be defined inline as well. +const { data } = await getTaxFormsByStaffId({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getTaxFormsByStaffId(dataConnect, getTaxFormsByStaffIdVars); + +console.log(data.taxForms); + +// Or, you can use the `Promise` API. +getTaxFormsByStaffId(getTaxFormsByStaffIdVars).then((response) => { + const data = response.data; + console.log(data.taxForms); +}); +``` + +### Using `getTaxFormsByStaffId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getTaxFormsByStaffIdRef, GetTaxFormsByStaffIdVariables } from '@dataconnect/generated'; + +// The `getTaxFormsByStaffId` query requires an argument of type `GetTaxFormsByStaffIdVariables`: +const getTaxFormsByStaffIdVars: GetTaxFormsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getTaxFormsByStaffIdRef()` function to get a reference to the query. +const ref = getTaxFormsByStaffIdRef(getTaxFormsByStaffIdVars); +// Variables can be defined inline as well. +const ref = getTaxFormsByStaffIdRef({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getTaxFormsByStaffIdRef(dataConnect, getTaxFormsByStaffIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.taxForms); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.taxForms); +}); +``` + +## listTaxFormsWhere +You can execute the `listTaxFormsWhere` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listTaxFormsWhere(vars?: ListTaxFormsWhereVariables): QueryPromise; + +interface ListTaxFormsWhereRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListTaxFormsWhereVariables): QueryRef; +} +export const listTaxFormsWhereRef: ListTaxFormsWhereRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listTaxFormsWhere(dc: DataConnect, vars?: ListTaxFormsWhereVariables): QueryPromise; + +interface ListTaxFormsWhereRef { + ... + (dc: DataConnect, vars?: ListTaxFormsWhereVariables): QueryRef; +} +export const listTaxFormsWhereRef: ListTaxFormsWhereRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listTaxFormsWhereRef: +```typescript +const name = listTaxFormsWhereRef.operationName; +console.log(name); +``` + +### Variables +The `listTaxFormsWhere` query has an optional argument of type `ListTaxFormsWhereVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListTaxFormsWhereVariables { + formType?: TaxFormType | null; + status?: TaxFormStatus | null; + staffId?: UUIDString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listTaxFormsWhere` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListTaxFormsWhereData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListTaxFormsWhereData { + taxForms: ({ + id: UUIDString; + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + street?: string | null; + country?: string | null; + apt?: string | null; + state?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & TaxForm_Key)[]; +} +``` +### Using `listTaxFormsWhere`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listTaxFormsWhere, ListTaxFormsWhereVariables } from '@dataconnect/generated'; + +// The `listTaxFormsWhere` query has an optional argument of type `ListTaxFormsWhereVariables`: +const listTaxFormsWhereVars: ListTaxFormsWhereVariables = { + formType: ..., // optional + status: ..., // optional + staffId: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listTaxFormsWhere()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listTaxFormsWhere(listTaxFormsWhereVars); +// Variables can be defined inline as well. +const { data } = await listTaxFormsWhere({ formType: ..., status: ..., staffId: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListTaxFormsWhereVariables` argument. +const { data } = await listTaxFormsWhere(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listTaxFormsWhere(dataConnect, listTaxFormsWhereVars); + +console.log(data.taxForms); + +// Or, you can use the `Promise` API. +listTaxFormsWhere(listTaxFormsWhereVars).then((response) => { + const data = response.data; + console.log(data.taxForms); +}); +``` + +### Using `listTaxFormsWhere`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listTaxFormsWhereRef, ListTaxFormsWhereVariables } from '@dataconnect/generated'; + +// The `listTaxFormsWhere` query has an optional argument of type `ListTaxFormsWhereVariables`: +const listTaxFormsWhereVars: ListTaxFormsWhereVariables = { + formType: ..., // optional + status: ..., // optional + staffId: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listTaxFormsWhereRef()` function to get a reference to the query. +const ref = listTaxFormsWhereRef(listTaxFormsWhereVars); +// Variables can be defined inline as well. +const ref = listTaxFormsWhereRef({ formType: ..., status: ..., staffId: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListTaxFormsWhereVariables` argument. +const ref = listTaxFormsWhereRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listTaxFormsWhereRef(dataConnect, listTaxFormsWhereVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.taxForms); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.taxForms); +}); +``` + +## listFaqDatas +You can execute the `listFaqDatas` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listFaqDatas(): QueryPromise; + +interface ListFaqDatasRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listFaqDatasRef: ListFaqDatasRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listFaqDatas(dc: DataConnect): QueryPromise; + +interface ListFaqDatasRef { + ... + (dc: DataConnect): QueryRef; +} +export const listFaqDatasRef: ListFaqDatasRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listFaqDatasRef: +```typescript +const name = listFaqDatasRef.operationName; +console.log(name); +``` + +### Variables +The `listFaqDatas` query has no variables. +### Return Type +Recall that executing the `listFaqDatas` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListFaqDatasData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListFaqDatasData { + faqDatas: ({ + id: UUIDString; + category: string; + questions?: unknown[] | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & FaqData_Key)[]; +} +``` +### Using `listFaqDatas`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listFaqDatas } from '@dataconnect/generated'; + + +// Call the `listFaqDatas()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listFaqDatas(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listFaqDatas(dataConnect); + +console.log(data.faqDatas); + +// Or, you can use the `Promise` API. +listFaqDatas().then((response) => { + const data = response.data; + console.log(data.faqDatas); +}); +``` + +### Using `listFaqDatas`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listFaqDatasRef } from '@dataconnect/generated'; + + +// Call the `listFaqDatasRef()` function to get a reference to the query. +const ref = listFaqDatasRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listFaqDatasRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.faqDatas); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.faqDatas); +}); +``` + +## getFaqDataById +You can execute the `getFaqDataById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getFaqDataById(vars: GetFaqDataByIdVariables): QueryPromise; + +interface GetFaqDataByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetFaqDataByIdVariables): QueryRef; +} +export const getFaqDataByIdRef: GetFaqDataByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getFaqDataById(dc: DataConnect, vars: GetFaqDataByIdVariables): QueryPromise; + +interface GetFaqDataByIdRef { + ... + (dc: DataConnect, vars: GetFaqDataByIdVariables): QueryRef; +} +export const getFaqDataByIdRef: GetFaqDataByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getFaqDataByIdRef: +```typescript +const name = getFaqDataByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getFaqDataById` query requires an argument of type `GetFaqDataByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetFaqDataByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getFaqDataById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetFaqDataByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetFaqDataByIdData { + faqData?: { + id: UUIDString; + category: string; + questions?: unknown[] | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & FaqData_Key; +} +``` +### Using `getFaqDataById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getFaqDataById, GetFaqDataByIdVariables } from '@dataconnect/generated'; + +// The `getFaqDataById` query requires an argument of type `GetFaqDataByIdVariables`: +const getFaqDataByIdVars: GetFaqDataByIdVariables = { + id: ..., +}; + +// Call the `getFaqDataById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getFaqDataById(getFaqDataByIdVars); +// Variables can be defined inline as well. +const { data } = await getFaqDataById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getFaqDataById(dataConnect, getFaqDataByIdVars); + +console.log(data.faqData); + +// Or, you can use the `Promise` API. +getFaqDataById(getFaqDataByIdVars).then((response) => { + const data = response.data; + console.log(data.faqData); +}); +``` + +### Using `getFaqDataById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getFaqDataByIdRef, GetFaqDataByIdVariables } from '@dataconnect/generated'; + +// The `getFaqDataById` query requires an argument of type `GetFaqDataByIdVariables`: +const getFaqDataByIdVars: GetFaqDataByIdVariables = { + id: ..., +}; + +// Call the `getFaqDataByIdRef()` function to get a reference to the query. +const ref = getFaqDataByIdRef(getFaqDataByIdVars); +// Variables can be defined inline as well. +const ref = getFaqDataByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getFaqDataByIdRef(dataConnect, getFaqDataByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.faqData); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.faqData); +}); +``` + +## filterFaqDatas +You can execute the `filterFaqDatas` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterFaqDatas(vars?: FilterFaqDatasVariables): QueryPromise; + +interface FilterFaqDatasRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterFaqDatasVariables): QueryRef; +} +export const filterFaqDatasRef: FilterFaqDatasRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterFaqDatas(dc: DataConnect, vars?: FilterFaqDatasVariables): QueryPromise; + +interface FilterFaqDatasRef { + ... + (dc: DataConnect, vars?: FilterFaqDatasVariables): QueryRef; +} +export const filterFaqDatasRef: FilterFaqDatasRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterFaqDatasRef: +```typescript +const name = filterFaqDatasRef.operationName; +console.log(name); +``` + +### Variables +The `filterFaqDatas` query has an optional argument of type `FilterFaqDatasVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterFaqDatasVariables { + category?: string | null; +} +``` +### Return Type +Recall that executing the `filterFaqDatas` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterFaqDatasData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterFaqDatasData { + faqDatas: ({ + id: UUIDString; + category: string; + questions?: unknown[] | null; + } & FaqData_Key)[]; +} +``` +### Using `filterFaqDatas`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterFaqDatas, FilterFaqDatasVariables } from '@dataconnect/generated'; + +// The `filterFaqDatas` query has an optional argument of type `FilterFaqDatasVariables`: +const filterFaqDatasVars: FilterFaqDatasVariables = { + category: ..., // optional +}; + +// Call the `filterFaqDatas()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterFaqDatas(filterFaqDatasVars); +// Variables can be defined inline as well. +const { data } = await filterFaqDatas({ category: ..., }); +// Since all variables are optional for this query, you can omit the `FilterFaqDatasVariables` argument. +const { data } = await filterFaqDatas(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterFaqDatas(dataConnect, filterFaqDatasVars); + +console.log(data.faqDatas); + +// Or, you can use the `Promise` API. +filterFaqDatas(filterFaqDatasVars).then((response) => { + const data = response.data; + console.log(data.faqDatas); +}); +``` + +### Using `filterFaqDatas`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterFaqDatasRef, FilterFaqDatasVariables } from '@dataconnect/generated'; + +// The `filterFaqDatas` query has an optional argument of type `FilterFaqDatasVariables`: +const filterFaqDatasVars: FilterFaqDatasVariables = { + category: ..., // optional +}; + +// Call the `filterFaqDatasRef()` function to get a reference to the query. +const ref = filterFaqDatasRef(filterFaqDatasVars); +// Variables can be defined inline as well. +const ref = filterFaqDatasRef({ category: ..., }); +// Since all variables are optional for this query, you can omit the `FilterFaqDatasVariables` argument. +const ref = filterFaqDatasRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterFaqDatasRef(dataConnect, filterFaqDatasVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.faqDatas); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.faqDatas); +}); +``` + +## getStaffCourseById +You can execute the `getStaffCourseById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getStaffCourseById(vars: GetStaffCourseByIdVariables): QueryPromise; + +interface GetStaffCourseByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffCourseByIdVariables): QueryRef; +} +export const getStaffCourseByIdRef: GetStaffCourseByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getStaffCourseById(dc: DataConnect, vars: GetStaffCourseByIdVariables): QueryPromise; + +interface GetStaffCourseByIdRef { + ... + (dc: DataConnect, vars: GetStaffCourseByIdVariables): QueryRef; +} +export const getStaffCourseByIdRef: GetStaffCourseByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getStaffCourseByIdRef: +```typescript +const name = getStaffCourseByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getStaffCourseById` query requires an argument of type `GetStaffCourseByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetStaffCourseByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getStaffCourseById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetStaffCourseByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetStaffCourseByIdData { + staffCourse?: { + id: UUIDString; + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & StaffCourse_Key; +} +``` +### Using `getStaffCourseById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getStaffCourseById, GetStaffCourseByIdVariables } from '@dataconnect/generated'; + +// The `getStaffCourseById` query requires an argument of type `GetStaffCourseByIdVariables`: +const getStaffCourseByIdVars: GetStaffCourseByIdVariables = { + id: ..., +}; + +// Call the `getStaffCourseById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getStaffCourseById(getStaffCourseByIdVars); +// Variables can be defined inline as well. +const { data } = await getStaffCourseById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getStaffCourseById(dataConnect, getStaffCourseByIdVars); + +console.log(data.staffCourse); + +// Or, you can use the `Promise` API. +getStaffCourseById(getStaffCourseByIdVars).then((response) => { + const data = response.data; + console.log(data.staffCourse); +}); +``` + +### Using `getStaffCourseById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getStaffCourseByIdRef, GetStaffCourseByIdVariables } from '@dataconnect/generated'; + +// The `getStaffCourseById` query requires an argument of type `GetStaffCourseByIdVariables`: +const getStaffCourseByIdVars: GetStaffCourseByIdVariables = { + id: ..., +}; + +// Call the `getStaffCourseByIdRef()` function to get a reference to the query. +const ref = getStaffCourseByIdRef(getStaffCourseByIdVars); +// Variables can be defined inline as well. +const ref = getStaffCourseByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getStaffCourseByIdRef(dataConnect, getStaffCourseByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffCourse); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffCourse); +}); +``` + +## listStaffCoursesByStaffId +You can execute the `listStaffCoursesByStaffId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffCoursesByStaffId(vars: ListStaffCoursesByStaffIdVariables): QueryPromise; + +interface ListStaffCoursesByStaffIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffCoursesByStaffIdVariables): QueryRef; +} +export const listStaffCoursesByStaffIdRef: ListStaffCoursesByStaffIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffCoursesByStaffId(dc: DataConnect, vars: ListStaffCoursesByStaffIdVariables): QueryPromise; + +interface ListStaffCoursesByStaffIdRef { + ... + (dc: DataConnect, vars: ListStaffCoursesByStaffIdVariables): QueryRef; +} +export const listStaffCoursesByStaffIdRef: ListStaffCoursesByStaffIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffCoursesByStaffIdRef: +```typescript +const name = listStaffCoursesByStaffIdRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffCoursesByStaffId` query requires an argument of type `ListStaffCoursesByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffCoursesByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listStaffCoursesByStaffId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffCoursesByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffCoursesByStaffIdData { + staffCourses: ({ + id: UUIDString; + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & StaffCourse_Key)[]; +} +``` +### Using `listStaffCoursesByStaffId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffCoursesByStaffId, ListStaffCoursesByStaffIdVariables } from '@dataconnect/generated'; + +// The `listStaffCoursesByStaffId` query requires an argument of type `ListStaffCoursesByStaffIdVariables`: +const listStaffCoursesByStaffIdVars: ListStaffCoursesByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffCoursesByStaffId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffCoursesByStaffId(listStaffCoursesByStaffIdVars); +// Variables can be defined inline as well. +const { data } = await listStaffCoursesByStaffId({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffCoursesByStaffId(dataConnect, listStaffCoursesByStaffIdVars); + +console.log(data.staffCourses); + +// Or, you can use the `Promise` API. +listStaffCoursesByStaffId(listStaffCoursesByStaffIdVars).then((response) => { + const data = response.data; + console.log(data.staffCourses); +}); +``` + +### Using `listStaffCoursesByStaffId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffCoursesByStaffIdRef, ListStaffCoursesByStaffIdVariables } from '@dataconnect/generated'; + +// The `listStaffCoursesByStaffId` query requires an argument of type `ListStaffCoursesByStaffIdVariables`: +const listStaffCoursesByStaffIdVars: ListStaffCoursesByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffCoursesByStaffIdRef()` function to get a reference to the query. +const ref = listStaffCoursesByStaffIdRef(listStaffCoursesByStaffIdVars); +// Variables can be defined inline as well. +const ref = listStaffCoursesByStaffIdRef({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffCoursesByStaffIdRef(dataConnect, listStaffCoursesByStaffIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffCourses); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffCourses); +}); +``` + +## listStaffCoursesByCourseId +You can execute the `listStaffCoursesByCourseId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffCoursesByCourseId(vars: ListStaffCoursesByCourseIdVariables): QueryPromise; + +interface ListStaffCoursesByCourseIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffCoursesByCourseIdVariables): QueryRef; +} +export const listStaffCoursesByCourseIdRef: ListStaffCoursesByCourseIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffCoursesByCourseId(dc: DataConnect, vars: ListStaffCoursesByCourseIdVariables): QueryPromise; + +interface ListStaffCoursesByCourseIdRef { + ... + (dc: DataConnect, vars: ListStaffCoursesByCourseIdVariables): QueryRef; +} +export const listStaffCoursesByCourseIdRef: ListStaffCoursesByCourseIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffCoursesByCourseIdRef: +```typescript +const name = listStaffCoursesByCourseIdRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffCoursesByCourseId` query requires an argument of type `ListStaffCoursesByCourseIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffCoursesByCourseIdVariables { + courseId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listStaffCoursesByCourseId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffCoursesByCourseIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffCoursesByCourseIdData { + staffCourses: ({ + id: UUIDString; + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & StaffCourse_Key)[]; +} +``` +### Using `listStaffCoursesByCourseId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffCoursesByCourseId, ListStaffCoursesByCourseIdVariables } from '@dataconnect/generated'; + +// The `listStaffCoursesByCourseId` query requires an argument of type `ListStaffCoursesByCourseIdVariables`: +const listStaffCoursesByCourseIdVars: ListStaffCoursesByCourseIdVariables = { + courseId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffCoursesByCourseId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffCoursesByCourseId(listStaffCoursesByCourseIdVars); +// Variables can be defined inline as well. +const { data } = await listStaffCoursesByCourseId({ courseId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffCoursesByCourseId(dataConnect, listStaffCoursesByCourseIdVars); + +console.log(data.staffCourses); + +// Or, you can use the `Promise` API. +listStaffCoursesByCourseId(listStaffCoursesByCourseIdVars).then((response) => { + const data = response.data; + console.log(data.staffCourses); +}); +``` + +### Using `listStaffCoursesByCourseId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffCoursesByCourseIdRef, ListStaffCoursesByCourseIdVariables } from '@dataconnect/generated'; + +// The `listStaffCoursesByCourseId` query requires an argument of type `ListStaffCoursesByCourseIdVariables`: +const listStaffCoursesByCourseIdVars: ListStaffCoursesByCourseIdVariables = { + courseId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffCoursesByCourseIdRef()` function to get a reference to the query. +const ref = listStaffCoursesByCourseIdRef(listStaffCoursesByCourseIdVars); +// Variables can be defined inline as well. +const ref = listStaffCoursesByCourseIdRef({ courseId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffCoursesByCourseIdRef(dataConnect, listStaffCoursesByCourseIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffCourses); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffCourses); +}); +``` + +## getStaffCourseByStaffAndCourse +You can execute the `getStaffCourseByStaffAndCourse` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getStaffCourseByStaffAndCourse(vars: GetStaffCourseByStaffAndCourseVariables): QueryPromise; + +interface GetStaffCourseByStaffAndCourseRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffCourseByStaffAndCourseVariables): QueryRef; +} +export const getStaffCourseByStaffAndCourseRef: GetStaffCourseByStaffAndCourseRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getStaffCourseByStaffAndCourse(dc: DataConnect, vars: GetStaffCourseByStaffAndCourseVariables): QueryPromise; + +interface GetStaffCourseByStaffAndCourseRef { + ... + (dc: DataConnect, vars: GetStaffCourseByStaffAndCourseVariables): QueryRef; +} +export const getStaffCourseByStaffAndCourseRef: GetStaffCourseByStaffAndCourseRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getStaffCourseByStaffAndCourseRef: +```typescript +const name = getStaffCourseByStaffAndCourseRef.operationName; +console.log(name); +``` + +### Variables +The `getStaffCourseByStaffAndCourse` query requires an argument of type `GetStaffCourseByStaffAndCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetStaffCourseByStaffAndCourseVariables { + staffId: UUIDString; + courseId: UUIDString; +} +``` +### Return Type +Recall that executing the `getStaffCourseByStaffAndCourse` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetStaffCourseByStaffAndCourseData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetStaffCourseByStaffAndCourseData { + staffCourses: ({ + id: UUIDString; + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & StaffCourse_Key)[]; +} +``` +### Using `getStaffCourseByStaffAndCourse`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getStaffCourseByStaffAndCourse, GetStaffCourseByStaffAndCourseVariables } from '@dataconnect/generated'; + +// The `getStaffCourseByStaffAndCourse` query requires an argument of type `GetStaffCourseByStaffAndCourseVariables`: +const getStaffCourseByStaffAndCourseVars: GetStaffCourseByStaffAndCourseVariables = { + staffId: ..., + courseId: ..., +}; + +// Call the `getStaffCourseByStaffAndCourse()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getStaffCourseByStaffAndCourse(getStaffCourseByStaffAndCourseVars); +// Variables can be defined inline as well. +const { data } = await getStaffCourseByStaffAndCourse({ staffId: ..., courseId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getStaffCourseByStaffAndCourse(dataConnect, getStaffCourseByStaffAndCourseVars); + +console.log(data.staffCourses); + +// Or, you can use the `Promise` API. +getStaffCourseByStaffAndCourse(getStaffCourseByStaffAndCourseVars).then((response) => { + const data = response.data; + console.log(data.staffCourses); +}); +``` + +### Using `getStaffCourseByStaffAndCourse`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getStaffCourseByStaffAndCourseRef, GetStaffCourseByStaffAndCourseVariables } from '@dataconnect/generated'; + +// The `getStaffCourseByStaffAndCourse` query requires an argument of type `GetStaffCourseByStaffAndCourseVariables`: +const getStaffCourseByStaffAndCourseVars: GetStaffCourseByStaffAndCourseVariables = { + staffId: ..., + courseId: ..., +}; + +// Call the `getStaffCourseByStaffAndCourseRef()` function to get a reference to the query. +const ref = getStaffCourseByStaffAndCourseRef(getStaffCourseByStaffAndCourseVars); +// Variables can be defined inline as well. +const ref = getStaffCourseByStaffAndCourseRef({ staffId: ..., courseId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getStaffCourseByStaffAndCourseRef(dataConnect, getStaffCourseByStaffAndCourseVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffCourses); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffCourses); +}); +``` + +## listActivityLogs +You can execute the `listActivityLogs` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listActivityLogs(vars?: ListActivityLogsVariables): QueryPromise; + +interface ListActivityLogsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListActivityLogsVariables): QueryRef; +} +export const listActivityLogsRef: ListActivityLogsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listActivityLogs(dc: DataConnect, vars?: ListActivityLogsVariables): QueryPromise; + +interface ListActivityLogsRef { + ... + (dc: DataConnect, vars?: ListActivityLogsVariables): QueryRef; +} +export const listActivityLogsRef: ListActivityLogsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listActivityLogsRef: +```typescript +const name = listActivityLogsRef.operationName; +console.log(name); +``` + +### Variables +The `listActivityLogs` query has an optional argument of type `ListActivityLogsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListActivityLogsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listActivityLogs` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListActivityLogsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListActivityLogsData { + activityLogs: ({ + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key)[]; +} +``` +### Using `listActivityLogs`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listActivityLogs, ListActivityLogsVariables } from '@dataconnect/generated'; + +// The `listActivityLogs` query has an optional argument of type `ListActivityLogsVariables`: +const listActivityLogsVars: ListActivityLogsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listActivityLogs()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listActivityLogs(listActivityLogsVars); +// Variables can be defined inline as well. +const { data } = await listActivityLogs({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListActivityLogsVariables` argument. +const { data } = await listActivityLogs(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listActivityLogs(dataConnect, listActivityLogsVars); + +console.log(data.activityLogs); + +// Or, you can use the `Promise` API. +listActivityLogs(listActivityLogsVars).then((response) => { + const data = response.data; + console.log(data.activityLogs); +}); +``` + +### Using `listActivityLogs`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listActivityLogsRef, ListActivityLogsVariables } from '@dataconnect/generated'; + +// The `listActivityLogs` query has an optional argument of type `ListActivityLogsVariables`: +const listActivityLogsVars: ListActivityLogsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listActivityLogsRef()` function to get a reference to the query. +const ref = listActivityLogsRef(listActivityLogsVars); +// Variables can be defined inline as well. +const ref = listActivityLogsRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListActivityLogsVariables` argument. +const ref = listActivityLogsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listActivityLogsRef(dataConnect, listActivityLogsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.activityLogs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.activityLogs); +}); +``` + +## getActivityLogById +You can execute the `getActivityLogById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getActivityLogById(vars: GetActivityLogByIdVariables): QueryPromise; + +interface GetActivityLogByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetActivityLogByIdVariables): QueryRef; +} +export const getActivityLogByIdRef: GetActivityLogByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getActivityLogById(dc: DataConnect, vars: GetActivityLogByIdVariables): QueryPromise; + +interface GetActivityLogByIdRef { + ... + (dc: DataConnect, vars: GetActivityLogByIdVariables): QueryRef; +} +export const getActivityLogByIdRef: GetActivityLogByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getActivityLogByIdRef: +```typescript +const name = getActivityLogByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getActivityLogById` query requires an argument of type `GetActivityLogByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetActivityLogByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getActivityLogById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetActivityLogByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetActivityLogByIdData { + activityLog?: { + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key; +} +``` +### Using `getActivityLogById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getActivityLogById, GetActivityLogByIdVariables } from '@dataconnect/generated'; + +// The `getActivityLogById` query requires an argument of type `GetActivityLogByIdVariables`: +const getActivityLogByIdVars: GetActivityLogByIdVariables = { + id: ..., +}; + +// Call the `getActivityLogById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getActivityLogById(getActivityLogByIdVars); +// Variables can be defined inline as well. +const { data } = await getActivityLogById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getActivityLogById(dataConnect, getActivityLogByIdVars); + +console.log(data.activityLog); + +// Or, you can use the `Promise` API. +getActivityLogById(getActivityLogByIdVars).then((response) => { + const data = response.data; + console.log(data.activityLog); +}); +``` + +### Using `getActivityLogById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getActivityLogByIdRef, GetActivityLogByIdVariables } from '@dataconnect/generated'; + +// The `getActivityLogById` query requires an argument of type `GetActivityLogByIdVariables`: +const getActivityLogByIdVars: GetActivityLogByIdVariables = { + id: ..., +}; + +// Call the `getActivityLogByIdRef()` function to get a reference to the query. +const ref = getActivityLogByIdRef(getActivityLogByIdVars); +// Variables can be defined inline as well. +const ref = getActivityLogByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getActivityLogByIdRef(dataConnect, getActivityLogByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.activityLog); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.activityLog); +}); +``` + +## listActivityLogsByUserId +You can execute the `listActivityLogsByUserId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listActivityLogsByUserId(vars: ListActivityLogsByUserIdVariables): QueryPromise; + +interface ListActivityLogsByUserIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListActivityLogsByUserIdVariables): QueryRef; +} +export const listActivityLogsByUserIdRef: ListActivityLogsByUserIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listActivityLogsByUserId(dc: DataConnect, vars: ListActivityLogsByUserIdVariables): QueryPromise; + +interface ListActivityLogsByUserIdRef { + ... + (dc: DataConnect, vars: ListActivityLogsByUserIdVariables): QueryRef; +} +export const listActivityLogsByUserIdRef: ListActivityLogsByUserIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listActivityLogsByUserIdRef: +```typescript +const name = listActivityLogsByUserIdRef.operationName; +console.log(name); +``` + +### Variables +The `listActivityLogsByUserId` query requires an argument of type `ListActivityLogsByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListActivityLogsByUserIdVariables { + userId: string; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listActivityLogsByUserId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListActivityLogsByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListActivityLogsByUserIdData { + activityLogs: ({ + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key)[]; +} +``` +### Using `listActivityLogsByUserId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listActivityLogsByUserId, ListActivityLogsByUserIdVariables } from '@dataconnect/generated'; + +// The `listActivityLogsByUserId` query requires an argument of type `ListActivityLogsByUserIdVariables`: +const listActivityLogsByUserIdVars: ListActivityLogsByUserIdVariables = { + userId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listActivityLogsByUserId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listActivityLogsByUserId(listActivityLogsByUserIdVars); +// Variables can be defined inline as well. +const { data } = await listActivityLogsByUserId({ userId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listActivityLogsByUserId(dataConnect, listActivityLogsByUserIdVars); + +console.log(data.activityLogs); + +// Or, you can use the `Promise` API. +listActivityLogsByUserId(listActivityLogsByUserIdVars).then((response) => { + const data = response.data; + console.log(data.activityLogs); +}); +``` + +### Using `listActivityLogsByUserId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listActivityLogsByUserIdRef, ListActivityLogsByUserIdVariables } from '@dataconnect/generated'; + +// The `listActivityLogsByUserId` query requires an argument of type `ListActivityLogsByUserIdVariables`: +const listActivityLogsByUserIdVars: ListActivityLogsByUserIdVariables = { + userId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listActivityLogsByUserIdRef()` function to get a reference to the query. +const ref = listActivityLogsByUserIdRef(listActivityLogsByUserIdVars); +// Variables can be defined inline as well. +const ref = listActivityLogsByUserIdRef({ userId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listActivityLogsByUserIdRef(dataConnect, listActivityLogsByUserIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.activityLogs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.activityLogs); +}); +``` + +## listUnreadActivityLogsByUserId +You can execute the `listUnreadActivityLogsByUserId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listUnreadActivityLogsByUserId(vars: ListUnreadActivityLogsByUserIdVariables): QueryPromise; + +interface ListUnreadActivityLogsByUserIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListUnreadActivityLogsByUserIdVariables): QueryRef; +} +export const listUnreadActivityLogsByUserIdRef: ListUnreadActivityLogsByUserIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listUnreadActivityLogsByUserId(dc: DataConnect, vars: ListUnreadActivityLogsByUserIdVariables): QueryPromise; + +interface ListUnreadActivityLogsByUserIdRef { + ... + (dc: DataConnect, vars: ListUnreadActivityLogsByUserIdVariables): QueryRef; +} +export const listUnreadActivityLogsByUserIdRef: ListUnreadActivityLogsByUserIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listUnreadActivityLogsByUserIdRef: +```typescript +const name = listUnreadActivityLogsByUserIdRef.operationName; +console.log(name); +``` + +### Variables +The `listUnreadActivityLogsByUserId` query requires an argument of type `ListUnreadActivityLogsByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListUnreadActivityLogsByUserIdVariables { + userId: string; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listUnreadActivityLogsByUserId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListUnreadActivityLogsByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListUnreadActivityLogsByUserIdData { + activityLogs: ({ + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key)[]; +} +``` +### Using `listUnreadActivityLogsByUserId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listUnreadActivityLogsByUserId, ListUnreadActivityLogsByUserIdVariables } from '@dataconnect/generated'; + +// The `listUnreadActivityLogsByUserId` query requires an argument of type `ListUnreadActivityLogsByUserIdVariables`: +const listUnreadActivityLogsByUserIdVars: ListUnreadActivityLogsByUserIdVariables = { + userId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listUnreadActivityLogsByUserId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listUnreadActivityLogsByUserId(listUnreadActivityLogsByUserIdVars); +// Variables can be defined inline as well. +const { data } = await listUnreadActivityLogsByUserId({ userId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listUnreadActivityLogsByUserId(dataConnect, listUnreadActivityLogsByUserIdVars); + +console.log(data.activityLogs); + +// Or, you can use the `Promise` API. +listUnreadActivityLogsByUserId(listUnreadActivityLogsByUserIdVars).then((response) => { + const data = response.data; + console.log(data.activityLogs); +}); +``` + +### Using `listUnreadActivityLogsByUserId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listUnreadActivityLogsByUserIdRef, ListUnreadActivityLogsByUserIdVariables } from '@dataconnect/generated'; + +// The `listUnreadActivityLogsByUserId` query requires an argument of type `ListUnreadActivityLogsByUserIdVariables`: +const listUnreadActivityLogsByUserIdVars: ListUnreadActivityLogsByUserIdVariables = { + userId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listUnreadActivityLogsByUserIdRef()` function to get a reference to the query. +const ref = listUnreadActivityLogsByUserIdRef(listUnreadActivityLogsByUserIdVars); +// Variables can be defined inline as well. +const ref = listUnreadActivityLogsByUserIdRef({ userId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listUnreadActivityLogsByUserIdRef(dataConnect, listUnreadActivityLogsByUserIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.activityLogs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.activityLogs); +}); +``` + +## filterActivityLogs +You can execute the `filterActivityLogs` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterActivityLogs(vars?: FilterActivityLogsVariables): QueryPromise; + +interface FilterActivityLogsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterActivityLogsVariables): QueryRef; +} +export const filterActivityLogsRef: FilterActivityLogsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterActivityLogs(dc: DataConnect, vars?: FilterActivityLogsVariables): QueryPromise; + +interface FilterActivityLogsRef { + ... + (dc: DataConnect, vars?: FilterActivityLogsVariables): QueryRef; +} +export const filterActivityLogsRef: FilterActivityLogsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterActivityLogsRef: +```typescript +const name = filterActivityLogsRef.operationName; +console.log(name); +``` + +### Variables +The `filterActivityLogs` query has an optional argument of type `FilterActivityLogsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterActivityLogsVariables { + userId?: string | null; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + isRead?: boolean | null; + activityType?: ActivityType | null; + iconType?: ActivityIconType | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `filterActivityLogs` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterActivityLogsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterActivityLogsData { + activityLogs: ({ + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key)[]; +} +``` +### Using `filterActivityLogs`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterActivityLogs, FilterActivityLogsVariables } from '@dataconnect/generated'; + +// The `filterActivityLogs` query has an optional argument of type `FilterActivityLogsVariables`: +const filterActivityLogsVars: FilterActivityLogsVariables = { + userId: ..., // optional + dateFrom: ..., // optional + dateTo: ..., // optional + isRead: ..., // optional + activityType: ..., // optional + iconType: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterActivityLogs()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterActivityLogs(filterActivityLogsVars); +// Variables can be defined inline as well. +const { data } = await filterActivityLogs({ userId: ..., dateFrom: ..., dateTo: ..., isRead: ..., activityType: ..., iconType: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterActivityLogsVariables` argument. +const { data } = await filterActivityLogs(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterActivityLogs(dataConnect, filterActivityLogsVars); + +console.log(data.activityLogs); + +// Or, you can use the `Promise` API. +filterActivityLogs(filterActivityLogsVars).then((response) => { + const data = response.data; + console.log(data.activityLogs); +}); +``` + +### Using `filterActivityLogs`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterActivityLogsRef, FilterActivityLogsVariables } from '@dataconnect/generated'; + +// The `filterActivityLogs` query has an optional argument of type `FilterActivityLogsVariables`: +const filterActivityLogsVars: FilterActivityLogsVariables = { + userId: ..., // optional + dateFrom: ..., // optional + dateTo: ..., // optional + isRead: ..., // optional + activityType: ..., // optional + iconType: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterActivityLogsRef()` function to get a reference to the query. +const ref = filterActivityLogsRef(filterActivityLogsVars); +// Variables can be defined inline as well. +const ref = filterActivityLogsRef({ userId: ..., dateFrom: ..., dateTo: ..., isRead: ..., activityType: ..., iconType: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterActivityLogsVariables` argument. +const ref = filterActivityLogsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterActivityLogsRef(dataConnect, filterActivityLogsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.activityLogs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.activityLogs); +}); +``` + +## listBenefitsData +You can execute the `listBenefitsData` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listBenefitsData(vars?: ListBenefitsDataVariables): QueryPromise; + +interface ListBenefitsDataRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListBenefitsDataVariables): QueryRef; +} +export const listBenefitsDataRef: ListBenefitsDataRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listBenefitsData(dc: DataConnect, vars?: ListBenefitsDataVariables): QueryPromise; + +interface ListBenefitsDataRef { + ... + (dc: DataConnect, vars?: ListBenefitsDataVariables): QueryRef; +} +export const listBenefitsDataRef: ListBenefitsDataRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listBenefitsDataRef: +```typescript +const name = listBenefitsDataRef.operationName; +console.log(name); +``` + +### Variables +The `listBenefitsData` query has an optional argument of type `ListBenefitsDataVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListBenefitsDataVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listBenefitsData` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListBenefitsDataData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListBenefitsDataData { + benefitsDatas: ({ + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key)[]; +} +``` +### Using `listBenefitsData`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listBenefitsData, ListBenefitsDataVariables } from '@dataconnect/generated'; + +// The `listBenefitsData` query has an optional argument of type `ListBenefitsDataVariables`: +const listBenefitsDataVars: ListBenefitsDataVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listBenefitsData()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listBenefitsData(listBenefitsDataVars); +// Variables can be defined inline as well. +const { data } = await listBenefitsData({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListBenefitsDataVariables` argument. +const { data } = await listBenefitsData(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listBenefitsData(dataConnect, listBenefitsDataVars); + +console.log(data.benefitsDatas); + +// Or, you can use the `Promise` API. +listBenefitsData(listBenefitsDataVars).then((response) => { + const data = response.data; + console.log(data.benefitsDatas); +}); +``` + +### Using `listBenefitsData`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listBenefitsDataRef, ListBenefitsDataVariables } from '@dataconnect/generated'; + +// The `listBenefitsData` query has an optional argument of type `ListBenefitsDataVariables`: +const listBenefitsDataVars: ListBenefitsDataVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listBenefitsDataRef()` function to get a reference to the query. +const ref = listBenefitsDataRef(listBenefitsDataVars); +// Variables can be defined inline as well. +const ref = listBenefitsDataRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListBenefitsDataVariables` argument. +const ref = listBenefitsDataRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listBenefitsDataRef(dataConnect, listBenefitsDataVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.benefitsDatas); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.benefitsDatas); +}); +``` + +## getBenefitsDataByKey +You can execute the `getBenefitsDataByKey` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getBenefitsDataByKey(vars: GetBenefitsDataByKeyVariables): QueryPromise; + +interface GetBenefitsDataByKeyRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetBenefitsDataByKeyVariables): QueryRef; +} +export const getBenefitsDataByKeyRef: GetBenefitsDataByKeyRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getBenefitsDataByKey(dc: DataConnect, vars: GetBenefitsDataByKeyVariables): QueryPromise; + +interface GetBenefitsDataByKeyRef { + ... + (dc: DataConnect, vars: GetBenefitsDataByKeyVariables): QueryRef; +} +export const getBenefitsDataByKeyRef: GetBenefitsDataByKeyRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getBenefitsDataByKeyRef: +```typescript +const name = getBenefitsDataByKeyRef.operationName; +console.log(name); +``` + +### Variables +The `getBenefitsDataByKey` query requires an argument of type `GetBenefitsDataByKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetBenefitsDataByKeyVariables { + staffId: UUIDString; + vendorBenefitPlanId: UUIDString; +} +``` +### Return Type +Recall that executing the `getBenefitsDataByKey` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetBenefitsDataByKeyData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetBenefitsDataByKeyData { + benefitsData?: { + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key; +} +``` +### Using `getBenefitsDataByKey`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getBenefitsDataByKey, GetBenefitsDataByKeyVariables } from '@dataconnect/generated'; + +// The `getBenefitsDataByKey` query requires an argument of type `GetBenefitsDataByKeyVariables`: +const getBenefitsDataByKeyVars: GetBenefitsDataByKeyVariables = { + staffId: ..., + vendorBenefitPlanId: ..., +}; + +// Call the `getBenefitsDataByKey()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getBenefitsDataByKey(getBenefitsDataByKeyVars); +// Variables can be defined inline as well. +const { data } = await getBenefitsDataByKey({ staffId: ..., vendorBenefitPlanId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getBenefitsDataByKey(dataConnect, getBenefitsDataByKeyVars); + +console.log(data.benefitsData); + +// Or, you can use the `Promise` API. +getBenefitsDataByKey(getBenefitsDataByKeyVars).then((response) => { + const data = response.data; + console.log(data.benefitsData); +}); +``` + +### Using `getBenefitsDataByKey`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getBenefitsDataByKeyRef, GetBenefitsDataByKeyVariables } from '@dataconnect/generated'; + +// The `getBenefitsDataByKey` query requires an argument of type `GetBenefitsDataByKeyVariables`: +const getBenefitsDataByKeyVars: GetBenefitsDataByKeyVariables = { + staffId: ..., + vendorBenefitPlanId: ..., +}; + +// Call the `getBenefitsDataByKeyRef()` function to get a reference to the query. +const ref = getBenefitsDataByKeyRef(getBenefitsDataByKeyVars); +// Variables can be defined inline as well. +const ref = getBenefitsDataByKeyRef({ staffId: ..., vendorBenefitPlanId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getBenefitsDataByKeyRef(dataConnect, getBenefitsDataByKeyVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.benefitsData); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.benefitsData); +}); +``` + +## listBenefitsDataByStaffId +You can execute the `listBenefitsDataByStaffId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listBenefitsDataByStaffId(vars: ListBenefitsDataByStaffIdVariables): QueryPromise; + +interface ListBenefitsDataByStaffIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListBenefitsDataByStaffIdVariables): QueryRef; +} +export const listBenefitsDataByStaffIdRef: ListBenefitsDataByStaffIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listBenefitsDataByStaffId(dc: DataConnect, vars: ListBenefitsDataByStaffIdVariables): QueryPromise; + +interface ListBenefitsDataByStaffIdRef { + ... + (dc: DataConnect, vars: ListBenefitsDataByStaffIdVariables): QueryRef; +} +export const listBenefitsDataByStaffIdRef: ListBenefitsDataByStaffIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listBenefitsDataByStaffIdRef: +```typescript +const name = listBenefitsDataByStaffIdRef.operationName; +console.log(name); +``` + +### Variables +The `listBenefitsDataByStaffId` query requires an argument of type `ListBenefitsDataByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListBenefitsDataByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listBenefitsDataByStaffId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListBenefitsDataByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListBenefitsDataByStaffIdData { + benefitsDatas: ({ + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key)[]; +} +``` +### Using `listBenefitsDataByStaffId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listBenefitsDataByStaffId, ListBenefitsDataByStaffIdVariables } from '@dataconnect/generated'; + +// The `listBenefitsDataByStaffId` query requires an argument of type `ListBenefitsDataByStaffIdVariables`: +const listBenefitsDataByStaffIdVars: ListBenefitsDataByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listBenefitsDataByStaffId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listBenefitsDataByStaffId(listBenefitsDataByStaffIdVars); +// Variables can be defined inline as well. +const { data } = await listBenefitsDataByStaffId({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listBenefitsDataByStaffId(dataConnect, listBenefitsDataByStaffIdVars); + +console.log(data.benefitsDatas); + +// Or, you can use the `Promise` API. +listBenefitsDataByStaffId(listBenefitsDataByStaffIdVars).then((response) => { + const data = response.data; + console.log(data.benefitsDatas); +}); +``` + +### Using `listBenefitsDataByStaffId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listBenefitsDataByStaffIdRef, ListBenefitsDataByStaffIdVariables } from '@dataconnect/generated'; + +// The `listBenefitsDataByStaffId` query requires an argument of type `ListBenefitsDataByStaffIdVariables`: +const listBenefitsDataByStaffIdVars: ListBenefitsDataByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listBenefitsDataByStaffIdRef()` function to get a reference to the query. +const ref = listBenefitsDataByStaffIdRef(listBenefitsDataByStaffIdVars); +// Variables can be defined inline as well. +const ref = listBenefitsDataByStaffIdRef({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listBenefitsDataByStaffIdRef(dataConnect, listBenefitsDataByStaffIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.benefitsDatas); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.benefitsDatas); +}); +``` + +## listBenefitsDataByVendorBenefitPlanId +You can execute the `listBenefitsDataByVendorBenefitPlanId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listBenefitsDataByVendorBenefitPlanId(vars: ListBenefitsDataByVendorBenefitPlanIdVariables): QueryPromise; + +interface ListBenefitsDataByVendorBenefitPlanIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListBenefitsDataByVendorBenefitPlanIdVariables): QueryRef; +} +export const listBenefitsDataByVendorBenefitPlanIdRef: ListBenefitsDataByVendorBenefitPlanIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listBenefitsDataByVendorBenefitPlanId(dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdVariables): QueryPromise; + +interface ListBenefitsDataByVendorBenefitPlanIdRef { + ... + (dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdVariables): QueryRef; +} +export const listBenefitsDataByVendorBenefitPlanIdRef: ListBenefitsDataByVendorBenefitPlanIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listBenefitsDataByVendorBenefitPlanIdRef: +```typescript +const name = listBenefitsDataByVendorBenefitPlanIdRef.operationName; +console.log(name); +``` + +### Variables +The `listBenefitsDataByVendorBenefitPlanId` query requires an argument of type `ListBenefitsDataByVendorBenefitPlanIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListBenefitsDataByVendorBenefitPlanIdVariables { + vendorBenefitPlanId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listBenefitsDataByVendorBenefitPlanId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListBenefitsDataByVendorBenefitPlanIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListBenefitsDataByVendorBenefitPlanIdData { + benefitsDatas: ({ + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key)[]; +} +``` +### Using `listBenefitsDataByVendorBenefitPlanId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listBenefitsDataByVendorBenefitPlanId, ListBenefitsDataByVendorBenefitPlanIdVariables } from '@dataconnect/generated'; + +// The `listBenefitsDataByVendorBenefitPlanId` query requires an argument of type `ListBenefitsDataByVendorBenefitPlanIdVariables`: +const listBenefitsDataByVendorBenefitPlanIdVars: ListBenefitsDataByVendorBenefitPlanIdVariables = { + vendorBenefitPlanId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listBenefitsDataByVendorBenefitPlanId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listBenefitsDataByVendorBenefitPlanId(listBenefitsDataByVendorBenefitPlanIdVars); +// Variables can be defined inline as well. +const { data } = await listBenefitsDataByVendorBenefitPlanId({ vendorBenefitPlanId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listBenefitsDataByVendorBenefitPlanId(dataConnect, listBenefitsDataByVendorBenefitPlanIdVars); + +console.log(data.benefitsDatas); + +// Or, you can use the `Promise` API. +listBenefitsDataByVendorBenefitPlanId(listBenefitsDataByVendorBenefitPlanIdVars).then((response) => { + const data = response.data; + console.log(data.benefitsDatas); +}); +``` + +### Using `listBenefitsDataByVendorBenefitPlanId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listBenefitsDataByVendorBenefitPlanIdRef, ListBenefitsDataByVendorBenefitPlanIdVariables } from '@dataconnect/generated'; + +// The `listBenefitsDataByVendorBenefitPlanId` query requires an argument of type `ListBenefitsDataByVendorBenefitPlanIdVariables`: +const listBenefitsDataByVendorBenefitPlanIdVars: ListBenefitsDataByVendorBenefitPlanIdVariables = { + vendorBenefitPlanId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listBenefitsDataByVendorBenefitPlanIdRef()` function to get a reference to the query. +const ref = listBenefitsDataByVendorBenefitPlanIdRef(listBenefitsDataByVendorBenefitPlanIdVars); +// Variables can be defined inline as well. +const ref = listBenefitsDataByVendorBenefitPlanIdRef({ vendorBenefitPlanId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listBenefitsDataByVendorBenefitPlanIdRef(dataConnect, listBenefitsDataByVendorBenefitPlanIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.benefitsDatas); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.benefitsDatas); +}); +``` + +## listBenefitsDataByVendorBenefitPlanIds +You can execute the `listBenefitsDataByVendorBenefitPlanIds` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listBenefitsDataByVendorBenefitPlanIds(vars: ListBenefitsDataByVendorBenefitPlanIdsVariables): QueryPromise; + +interface ListBenefitsDataByVendorBenefitPlanIdsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListBenefitsDataByVendorBenefitPlanIdsVariables): QueryRef; +} +export const listBenefitsDataByVendorBenefitPlanIdsRef: ListBenefitsDataByVendorBenefitPlanIdsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listBenefitsDataByVendorBenefitPlanIds(dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdsVariables): QueryPromise; + +interface ListBenefitsDataByVendorBenefitPlanIdsRef { + ... + (dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdsVariables): QueryRef; +} +export const listBenefitsDataByVendorBenefitPlanIdsRef: ListBenefitsDataByVendorBenefitPlanIdsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listBenefitsDataByVendorBenefitPlanIdsRef: +```typescript +const name = listBenefitsDataByVendorBenefitPlanIdsRef.operationName; +console.log(name); +``` + +### Variables +The `listBenefitsDataByVendorBenefitPlanIds` query requires an argument of type `ListBenefitsDataByVendorBenefitPlanIdsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListBenefitsDataByVendorBenefitPlanIdsVariables { + vendorBenefitPlanIds: UUIDString[]; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listBenefitsDataByVendorBenefitPlanIds` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListBenefitsDataByVendorBenefitPlanIdsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListBenefitsDataByVendorBenefitPlanIdsData { + benefitsDatas: ({ + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key)[]; +} +``` +### Using `listBenefitsDataByVendorBenefitPlanIds`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listBenefitsDataByVendorBenefitPlanIds, ListBenefitsDataByVendorBenefitPlanIdsVariables } from '@dataconnect/generated'; + +// The `listBenefitsDataByVendorBenefitPlanIds` query requires an argument of type `ListBenefitsDataByVendorBenefitPlanIdsVariables`: +const listBenefitsDataByVendorBenefitPlanIdsVars: ListBenefitsDataByVendorBenefitPlanIdsVariables = { + vendorBenefitPlanIds: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listBenefitsDataByVendorBenefitPlanIds()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listBenefitsDataByVendorBenefitPlanIds(listBenefitsDataByVendorBenefitPlanIdsVars); +// Variables can be defined inline as well. +const { data } = await listBenefitsDataByVendorBenefitPlanIds({ vendorBenefitPlanIds: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listBenefitsDataByVendorBenefitPlanIds(dataConnect, listBenefitsDataByVendorBenefitPlanIdsVars); + +console.log(data.benefitsDatas); + +// Or, you can use the `Promise` API. +listBenefitsDataByVendorBenefitPlanIds(listBenefitsDataByVendorBenefitPlanIdsVars).then((response) => { + const data = response.data; + console.log(data.benefitsDatas); +}); +``` + +### Using `listBenefitsDataByVendorBenefitPlanIds`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listBenefitsDataByVendorBenefitPlanIdsRef, ListBenefitsDataByVendorBenefitPlanIdsVariables } from '@dataconnect/generated'; + +// The `listBenefitsDataByVendorBenefitPlanIds` query requires an argument of type `ListBenefitsDataByVendorBenefitPlanIdsVariables`: +const listBenefitsDataByVendorBenefitPlanIdsVars: ListBenefitsDataByVendorBenefitPlanIdsVariables = { + vendorBenefitPlanIds: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listBenefitsDataByVendorBenefitPlanIdsRef()` function to get a reference to the query. +const ref = listBenefitsDataByVendorBenefitPlanIdsRef(listBenefitsDataByVendorBenefitPlanIdsVars); +// Variables can be defined inline as well. +const ref = listBenefitsDataByVendorBenefitPlanIdsRef({ vendorBenefitPlanIds: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listBenefitsDataByVendorBenefitPlanIdsRef(dataConnect, listBenefitsDataByVendorBenefitPlanIdsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.benefitsDatas); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.benefitsDatas); +}); +``` + +## listStaff +You can execute the `listStaff` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaff(): QueryPromise; + +interface ListStaffRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listStaffRef: ListStaffRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaff(dc: DataConnect): QueryPromise; + +interface ListStaffRef { + ... + (dc: DataConnect): QueryRef; +} +export const listStaffRef: ListStaffRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffRef: +```typescript +const name = listStaffRef.operationName; +console.log(name); +``` + +### Variables +The `listStaff` query has no variables. +### Return Type +Recall that executing the `listStaff` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffData { + staffs: ({ + id: UUIDString; + userId: string; + fullName: string; + level?: string | null; + role?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + ownerId?: UUIDString | null; + createdAt?: TimestampString | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + } & Staff_Key)[]; +} +``` +### Using `listStaff`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaff } from '@dataconnect/generated'; + + +// Call the `listStaff()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaff(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaff(dataConnect); + +console.log(data.staffs); + +// Or, you can use the `Promise` API. +listStaff().then((response) => { + const data = response.data; + console.log(data.staffs); +}); +``` + +### Using `listStaff`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffRef } from '@dataconnect/generated'; + + +// Call the `listStaffRef()` function to get a reference to the query. +const ref = listStaffRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffs); +}); +``` + +## getStaffById +You can execute the `getStaffById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getStaffById(vars: GetStaffByIdVariables): QueryPromise; + +interface GetStaffByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffByIdVariables): QueryRef; +} +export const getStaffByIdRef: GetStaffByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getStaffById(dc: DataConnect, vars: GetStaffByIdVariables): QueryPromise; + +interface GetStaffByIdRef { + ... + (dc: DataConnect, vars: GetStaffByIdVariables): QueryRef; +} +export const getStaffByIdRef: GetStaffByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getStaffByIdRef: +```typescript +const name = getStaffByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getStaffById` query requires an argument of type `GetStaffByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetStaffByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getStaffById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetStaffByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetStaffByIdData { + staff?: { + id: UUIDString; + userId: string; + fullName: string; + role?: string | null; + level?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + ownerId?: UUIDString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + } & Staff_Key; +} +``` +### Using `getStaffById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getStaffById, GetStaffByIdVariables } from '@dataconnect/generated'; + +// The `getStaffById` query requires an argument of type `GetStaffByIdVariables`: +const getStaffByIdVars: GetStaffByIdVariables = { + id: ..., +}; + +// Call the `getStaffById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getStaffById(getStaffByIdVars); +// Variables can be defined inline as well. +const { data } = await getStaffById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getStaffById(dataConnect, getStaffByIdVars); + +console.log(data.staff); + +// Or, you can use the `Promise` API. +getStaffById(getStaffByIdVars).then((response) => { + const data = response.data; + console.log(data.staff); +}); +``` + +### Using `getStaffById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getStaffByIdRef, GetStaffByIdVariables } from '@dataconnect/generated'; + +// The `getStaffById` query requires an argument of type `GetStaffByIdVariables`: +const getStaffByIdVars: GetStaffByIdVariables = { + id: ..., +}; + +// Call the `getStaffByIdRef()` function to get a reference to the query. +const ref = getStaffByIdRef(getStaffByIdVars); +// Variables can be defined inline as well. +const ref = getStaffByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getStaffByIdRef(dataConnect, getStaffByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staff); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staff); +}); +``` + +## getStaffByUserId +You can execute the `getStaffByUserId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getStaffByUserId(vars: GetStaffByUserIdVariables): QueryPromise; + +interface GetStaffByUserIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffByUserIdVariables): QueryRef; +} +export const getStaffByUserIdRef: GetStaffByUserIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getStaffByUserId(dc: DataConnect, vars: GetStaffByUserIdVariables): QueryPromise; + +interface GetStaffByUserIdRef { + ... + (dc: DataConnect, vars: GetStaffByUserIdVariables): QueryRef; +} +export const getStaffByUserIdRef: GetStaffByUserIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getStaffByUserIdRef: +```typescript +const name = getStaffByUserIdRef.operationName; +console.log(name); +``` + +### Variables +The `getStaffByUserId` query requires an argument of type `GetStaffByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetStaffByUserIdVariables { + userId: string; +} +``` +### Return Type +Recall that executing the `getStaffByUserId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetStaffByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetStaffByUserIdData { + staffs: ({ + id: UUIDString; + userId: string; + fullName: string; + level?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + ownerId?: UUIDString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + } & Staff_Key)[]; +} +``` +### Using `getStaffByUserId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getStaffByUserId, GetStaffByUserIdVariables } from '@dataconnect/generated'; + +// The `getStaffByUserId` query requires an argument of type `GetStaffByUserIdVariables`: +const getStaffByUserIdVars: GetStaffByUserIdVariables = { + userId: ..., +}; + +// Call the `getStaffByUserId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getStaffByUserId(getStaffByUserIdVars); +// Variables can be defined inline as well. +const { data } = await getStaffByUserId({ userId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getStaffByUserId(dataConnect, getStaffByUserIdVars); + +console.log(data.staffs); + +// Or, you can use the `Promise` API. +getStaffByUserId(getStaffByUserIdVars).then((response) => { + const data = response.data; + console.log(data.staffs); +}); +``` + +### Using `getStaffByUserId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getStaffByUserIdRef, GetStaffByUserIdVariables } from '@dataconnect/generated'; + +// The `getStaffByUserId` query requires an argument of type `GetStaffByUserIdVariables`: +const getStaffByUserIdVars: GetStaffByUserIdVariables = { + userId: ..., +}; + +// Call the `getStaffByUserIdRef()` function to get a reference to the query. +const ref = getStaffByUserIdRef(getStaffByUserIdVars); +// Variables can be defined inline as well. +const ref = getStaffByUserIdRef({ userId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getStaffByUserIdRef(dataConnect, getStaffByUserIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffs); +}); +``` + +## filterStaff +You can execute the `filterStaff` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterStaff(vars?: FilterStaffVariables): QueryPromise; + +interface FilterStaffRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterStaffVariables): QueryRef; +} +export const filterStaffRef: FilterStaffRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterStaff(dc: DataConnect, vars?: FilterStaffVariables): QueryPromise; + +interface FilterStaffRef { + ... + (dc: DataConnect, vars?: FilterStaffVariables): QueryRef; +} +export const filterStaffRef: FilterStaffRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterStaffRef: +```typescript +const name = filterStaffRef.operationName; +console.log(name); +``` + +### Variables +The `filterStaff` query has an optional argument of type `FilterStaffVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterStaffVariables { + ownerId?: UUIDString | null; + fullName?: string | null; + level?: string | null; + email?: string | null; +} +``` +### Return Type +Recall that executing the `filterStaff` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterStaffData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterStaffData { + staffs: ({ + id: UUIDString; + userId: string; + fullName: string; + level?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + averageRating?: number | null; + reliabilityScore?: number | null; + totalShifts?: number | null; + ownerId?: UUIDString | null; + isRecommended?: boolean | null; + skills?: string[] | null; + industries?: string[] | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + } & Staff_Key)[]; +} +``` +### Using `filterStaff`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterStaff, FilterStaffVariables } from '@dataconnect/generated'; + +// The `filterStaff` query has an optional argument of type `FilterStaffVariables`: +const filterStaffVars: FilterStaffVariables = { + ownerId: ..., // optional + fullName: ..., // optional + level: ..., // optional + email: ..., // optional +}; + +// Call the `filterStaff()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterStaff(filterStaffVars); +// Variables can be defined inline as well. +const { data } = await filterStaff({ ownerId: ..., fullName: ..., level: ..., email: ..., }); +// Since all variables are optional for this query, you can omit the `FilterStaffVariables` argument. +const { data } = await filterStaff(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterStaff(dataConnect, filterStaffVars); + +console.log(data.staffs); + +// Or, you can use the `Promise` API. +filterStaff(filterStaffVars).then((response) => { + const data = response.data; + console.log(data.staffs); +}); +``` + +### Using `filterStaff`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterStaffRef, FilterStaffVariables } from '@dataconnect/generated'; + +// The `filterStaff` query has an optional argument of type `FilterStaffVariables`: +const filterStaffVars: FilterStaffVariables = { + ownerId: ..., // optional + fullName: ..., // optional + level: ..., // optional + email: ..., // optional +}; + +// Call the `filterStaffRef()` function to get a reference to the query. +const ref = filterStaffRef(filterStaffVars); +// Variables can be defined inline as well. +const ref = filterStaffRef({ ownerId: ..., fullName: ..., level: ..., email: ..., }); +// Since all variables are optional for this query, you can omit the `FilterStaffVariables` argument. +const ref = filterStaffRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterStaffRef(dataConnect, filterStaffVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffs); +}); +``` + +## listTasks +You can execute the `listTasks` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listTasks(): QueryPromise; + +interface ListTasksRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listTasksRef: ListTasksRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listTasks(dc: DataConnect): QueryPromise; + +interface ListTasksRef { + ... + (dc: DataConnect): QueryRef; +} +export const listTasksRef: ListTasksRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listTasksRef: +```typescript +const name = listTasksRef.operationName; +console.log(name); +``` + +### Variables +The `listTasks` query has no variables. +### Return Type +Recall that executing the `listTasks` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListTasksData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListTasksData { + tasks: ({ + id: UUIDString; + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Task_Key)[]; +} +``` +### Using `listTasks`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listTasks } from '@dataconnect/generated'; + + +// Call the `listTasks()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listTasks(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listTasks(dataConnect); + +console.log(data.tasks); + +// Or, you can use the `Promise` API. +listTasks().then((response) => { + const data = response.data; + console.log(data.tasks); +}); +``` + +### Using `listTasks`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listTasksRef } from '@dataconnect/generated'; + + +// Call the `listTasksRef()` function to get a reference to the query. +const ref = listTasksRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listTasksRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.tasks); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.tasks); +}); +``` + +## getTaskById +You can execute the `getTaskById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getTaskById(vars: GetTaskByIdVariables): QueryPromise; + +interface GetTaskByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTaskByIdVariables): QueryRef; +} +export const getTaskByIdRef: GetTaskByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getTaskById(dc: DataConnect, vars: GetTaskByIdVariables): QueryPromise; + +interface GetTaskByIdRef { + ... + (dc: DataConnect, vars: GetTaskByIdVariables): QueryRef; +} +export const getTaskByIdRef: GetTaskByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getTaskByIdRef: +```typescript +const name = getTaskByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getTaskById` query requires an argument of type `GetTaskByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetTaskByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getTaskById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetTaskByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetTaskByIdData { + task?: { + id: UUIDString; + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Task_Key; +} +``` +### Using `getTaskById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getTaskById, GetTaskByIdVariables } from '@dataconnect/generated'; + +// The `getTaskById` query requires an argument of type `GetTaskByIdVariables`: +const getTaskByIdVars: GetTaskByIdVariables = { + id: ..., +}; + +// Call the `getTaskById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getTaskById(getTaskByIdVars); +// Variables can be defined inline as well. +const { data } = await getTaskById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getTaskById(dataConnect, getTaskByIdVars); + +console.log(data.task); + +// Or, you can use the `Promise` API. +getTaskById(getTaskByIdVars).then((response) => { + const data = response.data; + console.log(data.task); +}); +``` + +### Using `getTaskById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getTaskByIdRef, GetTaskByIdVariables } from '@dataconnect/generated'; + +// The `getTaskById` query requires an argument of type `GetTaskByIdVariables`: +const getTaskByIdVars: GetTaskByIdVariables = { + id: ..., +}; + +// Call the `getTaskByIdRef()` function to get a reference to the query. +const ref = getTaskByIdRef(getTaskByIdVars); +// Variables can be defined inline as well. +const ref = getTaskByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getTaskByIdRef(dataConnect, getTaskByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.task); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.task); +}); +``` + +## getTasksByOwnerId +You can execute the `getTasksByOwnerId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getTasksByOwnerId(vars: GetTasksByOwnerIdVariables): QueryPromise; + +interface GetTasksByOwnerIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTasksByOwnerIdVariables): QueryRef; +} +export const getTasksByOwnerIdRef: GetTasksByOwnerIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getTasksByOwnerId(dc: DataConnect, vars: GetTasksByOwnerIdVariables): QueryPromise; + +interface GetTasksByOwnerIdRef { + ... + (dc: DataConnect, vars: GetTasksByOwnerIdVariables): QueryRef; +} +export const getTasksByOwnerIdRef: GetTasksByOwnerIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getTasksByOwnerIdRef: +```typescript +const name = getTasksByOwnerIdRef.operationName; +console.log(name); +``` + +### Variables +The `getTasksByOwnerId` query requires an argument of type `GetTasksByOwnerIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetTasksByOwnerIdVariables { + ownerId: UUIDString; +} +``` +### Return Type +Recall that executing the `getTasksByOwnerId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetTasksByOwnerIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetTasksByOwnerIdData { + tasks: ({ + id: UUIDString; + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Task_Key)[]; +} +``` +### Using `getTasksByOwnerId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getTasksByOwnerId, GetTasksByOwnerIdVariables } from '@dataconnect/generated'; + +// The `getTasksByOwnerId` query requires an argument of type `GetTasksByOwnerIdVariables`: +const getTasksByOwnerIdVars: GetTasksByOwnerIdVariables = { + ownerId: ..., +}; + +// Call the `getTasksByOwnerId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getTasksByOwnerId(getTasksByOwnerIdVars); +// Variables can be defined inline as well. +const { data } = await getTasksByOwnerId({ ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getTasksByOwnerId(dataConnect, getTasksByOwnerIdVars); + +console.log(data.tasks); + +// Or, you can use the `Promise` API. +getTasksByOwnerId(getTasksByOwnerIdVars).then((response) => { + const data = response.data; + console.log(data.tasks); +}); +``` + +### Using `getTasksByOwnerId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getTasksByOwnerIdRef, GetTasksByOwnerIdVariables } from '@dataconnect/generated'; + +// The `getTasksByOwnerId` query requires an argument of type `GetTasksByOwnerIdVariables`: +const getTasksByOwnerIdVars: GetTasksByOwnerIdVariables = { + ownerId: ..., +}; + +// Call the `getTasksByOwnerIdRef()` function to get a reference to the query. +const ref = getTasksByOwnerIdRef(getTasksByOwnerIdVars); +// Variables can be defined inline as well. +const ref = getTasksByOwnerIdRef({ ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getTasksByOwnerIdRef(dataConnect, getTasksByOwnerIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.tasks); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.tasks); +}); +``` + +## filterTasks +You can execute the `filterTasks` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterTasks(vars?: FilterTasksVariables): QueryPromise; + +interface FilterTasksRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterTasksVariables): QueryRef; +} +export const filterTasksRef: FilterTasksRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterTasks(dc: DataConnect, vars?: FilterTasksVariables): QueryPromise; + +interface FilterTasksRef { + ... + (dc: DataConnect, vars?: FilterTasksVariables): QueryRef; +} +export const filterTasksRef: FilterTasksRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterTasksRef: +```typescript +const name = filterTasksRef.operationName; +console.log(name); +``` + +### Variables +The `filterTasks` query has an optional argument of type `FilterTasksVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterTasksVariables { + status?: TaskStatus | null; + priority?: TaskPriority | null; +} +``` +### Return Type +Recall that executing the `filterTasks` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterTasksData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterTasksData { + tasks: ({ + id: UUIDString; + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Task_Key)[]; +} +``` +### Using `filterTasks`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterTasks, FilterTasksVariables } from '@dataconnect/generated'; + +// The `filterTasks` query has an optional argument of type `FilterTasksVariables`: +const filterTasksVars: FilterTasksVariables = { + status: ..., // optional + priority: ..., // optional +}; + +// Call the `filterTasks()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterTasks(filterTasksVars); +// Variables can be defined inline as well. +const { data } = await filterTasks({ status: ..., priority: ..., }); +// Since all variables are optional for this query, you can omit the `FilterTasksVariables` argument. +const { data } = await filterTasks(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterTasks(dataConnect, filterTasksVars); + +console.log(data.tasks); + +// Or, you can use the `Promise` API. +filterTasks(filterTasksVars).then((response) => { + const data = response.data; + console.log(data.tasks); +}); +``` + +### Using `filterTasks`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterTasksRef, FilterTasksVariables } from '@dataconnect/generated'; + +// The `filterTasks` query has an optional argument of type `FilterTasksVariables`: +const filterTasksVars: FilterTasksVariables = { + status: ..., // optional + priority: ..., // optional +}; + +// Call the `filterTasksRef()` function to get a reference to the query. +const ref = filterTasksRef(filterTasksVars); +// Variables can be defined inline as well. +const ref = filterTasksRef({ status: ..., priority: ..., }); +// Since all variables are optional for this query, you can omit the `FilterTasksVariables` argument. +const ref = filterTasksRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterTasksRef(dataConnect, filterTasksVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.tasks); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.tasks); +}); +``` + +## listTeamHubs +You can execute the `listTeamHubs` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listTeamHubs(vars?: ListTeamHubsVariables): QueryPromise; + +interface ListTeamHubsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListTeamHubsVariables): QueryRef; +} +export const listTeamHubsRef: ListTeamHubsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listTeamHubs(dc: DataConnect, vars?: ListTeamHubsVariables): QueryPromise; + +interface ListTeamHubsRef { + ... + (dc: DataConnect, vars?: ListTeamHubsVariables): QueryRef; +} +export const listTeamHubsRef: ListTeamHubsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listTeamHubsRef: +```typescript +const name = listTeamHubsRef.operationName; +console.log(name); +``` + +### Variables +The `listTeamHubs` query has an optional argument of type `ListTeamHubsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListTeamHubsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listTeamHubs` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListTeamHubsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListTeamHubsData { + teamHubs: ({ + id: UUIDString; + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive: boolean; + departments?: unknown | null; + } & TeamHub_Key)[]; +} +``` +### Using `listTeamHubs`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listTeamHubs, ListTeamHubsVariables } from '@dataconnect/generated'; + +// The `listTeamHubs` query has an optional argument of type `ListTeamHubsVariables`: +const listTeamHubsVars: ListTeamHubsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listTeamHubs()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listTeamHubs(listTeamHubsVars); +// Variables can be defined inline as well. +const { data } = await listTeamHubs({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListTeamHubsVariables` argument. +const { data } = await listTeamHubs(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listTeamHubs(dataConnect, listTeamHubsVars); + +console.log(data.teamHubs); + +// Or, you can use the `Promise` API. +listTeamHubs(listTeamHubsVars).then((response) => { + const data = response.data; + console.log(data.teamHubs); +}); +``` + +### Using `listTeamHubs`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listTeamHubsRef, ListTeamHubsVariables } from '@dataconnect/generated'; + +// The `listTeamHubs` query has an optional argument of type `ListTeamHubsVariables`: +const listTeamHubsVars: ListTeamHubsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listTeamHubsRef()` function to get a reference to the query. +const ref = listTeamHubsRef(listTeamHubsVars); +// Variables can be defined inline as well. +const ref = listTeamHubsRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListTeamHubsVariables` argument. +const ref = listTeamHubsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listTeamHubsRef(dataConnect, listTeamHubsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.teamHubs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.teamHubs); +}); +``` + +## getTeamHubById +You can execute the `getTeamHubById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getTeamHubById(vars: GetTeamHubByIdVariables): QueryPromise; + +interface GetTeamHubByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamHubByIdVariables): QueryRef; +} +export const getTeamHubByIdRef: GetTeamHubByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getTeamHubById(dc: DataConnect, vars: GetTeamHubByIdVariables): QueryPromise; + +interface GetTeamHubByIdRef { + ... + (dc: DataConnect, vars: GetTeamHubByIdVariables): QueryRef; +} +export const getTeamHubByIdRef: GetTeamHubByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getTeamHubByIdRef: +```typescript +const name = getTeamHubByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getTeamHubById` query requires an argument of type `GetTeamHubByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetTeamHubByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getTeamHubById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetTeamHubByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetTeamHubByIdData { + teamHub?: { + id: UUIDString; + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive: boolean; + departments?: unknown | null; + } & TeamHub_Key; +} +``` +### Using `getTeamHubById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getTeamHubById, GetTeamHubByIdVariables } from '@dataconnect/generated'; + +// The `getTeamHubById` query requires an argument of type `GetTeamHubByIdVariables`: +const getTeamHubByIdVars: GetTeamHubByIdVariables = { + id: ..., +}; + +// Call the `getTeamHubById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getTeamHubById(getTeamHubByIdVars); +// Variables can be defined inline as well. +const { data } = await getTeamHubById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getTeamHubById(dataConnect, getTeamHubByIdVars); + +console.log(data.teamHub); + +// Or, you can use the `Promise` API. +getTeamHubById(getTeamHubByIdVars).then((response) => { + const data = response.data; + console.log(data.teamHub); +}); +``` + +### Using `getTeamHubById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getTeamHubByIdRef, GetTeamHubByIdVariables } from '@dataconnect/generated'; + +// The `getTeamHubById` query requires an argument of type `GetTeamHubByIdVariables`: +const getTeamHubByIdVars: GetTeamHubByIdVariables = { + id: ..., +}; + +// Call the `getTeamHubByIdRef()` function to get a reference to the query. +const ref = getTeamHubByIdRef(getTeamHubByIdVars); +// Variables can be defined inline as well. +const ref = getTeamHubByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getTeamHubByIdRef(dataConnect, getTeamHubByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.teamHub); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.teamHub); +}); +``` + +## getTeamHubsByTeamId +You can execute the `getTeamHubsByTeamId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getTeamHubsByTeamId(vars: GetTeamHubsByTeamIdVariables): QueryPromise; + +interface GetTeamHubsByTeamIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamHubsByTeamIdVariables): QueryRef; +} +export const getTeamHubsByTeamIdRef: GetTeamHubsByTeamIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getTeamHubsByTeamId(dc: DataConnect, vars: GetTeamHubsByTeamIdVariables): QueryPromise; + +interface GetTeamHubsByTeamIdRef { + ... + (dc: DataConnect, vars: GetTeamHubsByTeamIdVariables): QueryRef; +} +export const getTeamHubsByTeamIdRef: GetTeamHubsByTeamIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getTeamHubsByTeamIdRef: +```typescript +const name = getTeamHubsByTeamIdRef.operationName; +console.log(name); +``` + +### Variables +The `getTeamHubsByTeamId` query requires an argument of type `GetTeamHubsByTeamIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetTeamHubsByTeamIdVariables { + teamId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `getTeamHubsByTeamId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetTeamHubsByTeamIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetTeamHubsByTeamIdData { + teamHubs: ({ + id: UUIDString; + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive: boolean; + departments?: unknown | null; + } & TeamHub_Key)[]; +} +``` +### Using `getTeamHubsByTeamId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getTeamHubsByTeamId, GetTeamHubsByTeamIdVariables } from '@dataconnect/generated'; + +// The `getTeamHubsByTeamId` query requires an argument of type `GetTeamHubsByTeamIdVariables`: +const getTeamHubsByTeamIdVars: GetTeamHubsByTeamIdVariables = { + teamId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getTeamHubsByTeamId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getTeamHubsByTeamId(getTeamHubsByTeamIdVars); +// Variables can be defined inline as well. +const { data } = await getTeamHubsByTeamId({ teamId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getTeamHubsByTeamId(dataConnect, getTeamHubsByTeamIdVars); + +console.log(data.teamHubs); + +// Or, you can use the `Promise` API. +getTeamHubsByTeamId(getTeamHubsByTeamIdVars).then((response) => { + const data = response.data; + console.log(data.teamHubs); +}); +``` + +### Using `getTeamHubsByTeamId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getTeamHubsByTeamIdRef, GetTeamHubsByTeamIdVariables } from '@dataconnect/generated'; + +// The `getTeamHubsByTeamId` query requires an argument of type `GetTeamHubsByTeamIdVariables`: +const getTeamHubsByTeamIdVars: GetTeamHubsByTeamIdVariables = { + teamId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `getTeamHubsByTeamIdRef()` function to get a reference to the query. +const ref = getTeamHubsByTeamIdRef(getTeamHubsByTeamIdVars); +// Variables can be defined inline as well. +const ref = getTeamHubsByTeamIdRef({ teamId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getTeamHubsByTeamIdRef(dataConnect, getTeamHubsByTeamIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.teamHubs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.teamHubs); +}); +``` + +## listTeamHubsByOwnerId +You can execute the `listTeamHubsByOwnerId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listTeamHubsByOwnerId(vars: ListTeamHubsByOwnerIdVariables): QueryPromise; + +interface ListTeamHubsByOwnerIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListTeamHubsByOwnerIdVariables): QueryRef; +} +export const listTeamHubsByOwnerIdRef: ListTeamHubsByOwnerIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listTeamHubsByOwnerId(dc: DataConnect, vars: ListTeamHubsByOwnerIdVariables): QueryPromise; + +interface ListTeamHubsByOwnerIdRef { + ... + (dc: DataConnect, vars: ListTeamHubsByOwnerIdVariables): QueryRef; +} +export const listTeamHubsByOwnerIdRef: ListTeamHubsByOwnerIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listTeamHubsByOwnerIdRef: +```typescript +const name = listTeamHubsByOwnerIdRef.operationName; +console.log(name); +``` + +### Variables +The `listTeamHubsByOwnerId` query requires an argument of type `ListTeamHubsByOwnerIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListTeamHubsByOwnerIdVariables { + ownerId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listTeamHubsByOwnerId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListTeamHubsByOwnerIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListTeamHubsByOwnerIdData { + teamHubs: ({ + id: UUIDString; + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive: boolean; + departments?: unknown | null; + } & TeamHub_Key)[]; +} +``` +### Using `listTeamHubsByOwnerId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listTeamHubsByOwnerId, ListTeamHubsByOwnerIdVariables } from '@dataconnect/generated'; + +// The `listTeamHubsByOwnerId` query requires an argument of type `ListTeamHubsByOwnerIdVariables`: +const listTeamHubsByOwnerIdVars: ListTeamHubsByOwnerIdVariables = { + ownerId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listTeamHubsByOwnerId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listTeamHubsByOwnerId(listTeamHubsByOwnerIdVars); +// Variables can be defined inline as well. +const { data } = await listTeamHubsByOwnerId({ ownerId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listTeamHubsByOwnerId(dataConnect, listTeamHubsByOwnerIdVars); + +console.log(data.teamHubs); + +// Or, you can use the `Promise` API. +listTeamHubsByOwnerId(listTeamHubsByOwnerIdVars).then((response) => { + const data = response.data; + console.log(data.teamHubs); +}); +``` + +### Using `listTeamHubsByOwnerId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listTeamHubsByOwnerIdRef, ListTeamHubsByOwnerIdVariables } from '@dataconnect/generated'; + +// The `listTeamHubsByOwnerId` query requires an argument of type `ListTeamHubsByOwnerIdVariables`: +const listTeamHubsByOwnerIdVars: ListTeamHubsByOwnerIdVariables = { + ownerId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listTeamHubsByOwnerIdRef()` function to get a reference to the query. +const ref = listTeamHubsByOwnerIdRef(listTeamHubsByOwnerIdVars); +// Variables can be defined inline as well. +const ref = listTeamHubsByOwnerIdRef({ ownerId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listTeamHubsByOwnerIdRef(dataConnect, listTeamHubsByOwnerIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.teamHubs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.teamHubs); +}); +``` + +## listClientFeedbacks +You can execute the `listClientFeedbacks` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listClientFeedbacks(vars?: ListClientFeedbacksVariables): QueryPromise; + +interface ListClientFeedbacksRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListClientFeedbacksVariables): QueryRef; +} +export const listClientFeedbacksRef: ListClientFeedbacksRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listClientFeedbacks(dc: DataConnect, vars?: ListClientFeedbacksVariables): QueryPromise; + +interface ListClientFeedbacksRef { + ... + (dc: DataConnect, vars?: ListClientFeedbacksVariables): QueryRef; +} +export const listClientFeedbacksRef: ListClientFeedbacksRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listClientFeedbacksRef: +```typescript +const name = listClientFeedbacksRef.operationName; +console.log(name); +``` + +### Variables +The `listClientFeedbacks` query has an optional argument of type `ListClientFeedbacksVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListClientFeedbacksVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listClientFeedbacks` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListClientFeedbacksData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListClientFeedbacksData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} +``` +### Using `listClientFeedbacks`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listClientFeedbacks, ListClientFeedbacksVariables } from '@dataconnect/generated'; + +// The `listClientFeedbacks` query has an optional argument of type `ListClientFeedbacksVariables`: +const listClientFeedbacksVars: ListClientFeedbacksVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listClientFeedbacks()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listClientFeedbacks(listClientFeedbacksVars); +// Variables can be defined inline as well. +const { data } = await listClientFeedbacks({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListClientFeedbacksVariables` argument. +const { data } = await listClientFeedbacks(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listClientFeedbacks(dataConnect, listClientFeedbacksVars); + +console.log(data.clientFeedbacks); + +// Or, you can use the `Promise` API. +listClientFeedbacks(listClientFeedbacksVars).then((response) => { + const data = response.data; + console.log(data.clientFeedbacks); +}); +``` + +### Using `listClientFeedbacks`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listClientFeedbacksRef, ListClientFeedbacksVariables } from '@dataconnect/generated'; + +// The `listClientFeedbacks` query has an optional argument of type `ListClientFeedbacksVariables`: +const listClientFeedbacksVars: ListClientFeedbacksVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listClientFeedbacksRef()` function to get a reference to the query. +const ref = listClientFeedbacksRef(listClientFeedbacksVars); +// Variables can be defined inline as well. +const ref = listClientFeedbacksRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListClientFeedbacksVariables` argument. +const ref = listClientFeedbacksRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listClientFeedbacksRef(dataConnect, listClientFeedbacksVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.clientFeedbacks); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.clientFeedbacks); +}); +``` + +## getClientFeedbackById +You can execute the `getClientFeedbackById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getClientFeedbackById(vars: GetClientFeedbackByIdVariables): QueryPromise; + +interface GetClientFeedbackByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetClientFeedbackByIdVariables): QueryRef; +} +export const getClientFeedbackByIdRef: GetClientFeedbackByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getClientFeedbackById(dc: DataConnect, vars: GetClientFeedbackByIdVariables): QueryPromise; + +interface GetClientFeedbackByIdRef { + ... + (dc: DataConnect, vars: GetClientFeedbackByIdVariables): QueryRef; +} +export const getClientFeedbackByIdRef: GetClientFeedbackByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getClientFeedbackByIdRef: +```typescript +const name = getClientFeedbackByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getClientFeedbackById` query requires an argument of type `GetClientFeedbackByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetClientFeedbackByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getClientFeedbackById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetClientFeedbackByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetClientFeedbackByIdData { + clientFeedback?: { + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key; +} +``` +### Using `getClientFeedbackById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getClientFeedbackById, GetClientFeedbackByIdVariables } from '@dataconnect/generated'; + +// The `getClientFeedbackById` query requires an argument of type `GetClientFeedbackByIdVariables`: +const getClientFeedbackByIdVars: GetClientFeedbackByIdVariables = { + id: ..., +}; + +// Call the `getClientFeedbackById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getClientFeedbackById(getClientFeedbackByIdVars); +// Variables can be defined inline as well. +const { data } = await getClientFeedbackById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getClientFeedbackById(dataConnect, getClientFeedbackByIdVars); + +console.log(data.clientFeedback); + +// Or, you can use the `Promise` API. +getClientFeedbackById(getClientFeedbackByIdVars).then((response) => { + const data = response.data; + console.log(data.clientFeedback); +}); +``` + +### Using `getClientFeedbackById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getClientFeedbackByIdRef, GetClientFeedbackByIdVariables } from '@dataconnect/generated'; + +// The `getClientFeedbackById` query requires an argument of type `GetClientFeedbackByIdVariables`: +const getClientFeedbackByIdVars: GetClientFeedbackByIdVariables = { + id: ..., +}; + +// Call the `getClientFeedbackByIdRef()` function to get a reference to the query. +const ref = getClientFeedbackByIdRef(getClientFeedbackByIdVars); +// Variables can be defined inline as well. +const ref = getClientFeedbackByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getClientFeedbackByIdRef(dataConnect, getClientFeedbackByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.clientFeedback); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.clientFeedback); +}); +``` + +## listClientFeedbacksByBusinessId +You can execute the `listClientFeedbacksByBusinessId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listClientFeedbacksByBusinessId(vars: ListClientFeedbacksByBusinessIdVariables): QueryPromise; + +interface ListClientFeedbacksByBusinessIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListClientFeedbacksByBusinessIdVariables): QueryRef; +} +export const listClientFeedbacksByBusinessIdRef: ListClientFeedbacksByBusinessIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listClientFeedbacksByBusinessId(dc: DataConnect, vars: ListClientFeedbacksByBusinessIdVariables): QueryPromise; + +interface ListClientFeedbacksByBusinessIdRef { + ... + (dc: DataConnect, vars: ListClientFeedbacksByBusinessIdVariables): QueryRef; +} +export const listClientFeedbacksByBusinessIdRef: ListClientFeedbacksByBusinessIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listClientFeedbacksByBusinessIdRef: +```typescript +const name = listClientFeedbacksByBusinessIdRef.operationName; +console.log(name); +``` + +### Variables +The `listClientFeedbacksByBusinessId` query requires an argument of type `ListClientFeedbacksByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListClientFeedbacksByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listClientFeedbacksByBusinessId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListClientFeedbacksByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListClientFeedbacksByBusinessIdData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} +``` +### Using `listClientFeedbacksByBusinessId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listClientFeedbacksByBusinessId, ListClientFeedbacksByBusinessIdVariables } from '@dataconnect/generated'; + +// The `listClientFeedbacksByBusinessId` query requires an argument of type `ListClientFeedbacksByBusinessIdVariables`: +const listClientFeedbacksByBusinessIdVars: ListClientFeedbacksByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listClientFeedbacksByBusinessId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listClientFeedbacksByBusinessId(listClientFeedbacksByBusinessIdVars); +// Variables can be defined inline as well. +const { data } = await listClientFeedbacksByBusinessId({ businessId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listClientFeedbacksByBusinessId(dataConnect, listClientFeedbacksByBusinessIdVars); + +console.log(data.clientFeedbacks); + +// Or, you can use the `Promise` API. +listClientFeedbacksByBusinessId(listClientFeedbacksByBusinessIdVars).then((response) => { + const data = response.data; + console.log(data.clientFeedbacks); +}); +``` + +### Using `listClientFeedbacksByBusinessId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listClientFeedbacksByBusinessIdRef, ListClientFeedbacksByBusinessIdVariables } from '@dataconnect/generated'; + +// The `listClientFeedbacksByBusinessId` query requires an argument of type `ListClientFeedbacksByBusinessIdVariables`: +const listClientFeedbacksByBusinessIdVars: ListClientFeedbacksByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listClientFeedbacksByBusinessIdRef()` function to get a reference to the query. +const ref = listClientFeedbacksByBusinessIdRef(listClientFeedbacksByBusinessIdVars); +// Variables can be defined inline as well. +const ref = listClientFeedbacksByBusinessIdRef({ businessId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listClientFeedbacksByBusinessIdRef(dataConnect, listClientFeedbacksByBusinessIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.clientFeedbacks); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.clientFeedbacks); +}); +``` + +## listClientFeedbacksByVendorId +You can execute the `listClientFeedbacksByVendorId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listClientFeedbacksByVendorId(vars: ListClientFeedbacksByVendorIdVariables): QueryPromise; + +interface ListClientFeedbacksByVendorIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListClientFeedbacksByVendorIdVariables): QueryRef; +} +export const listClientFeedbacksByVendorIdRef: ListClientFeedbacksByVendorIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listClientFeedbacksByVendorId(dc: DataConnect, vars: ListClientFeedbacksByVendorIdVariables): QueryPromise; + +interface ListClientFeedbacksByVendorIdRef { + ... + (dc: DataConnect, vars: ListClientFeedbacksByVendorIdVariables): QueryRef; +} +export const listClientFeedbacksByVendorIdRef: ListClientFeedbacksByVendorIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listClientFeedbacksByVendorIdRef: +```typescript +const name = listClientFeedbacksByVendorIdRef.operationName; +console.log(name); +``` + +### Variables +The `listClientFeedbacksByVendorId` query requires an argument of type `ListClientFeedbacksByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListClientFeedbacksByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listClientFeedbacksByVendorId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListClientFeedbacksByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListClientFeedbacksByVendorIdData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} +``` +### Using `listClientFeedbacksByVendorId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listClientFeedbacksByVendorId, ListClientFeedbacksByVendorIdVariables } from '@dataconnect/generated'; + +// The `listClientFeedbacksByVendorId` query requires an argument of type `ListClientFeedbacksByVendorIdVariables`: +const listClientFeedbacksByVendorIdVars: ListClientFeedbacksByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listClientFeedbacksByVendorId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listClientFeedbacksByVendorId(listClientFeedbacksByVendorIdVars); +// Variables can be defined inline as well. +const { data } = await listClientFeedbacksByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listClientFeedbacksByVendorId(dataConnect, listClientFeedbacksByVendorIdVars); + +console.log(data.clientFeedbacks); + +// Or, you can use the `Promise` API. +listClientFeedbacksByVendorId(listClientFeedbacksByVendorIdVars).then((response) => { + const data = response.data; + console.log(data.clientFeedbacks); +}); +``` + +### Using `listClientFeedbacksByVendorId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listClientFeedbacksByVendorIdRef, ListClientFeedbacksByVendorIdVariables } from '@dataconnect/generated'; + +// The `listClientFeedbacksByVendorId` query requires an argument of type `ListClientFeedbacksByVendorIdVariables`: +const listClientFeedbacksByVendorIdVars: ListClientFeedbacksByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listClientFeedbacksByVendorIdRef()` function to get a reference to the query. +const ref = listClientFeedbacksByVendorIdRef(listClientFeedbacksByVendorIdVars); +// Variables can be defined inline as well. +const ref = listClientFeedbacksByVendorIdRef({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listClientFeedbacksByVendorIdRef(dataConnect, listClientFeedbacksByVendorIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.clientFeedbacks); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.clientFeedbacks); +}); +``` + +## listClientFeedbacksByBusinessAndVendor +You can execute the `listClientFeedbacksByBusinessAndVendor` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listClientFeedbacksByBusinessAndVendor(vars: ListClientFeedbacksByBusinessAndVendorVariables): QueryPromise; + +interface ListClientFeedbacksByBusinessAndVendorRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListClientFeedbacksByBusinessAndVendorVariables): QueryRef; +} +export const listClientFeedbacksByBusinessAndVendorRef: ListClientFeedbacksByBusinessAndVendorRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listClientFeedbacksByBusinessAndVendor(dc: DataConnect, vars: ListClientFeedbacksByBusinessAndVendorVariables): QueryPromise; + +interface ListClientFeedbacksByBusinessAndVendorRef { + ... + (dc: DataConnect, vars: ListClientFeedbacksByBusinessAndVendorVariables): QueryRef; +} +export const listClientFeedbacksByBusinessAndVendorRef: ListClientFeedbacksByBusinessAndVendorRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listClientFeedbacksByBusinessAndVendorRef: +```typescript +const name = listClientFeedbacksByBusinessAndVendorRef.operationName; +console.log(name); +``` + +### Variables +The `listClientFeedbacksByBusinessAndVendor` query requires an argument of type `ListClientFeedbacksByBusinessAndVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListClientFeedbacksByBusinessAndVendorVariables { + businessId: UUIDString; + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listClientFeedbacksByBusinessAndVendor` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListClientFeedbacksByBusinessAndVendorData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListClientFeedbacksByBusinessAndVendorData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} +``` +### Using `listClientFeedbacksByBusinessAndVendor`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listClientFeedbacksByBusinessAndVendor, ListClientFeedbacksByBusinessAndVendorVariables } from '@dataconnect/generated'; + +// The `listClientFeedbacksByBusinessAndVendor` query requires an argument of type `ListClientFeedbacksByBusinessAndVendorVariables`: +const listClientFeedbacksByBusinessAndVendorVars: ListClientFeedbacksByBusinessAndVendorVariables = { + businessId: ..., + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listClientFeedbacksByBusinessAndVendor()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listClientFeedbacksByBusinessAndVendor(listClientFeedbacksByBusinessAndVendorVars); +// Variables can be defined inline as well. +const { data } = await listClientFeedbacksByBusinessAndVendor({ businessId: ..., vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listClientFeedbacksByBusinessAndVendor(dataConnect, listClientFeedbacksByBusinessAndVendorVars); + +console.log(data.clientFeedbacks); + +// Or, you can use the `Promise` API. +listClientFeedbacksByBusinessAndVendor(listClientFeedbacksByBusinessAndVendorVars).then((response) => { + const data = response.data; + console.log(data.clientFeedbacks); +}); +``` + +### Using `listClientFeedbacksByBusinessAndVendor`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listClientFeedbacksByBusinessAndVendorRef, ListClientFeedbacksByBusinessAndVendorVariables } from '@dataconnect/generated'; + +// The `listClientFeedbacksByBusinessAndVendor` query requires an argument of type `ListClientFeedbacksByBusinessAndVendorVariables`: +const listClientFeedbacksByBusinessAndVendorVars: ListClientFeedbacksByBusinessAndVendorVariables = { + businessId: ..., + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listClientFeedbacksByBusinessAndVendorRef()` function to get a reference to the query. +const ref = listClientFeedbacksByBusinessAndVendorRef(listClientFeedbacksByBusinessAndVendorVars); +// Variables can be defined inline as well. +const ref = listClientFeedbacksByBusinessAndVendorRef({ businessId: ..., vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listClientFeedbacksByBusinessAndVendorRef(dataConnect, listClientFeedbacksByBusinessAndVendorVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.clientFeedbacks); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.clientFeedbacks); +}); +``` + +## filterClientFeedbacks +You can execute the `filterClientFeedbacks` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterClientFeedbacks(vars?: FilterClientFeedbacksVariables): QueryPromise; + +interface FilterClientFeedbacksRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterClientFeedbacksVariables): QueryRef; +} +export const filterClientFeedbacksRef: FilterClientFeedbacksRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterClientFeedbacks(dc: DataConnect, vars?: FilterClientFeedbacksVariables): QueryPromise; + +interface FilterClientFeedbacksRef { + ... + (dc: DataConnect, vars?: FilterClientFeedbacksVariables): QueryRef; +} +export const filterClientFeedbacksRef: FilterClientFeedbacksRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterClientFeedbacksRef: +```typescript +const name = filterClientFeedbacksRef.operationName; +console.log(name); +``` + +### Variables +The `filterClientFeedbacks` query has an optional argument of type `FilterClientFeedbacksVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterClientFeedbacksVariables { + businessId?: UUIDString | null; + vendorId?: UUIDString | null; + ratingMin?: number | null; + ratingMax?: number | null; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `filterClientFeedbacks` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterClientFeedbacksData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterClientFeedbacksData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} +``` +### Using `filterClientFeedbacks`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterClientFeedbacks, FilterClientFeedbacksVariables } from '@dataconnect/generated'; + +// The `filterClientFeedbacks` query has an optional argument of type `FilterClientFeedbacksVariables`: +const filterClientFeedbacksVars: FilterClientFeedbacksVariables = { + businessId: ..., // optional + vendorId: ..., // optional + ratingMin: ..., // optional + ratingMax: ..., // optional + dateFrom: ..., // optional + dateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterClientFeedbacks()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterClientFeedbacks(filterClientFeedbacksVars); +// Variables can be defined inline as well. +const { data } = await filterClientFeedbacks({ businessId: ..., vendorId: ..., ratingMin: ..., ratingMax: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterClientFeedbacksVariables` argument. +const { data } = await filterClientFeedbacks(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterClientFeedbacks(dataConnect, filterClientFeedbacksVars); + +console.log(data.clientFeedbacks); + +// Or, you can use the `Promise` API. +filterClientFeedbacks(filterClientFeedbacksVars).then((response) => { + const data = response.data; + console.log(data.clientFeedbacks); +}); +``` + +### Using `filterClientFeedbacks`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterClientFeedbacksRef, FilterClientFeedbacksVariables } from '@dataconnect/generated'; + +// The `filterClientFeedbacks` query has an optional argument of type `FilterClientFeedbacksVariables`: +const filterClientFeedbacksVars: FilterClientFeedbacksVariables = { + businessId: ..., // optional + vendorId: ..., // optional + ratingMin: ..., // optional + ratingMax: ..., // optional + dateFrom: ..., // optional + dateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterClientFeedbacksRef()` function to get a reference to the query. +const ref = filterClientFeedbacksRef(filterClientFeedbacksVars); +// Variables can be defined inline as well. +const ref = filterClientFeedbacksRef({ businessId: ..., vendorId: ..., ratingMin: ..., ratingMax: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterClientFeedbacksVariables` argument. +const ref = filterClientFeedbacksRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterClientFeedbacksRef(dataConnect, filterClientFeedbacksVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.clientFeedbacks); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.clientFeedbacks); +}); +``` + +## listClientFeedbackRatingsByVendorId +You can execute the `listClientFeedbackRatingsByVendorId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listClientFeedbackRatingsByVendorId(vars: ListClientFeedbackRatingsByVendorIdVariables): QueryPromise; + +interface ListClientFeedbackRatingsByVendorIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListClientFeedbackRatingsByVendorIdVariables): QueryRef; +} +export const listClientFeedbackRatingsByVendorIdRef: ListClientFeedbackRatingsByVendorIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listClientFeedbackRatingsByVendorId(dc: DataConnect, vars: ListClientFeedbackRatingsByVendorIdVariables): QueryPromise; + +interface ListClientFeedbackRatingsByVendorIdRef { + ... + (dc: DataConnect, vars: ListClientFeedbackRatingsByVendorIdVariables): QueryRef; +} +export const listClientFeedbackRatingsByVendorIdRef: ListClientFeedbackRatingsByVendorIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listClientFeedbackRatingsByVendorIdRef: +```typescript +const name = listClientFeedbackRatingsByVendorIdRef.operationName; +console.log(name); +``` + +### Variables +The `listClientFeedbackRatingsByVendorId` query requires an argument of type `ListClientFeedbackRatingsByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListClientFeedbackRatingsByVendorIdVariables { + vendorId: UUIDString; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `listClientFeedbackRatingsByVendorId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListClientFeedbackRatingsByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListClientFeedbackRatingsByVendorIdData { + clientFeedbacks: ({ + id: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} +``` +### Using `listClientFeedbackRatingsByVendorId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listClientFeedbackRatingsByVendorId, ListClientFeedbackRatingsByVendorIdVariables } from '@dataconnect/generated'; + +// The `listClientFeedbackRatingsByVendorId` query requires an argument of type `ListClientFeedbackRatingsByVendorIdVariables`: +const listClientFeedbackRatingsByVendorIdVars: ListClientFeedbackRatingsByVendorIdVariables = { + vendorId: ..., + dateFrom: ..., // optional + dateTo: ..., // optional +}; + +// Call the `listClientFeedbackRatingsByVendorId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listClientFeedbackRatingsByVendorId(listClientFeedbackRatingsByVendorIdVars); +// Variables can be defined inline as well. +const { data } = await listClientFeedbackRatingsByVendorId({ vendorId: ..., dateFrom: ..., dateTo: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listClientFeedbackRatingsByVendorId(dataConnect, listClientFeedbackRatingsByVendorIdVars); + +console.log(data.clientFeedbacks); + +// Or, you can use the `Promise` API. +listClientFeedbackRatingsByVendorId(listClientFeedbackRatingsByVendorIdVars).then((response) => { + const data = response.data; + console.log(data.clientFeedbacks); +}); +``` + +### Using `listClientFeedbackRatingsByVendorId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listClientFeedbackRatingsByVendorIdRef, ListClientFeedbackRatingsByVendorIdVariables } from '@dataconnect/generated'; + +// The `listClientFeedbackRatingsByVendorId` query requires an argument of type `ListClientFeedbackRatingsByVendorIdVariables`: +const listClientFeedbackRatingsByVendorIdVars: ListClientFeedbackRatingsByVendorIdVariables = { + vendorId: ..., + dateFrom: ..., // optional + dateTo: ..., // optional +}; + +// Call the `listClientFeedbackRatingsByVendorIdRef()` function to get a reference to the query. +const ref = listClientFeedbackRatingsByVendorIdRef(listClientFeedbackRatingsByVendorIdVars); +// Variables can be defined inline as well. +const ref = listClientFeedbackRatingsByVendorIdRef({ vendorId: ..., dateFrom: ..., dateTo: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listClientFeedbackRatingsByVendorIdRef(dataConnect, listClientFeedbackRatingsByVendorIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.clientFeedbacks); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.clientFeedbacks); +}); +``` + +## listUsers +You can execute the `listUsers` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listUsers(): QueryPromise; + +interface ListUsersRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listUsersRef: ListUsersRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listUsers(dc: DataConnect): QueryPromise; + +interface ListUsersRef { + ... + (dc: DataConnect): QueryRef; +} +export const listUsersRef: ListUsersRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listUsersRef: +```typescript +const name = listUsersRef.operationName; +console.log(name); +``` + +### Variables +The `listUsers` query has no variables. +### Return Type +Recall that executing the `listUsers` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListUsersData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListUsersData { + users: ({ + id: string; + email?: string | null; + fullName?: string | null; + role: UserBaseRole; + userRole?: string | null; + photoUrl?: string | null; + createdDate?: TimestampString | null; + updatedDate?: TimestampString | null; + } & User_Key)[]; +} +``` +### Using `listUsers`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listUsers } from '@dataconnect/generated'; + + +// Call the `listUsers()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listUsers(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listUsers(dataConnect); + +console.log(data.users); + +// Or, you can use the `Promise` API. +listUsers().then((response) => { + const data = response.data; + console.log(data.users); +}); +``` + +### Using `listUsers`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listUsersRef } from '@dataconnect/generated'; + + +// Call the `listUsersRef()` function to get a reference to the query. +const ref = listUsersRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listUsersRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.users); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.users); +}); +``` + +## getUserById +You can execute the `getUserById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getUserById(vars: GetUserByIdVariables): QueryPromise; + +interface GetUserByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetUserByIdVariables): QueryRef; +} +export const getUserByIdRef: GetUserByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getUserById(dc: DataConnect, vars: GetUserByIdVariables): QueryPromise; + +interface GetUserByIdRef { + ... + (dc: DataConnect, vars: GetUserByIdVariables): QueryRef; +} +export const getUserByIdRef: GetUserByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getUserByIdRef: +```typescript +const name = getUserByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getUserById` query requires an argument of type `GetUserByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetUserByIdVariables { + id: string; +} +``` +### Return Type +Recall that executing the `getUserById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetUserByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetUserByIdData { + user?: { + id: string; + email?: string | null; + fullName?: string | null; + role: UserBaseRole; + userRole?: string | null; + photoUrl?: string | null; + } & User_Key; +} +``` +### Using `getUserById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getUserById, GetUserByIdVariables } from '@dataconnect/generated'; + +// The `getUserById` query requires an argument of type `GetUserByIdVariables`: +const getUserByIdVars: GetUserByIdVariables = { + id: ..., +}; + +// Call the `getUserById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getUserById(getUserByIdVars); +// Variables can be defined inline as well. +const { data } = await getUserById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getUserById(dataConnect, getUserByIdVars); + +console.log(data.user); + +// Or, you can use the `Promise` API. +getUserById(getUserByIdVars).then((response) => { + const data = response.data; + console.log(data.user); +}); +``` + +### Using `getUserById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getUserByIdRef, GetUserByIdVariables } from '@dataconnect/generated'; + +// The `getUserById` query requires an argument of type `GetUserByIdVariables`: +const getUserByIdVars: GetUserByIdVariables = { + id: ..., +}; + +// Call the `getUserByIdRef()` function to get a reference to the query. +const ref = getUserByIdRef(getUserByIdVars); +// Variables can be defined inline as well. +const ref = getUserByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getUserByIdRef(dataConnect, getUserByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.user); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.user); +}); +``` + +## filterUsers +You can execute the `filterUsers` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterUsers(vars?: FilterUsersVariables): QueryPromise; + +interface FilterUsersRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterUsersVariables): QueryRef; +} +export const filterUsersRef: FilterUsersRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterUsers(dc: DataConnect, vars?: FilterUsersVariables): QueryPromise; + +interface FilterUsersRef { + ... + (dc: DataConnect, vars?: FilterUsersVariables): QueryRef; +} +export const filterUsersRef: FilterUsersRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterUsersRef: +```typescript +const name = filterUsersRef.operationName; +console.log(name); +``` + +### Variables +The `filterUsers` query has an optional argument of type `FilterUsersVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterUsersVariables { + id?: string | null; + email?: string | null; + role?: UserBaseRole | null; + userRole?: string | null; +} +``` +### Return Type +Recall that executing the `filterUsers` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterUsersData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterUsersData { + users: ({ + id: string; + email?: string | null; + fullName?: string | null; + role: UserBaseRole; + userRole?: string | null; + photoUrl?: string | null; + } & User_Key)[]; +} +``` +### Using `filterUsers`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterUsers, FilterUsersVariables } from '@dataconnect/generated'; + +// The `filterUsers` query has an optional argument of type `FilterUsersVariables`: +const filterUsersVars: FilterUsersVariables = { + id: ..., // optional + email: ..., // optional + role: ..., // optional + userRole: ..., // optional +}; + +// Call the `filterUsers()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterUsers(filterUsersVars); +// Variables can be defined inline as well. +const { data } = await filterUsers({ id: ..., email: ..., role: ..., userRole: ..., }); +// Since all variables are optional for this query, you can omit the `FilterUsersVariables` argument. +const { data } = await filterUsers(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterUsers(dataConnect, filterUsersVars); + +console.log(data.users); + +// Or, you can use the `Promise` API. +filterUsers(filterUsersVars).then((response) => { + const data = response.data; + console.log(data.users); +}); +``` + +### Using `filterUsers`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterUsersRef, FilterUsersVariables } from '@dataconnect/generated'; + +// The `filterUsers` query has an optional argument of type `FilterUsersVariables`: +const filterUsersVars: FilterUsersVariables = { + id: ..., // optional + email: ..., // optional + role: ..., // optional + userRole: ..., // optional +}; + +// Call the `filterUsersRef()` function to get a reference to the query. +const ref = filterUsersRef(filterUsersVars); +// Variables can be defined inline as well. +const ref = filterUsersRef({ id: ..., email: ..., role: ..., userRole: ..., }); +// Since all variables are optional for this query, you can omit the `FilterUsersVariables` argument. +const ref = filterUsersRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterUsersRef(dataConnect, filterUsersVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.users); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.users); +}); +``` + +## getVendorById +You can execute the `getVendorById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getVendorById(vars: GetVendorByIdVariables): QueryPromise; + +interface GetVendorByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetVendorByIdVariables): QueryRef; +} +export const getVendorByIdRef: GetVendorByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getVendorById(dc: DataConnect, vars: GetVendorByIdVariables): QueryPromise; + +interface GetVendorByIdRef { + ... + (dc: DataConnect, vars: GetVendorByIdVariables): QueryRef; +} +export const getVendorByIdRef: GetVendorByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getVendorByIdRef: +```typescript +const name = getVendorByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getVendorById` query requires an argument of type `GetVendorByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetVendorByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getVendorById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetVendorByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetVendorByIdData { + vendor?: { + id: UUIDString; + userId: string; + companyName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Vendor_Key; +} +``` +### Using `getVendorById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getVendorById, GetVendorByIdVariables } from '@dataconnect/generated'; + +// The `getVendorById` query requires an argument of type `GetVendorByIdVariables`: +const getVendorByIdVars: GetVendorByIdVariables = { + id: ..., +}; + +// Call the `getVendorById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getVendorById(getVendorByIdVars); +// Variables can be defined inline as well. +const { data } = await getVendorById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getVendorById(dataConnect, getVendorByIdVars); + +console.log(data.vendor); + +// Or, you can use the `Promise` API. +getVendorById(getVendorByIdVars).then((response) => { + const data = response.data; + console.log(data.vendor); +}); +``` + +### Using `getVendorById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getVendorByIdRef, GetVendorByIdVariables } from '@dataconnect/generated'; + +// The `getVendorById` query requires an argument of type `GetVendorByIdVariables`: +const getVendorByIdVars: GetVendorByIdVariables = { + id: ..., +}; + +// Call the `getVendorByIdRef()` function to get a reference to the query. +const ref = getVendorByIdRef(getVendorByIdVars); +// Variables can be defined inline as well. +const ref = getVendorByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getVendorByIdRef(dataConnect, getVendorByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.vendor); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.vendor); +}); +``` + +## getVendorByUserId +You can execute the `getVendorByUserId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getVendorByUserId(vars: GetVendorByUserIdVariables): QueryPromise; + +interface GetVendorByUserIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetVendorByUserIdVariables): QueryRef; +} +export const getVendorByUserIdRef: GetVendorByUserIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getVendorByUserId(dc: DataConnect, vars: GetVendorByUserIdVariables): QueryPromise; + +interface GetVendorByUserIdRef { + ... + (dc: DataConnect, vars: GetVendorByUserIdVariables): QueryRef; +} +export const getVendorByUserIdRef: GetVendorByUserIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getVendorByUserIdRef: +```typescript +const name = getVendorByUserIdRef.operationName; +console.log(name); +``` + +### Variables +The `getVendorByUserId` query requires an argument of type `GetVendorByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetVendorByUserIdVariables { + userId: string; +} +``` +### Return Type +Recall that executing the `getVendorByUserId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetVendorByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetVendorByUserIdData { + vendors: ({ + id: UUIDString; + userId: string; + companyName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Vendor_Key)[]; +} +``` +### Using `getVendorByUserId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getVendorByUserId, GetVendorByUserIdVariables } from '@dataconnect/generated'; + +// The `getVendorByUserId` query requires an argument of type `GetVendorByUserIdVariables`: +const getVendorByUserIdVars: GetVendorByUserIdVariables = { + userId: ..., +}; + +// Call the `getVendorByUserId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getVendorByUserId(getVendorByUserIdVars); +// Variables can be defined inline as well. +const { data } = await getVendorByUserId({ userId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getVendorByUserId(dataConnect, getVendorByUserIdVars); + +console.log(data.vendors); + +// Or, you can use the `Promise` API. +getVendorByUserId(getVendorByUserIdVars).then((response) => { + const data = response.data; + console.log(data.vendors); +}); +``` + +### Using `getVendorByUserId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getVendorByUserIdRef, GetVendorByUserIdVariables } from '@dataconnect/generated'; + +// The `getVendorByUserId` query requires an argument of type `GetVendorByUserIdVariables`: +const getVendorByUserIdVars: GetVendorByUserIdVariables = { + userId: ..., +}; + +// Call the `getVendorByUserIdRef()` function to get a reference to the query. +const ref = getVendorByUserIdRef(getVendorByUserIdVars); +// Variables can be defined inline as well. +const ref = getVendorByUserIdRef({ userId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getVendorByUserIdRef(dataConnect, getVendorByUserIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.vendors); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.vendors); +}); +``` + +## listVendors +You can execute the `listVendors` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listVendors(): QueryPromise; + +interface ListVendorsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listVendorsRef: ListVendorsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listVendors(dc: DataConnect): QueryPromise; + +interface ListVendorsRef { + ... + (dc: DataConnect): QueryRef; +} +export const listVendorsRef: ListVendorsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listVendorsRef: +```typescript +const name = listVendorsRef.operationName; +console.log(name); +``` + +### Variables +The `listVendors` query has no variables. +### Return Type +Recall that executing the `listVendors` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListVendorsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListVendorsData { + vendors: ({ + id: UUIDString; + userId: string; + companyName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Vendor_Key)[]; +} +``` +### Using `listVendors`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listVendors } from '@dataconnect/generated'; + + +// Call the `listVendors()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listVendors(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listVendors(dataConnect); + +console.log(data.vendors); + +// Or, you can use the `Promise` API. +listVendors().then((response) => { + const data = response.data; + console.log(data.vendors); +}); +``` + +### Using `listVendors`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listVendorsRef } from '@dataconnect/generated'; + + +// Call the `listVendorsRef()` function to get a reference to the query. +const ref = listVendorsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listVendorsRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.vendors); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.vendors); +}); +``` + +## listCategories +You can execute the `listCategories` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listCategories(): QueryPromise; + +interface ListCategoriesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listCategoriesRef: ListCategoriesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listCategories(dc: DataConnect): QueryPromise; + +interface ListCategoriesRef { + ... + (dc: DataConnect): QueryRef; +} +export const listCategoriesRef: ListCategoriesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listCategoriesRef: +```typescript +const name = listCategoriesRef.operationName; +console.log(name); +``` + +### Variables +The `listCategories` query has no variables. +### Return Type +Recall that executing the `listCategories` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListCategoriesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListCategoriesData { + categories: ({ + id: UUIDString; + categoryId: string; + label: string; + icon?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Category_Key)[]; +} +``` +### Using `listCategories`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listCategories } from '@dataconnect/generated'; + + +// Call the `listCategories()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listCategories(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listCategories(dataConnect); + +console.log(data.categories); + +// Or, you can use the `Promise` API. +listCategories().then((response) => { + const data = response.data; + console.log(data.categories); +}); +``` + +### Using `listCategories`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listCategoriesRef } from '@dataconnect/generated'; + + +// Call the `listCategoriesRef()` function to get a reference to the query. +const ref = listCategoriesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listCategoriesRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.categories); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.categories); +}); +``` + +## getCategoryById +You can execute the `getCategoryById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getCategoryById(vars: GetCategoryByIdVariables): QueryPromise; + +interface GetCategoryByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetCategoryByIdVariables): QueryRef; +} +export const getCategoryByIdRef: GetCategoryByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getCategoryById(dc: DataConnect, vars: GetCategoryByIdVariables): QueryPromise; + +interface GetCategoryByIdRef { + ... + (dc: DataConnect, vars: GetCategoryByIdVariables): QueryRef; +} +export const getCategoryByIdRef: GetCategoryByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getCategoryByIdRef: +```typescript +const name = getCategoryByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getCategoryById` query requires an argument of type `GetCategoryByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetCategoryByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getCategoryById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetCategoryByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetCategoryByIdData { + category?: { + id: UUIDString; + categoryId: string; + label: string; + icon?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Category_Key; +} +``` +### Using `getCategoryById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getCategoryById, GetCategoryByIdVariables } from '@dataconnect/generated'; + +// The `getCategoryById` query requires an argument of type `GetCategoryByIdVariables`: +const getCategoryByIdVars: GetCategoryByIdVariables = { + id: ..., +}; + +// Call the `getCategoryById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getCategoryById(getCategoryByIdVars); +// Variables can be defined inline as well. +const { data } = await getCategoryById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getCategoryById(dataConnect, getCategoryByIdVars); + +console.log(data.category); + +// Or, you can use the `Promise` API. +getCategoryById(getCategoryByIdVars).then((response) => { + const data = response.data; + console.log(data.category); +}); +``` + +### Using `getCategoryById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getCategoryByIdRef, GetCategoryByIdVariables } from '@dataconnect/generated'; + +// The `getCategoryById` query requires an argument of type `GetCategoryByIdVariables`: +const getCategoryByIdVars: GetCategoryByIdVariables = { + id: ..., +}; + +// Call the `getCategoryByIdRef()` function to get a reference to the query. +const ref = getCategoryByIdRef(getCategoryByIdVars); +// Variables can be defined inline as well. +const ref = getCategoryByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getCategoryByIdRef(dataConnect, getCategoryByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.category); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.category); +}); +``` + +## filterCategories +You can execute the `filterCategories` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterCategories(vars?: FilterCategoriesVariables): QueryPromise; + +interface FilterCategoriesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterCategoriesVariables): QueryRef; +} +export const filterCategoriesRef: FilterCategoriesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterCategories(dc: DataConnect, vars?: FilterCategoriesVariables): QueryPromise; + +interface FilterCategoriesRef { + ... + (dc: DataConnect, vars?: FilterCategoriesVariables): QueryRef; +} +export const filterCategoriesRef: FilterCategoriesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterCategoriesRef: +```typescript +const name = filterCategoriesRef.operationName; +console.log(name); +``` + +### Variables +The `filterCategories` query has an optional argument of type `FilterCategoriesVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterCategoriesVariables { + categoryId?: string | null; + label?: string | null; +} +``` +### Return Type +Recall that executing the `filterCategories` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterCategoriesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterCategoriesData { + categories: ({ + id: UUIDString; + categoryId: string; + label: string; + icon?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Category_Key)[]; +} +``` +### Using `filterCategories`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterCategories, FilterCategoriesVariables } from '@dataconnect/generated'; + +// The `filterCategories` query has an optional argument of type `FilterCategoriesVariables`: +const filterCategoriesVars: FilterCategoriesVariables = { + categoryId: ..., // optional + label: ..., // optional +}; + +// Call the `filterCategories()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterCategories(filterCategoriesVars); +// Variables can be defined inline as well. +const { data } = await filterCategories({ categoryId: ..., label: ..., }); +// Since all variables are optional for this query, you can omit the `FilterCategoriesVariables` argument. +const { data } = await filterCategories(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterCategories(dataConnect, filterCategoriesVars); + +console.log(data.categories); + +// Or, you can use the `Promise` API. +filterCategories(filterCategoriesVars).then((response) => { + const data = response.data; + console.log(data.categories); +}); +``` + +### Using `filterCategories`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterCategoriesRef, FilterCategoriesVariables } from '@dataconnect/generated'; + +// The `filterCategories` query has an optional argument of type `FilterCategoriesVariables`: +const filterCategoriesVars: FilterCategoriesVariables = { + categoryId: ..., // optional + label: ..., // optional +}; + +// Call the `filterCategoriesRef()` function to get a reference to the query. +const ref = filterCategoriesRef(filterCategoriesVars); +// Variables can be defined inline as well. +const ref = filterCategoriesRef({ categoryId: ..., label: ..., }); +// Since all variables are optional for this query, you can omit the `FilterCategoriesVariables` argument. +const ref = filterCategoriesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterCategoriesRef(dataConnect, filterCategoriesVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.categories); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.categories); +}); +``` + +## listMessages +You can execute the `listMessages` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listMessages(): QueryPromise; + +interface ListMessagesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listMessagesRef: ListMessagesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listMessages(dc: DataConnect): QueryPromise; + +interface ListMessagesRef { + ... + (dc: DataConnect): QueryRef; +} +export const listMessagesRef: ListMessagesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listMessagesRef: +```typescript +const name = listMessagesRef.operationName; +console.log(name); +``` + +### Variables +The `listMessages` query has no variables. +### Return Type +Recall that executing the `listMessages` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListMessagesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListMessagesData { + messages: ({ + id: UUIDString; + conversationId: UUIDString; + senderId: string; + content: string; + isSystem?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + }; + } & Message_Key)[]; +} +``` +### Using `listMessages`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listMessages } from '@dataconnect/generated'; + + +// Call the `listMessages()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listMessages(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listMessages(dataConnect); + +console.log(data.messages); + +// Or, you can use the `Promise` API. +listMessages().then((response) => { + const data = response.data; + console.log(data.messages); +}); +``` + +### Using `listMessages`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listMessagesRef } from '@dataconnect/generated'; + + +// Call the `listMessagesRef()` function to get a reference to the query. +const ref = listMessagesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listMessagesRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.messages); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.messages); +}); +``` + +## getMessageById +You can execute the `getMessageById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getMessageById(vars: GetMessageByIdVariables): QueryPromise; + +interface GetMessageByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetMessageByIdVariables): QueryRef; +} +export const getMessageByIdRef: GetMessageByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getMessageById(dc: DataConnect, vars: GetMessageByIdVariables): QueryPromise; + +interface GetMessageByIdRef { + ... + (dc: DataConnect, vars: GetMessageByIdVariables): QueryRef; +} +export const getMessageByIdRef: GetMessageByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getMessageByIdRef: +```typescript +const name = getMessageByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getMessageById` query requires an argument of type `GetMessageByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetMessageByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getMessageById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetMessageByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetMessageByIdData { + message?: { + id: UUIDString; + conversationId: UUIDString; + senderId: string; + content: string; + isSystem?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + }; + } & Message_Key; +} +``` +### Using `getMessageById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getMessageById, GetMessageByIdVariables } from '@dataconnect/generated'; + +// The `getMessageById` query requires an argument of type `GetMessageByIdVariables`: +const getMessageByIdVars: GetMessageByIdVariables = { + id: ..., +}; + +// Call the `getMessageById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getMessageById(getMessageByIdVars); +// Variables can be defined inline as well. +const { data } = await getMessageById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getMessageById(dataConnect, getMessageByIdVars); + +console.log(data.message); + +// Or, you can use the `Promise` API. +getMessageById(getMessageByIdVars).then((response) => { + const data = response.data; + console.log(data.message); +}); +``` + +### Using `getMessageById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getMessageByIdRef, GetMessageByIdVariables } from '@dataconnect/generated'; + +// The `getMessageById` query requires an argument of type `GetMessageByIdVariables`: +const getMessageByIdVars: GetMessageByIdVariables = { + id: ..., +}; + +// Call the `getMessageByIdRef()` function to get a reference to the query. +const ref = getMessageByIdRef(getMessageByIdVars); +// Variables can be defined inline as well. +const ref = getMessageByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getMessageByIdRef(dataConnect, getMessageByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.message); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.message); +}); +``` + +## getMessagesByConversationId +You can execute the `getMessagesByConversationId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getMessagesByConversationId(vars: GetMessagesByConversationIdVariables): QueryPromise; + +interface GetMessagesByConversationIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetMessagesByConversationIdVariables): QueryRef; +} +export const getMessagesByConversationIdRef: GetMessagesByConversationIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getMessagesByConversationId(dc: DataConnect, vars: GetMessagesByConversationIdVariables): QueryPromise; + +interface GetMessagesByConversationIdRef { + ... + (dc: DataConnect, vars: GetMessagesByConversationIdVariables): QueryRef; +} +export const getMessagesByConversationIdRef: GetMessagesByConversationIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getMessagesByConversationIdRef: +```typescript +const name = getMessagesByConversationIdRef.operationName; +console.log(name); +``` + +### Variables +The `getMessagesByConversationId` query requires an argument of type `GetMessagesByConversationIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetMessagesByConversationIdVariables { + conversationId: UUIDString; +} +``` +### Return Type +Recall that executing the `getMessagesByConversationId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetMessagesByConversationIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetMessagesByConversationIdData { + messages: ({ + id: UUIDString; + conversationId: UUIDString; + senderId: string; + content: string; + isSystem?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + }; + } & Message_Key)[]; +} +``` +### Using `getMessagesByConversationId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getMessagesByConversationId, GetMessagesByConversationIdVariables } from '@dataconnect/generated'; + +// The `getMessagesByConversationId` query requires an argument of type `GetMessagesByConversationIdVariables`: +const getMessagesByConversationIdVars: GetMessagesByConversationIdVariables = { + conversationId: ..., +}; + +// Call the `getMessagesByConversationId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getMessagesByConversationId(getMessagesByConversationIdVars); +// Variables can be defined inline as well. +const { data } = await getMessagesByConversationId({ conversationId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getMessagesByConversationId(dataConnect, getMessagesByConversationIdVars); + +console.log(data.messages); + +// Or, you can use the `Promise` API. +getMessagesByConversationId(getMessagesByConversationIdVars).then((response) => { + const data = response.data; + console.log(data.messages); +}); +``` + +### Using `getMessagesByConversationId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getMessagesByConversationIdRef, GetMessagesByConversationIdVariables } from '@dataconnect/generated'; + +// The `getMessagesByConversationId` query requires an argument of type `GetMessagesByConversationIdVariables`: +const getMessagesByConversationIdVars: GetMessagesByConversationIdVariables = { + conversationId: ..., +}; + +// Call the `getMessagesByConversationIdRef()` function to get a reference to the query. +const ref = getMessagesByConversationIdRef(getMessagesByConversationIdVars); +// Variables can be defined inline as well. +const ref = getMessagesByConversationIdRef({ conversationId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getMessagesByConversationIdRef(dataConnect, getMessagesByConversationIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.messages); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.messages); +}); +``` + +## listUserConversations +You can execute the `listUserConversations` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listUserConversations(vars?: ListUserConversationsVariables): QueryPromise; + +interface ListUserConversationsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListUserConversationsVariables): QueryRef; +} +export const listUserConversationsRef: ListUserConversationsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listUserConversations(dc: DataConnect, vars?: ListUserConversationsVariables): QueryPromise; + +interface ListUserConversationsRef { + ... + (dc: DataConnect, vars?: ListUserConversationsVariables): QueryRef; +} +export const listUserConversationsRef: ListUserConversationsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listUserConversationsRef: +```typescript +const name = listUserConversationsRef.operationName; +console.log(name); +``` + +### Variables +The `listUserConversations` query has an optional argument of type `ListUserConversationsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListUserConversationsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listUserConversations` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListUserConversationsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListUserConversationsData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key)[]; +} +``` +### Using `listUserConversations`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listUserConversations, ListUserConversationsVariables } from '@dataconnect/generated'; + +// The `listUserConversations` query has an optional argument of type `ListUserConversationsVariables`: +const listUserConversationsVars: ListUserConversationsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listUserConversations()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listUserConversations(listUserConversationsVars); +// Variables can be defined inline as well. +const { data } = await listUserConversations({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListUserConversationsVariables` argument. +const { data } = await listUserConversations(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listUserConversations(dataConnect, listUserConversationsVars); + +console.log(data.userConversations); + +// Or, you can use the `Promise` API. +listUserConversations(listUserConversationsVars).then((response) => { + const data = response.data; + console.log(data.userConversations); +}); +``` + +### Using `listUserConversations`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listUserConversationsRef, ListUserConversationsVariables } from '@dataconnect/generated'; + +// The `listUserConversations` query has an optional argument of type `ListUserConversationsVariables`: +const listUserConversationsVars: ListUserConversationsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listUserConversationsRef()` function to get a reference to the query. +const ref = listUserConversationsRef(listUserConversationsVars); +// Variables can be defined inline as well. +const ref = listUserConversationsRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListUserConversationsVariables` argument. +const ref = listUserConversationsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listUserConversationsRef(dataConnect, listUserConversationsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.userConversations); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.userConversations); +}); +``` + +## getUserConversationByKey +You can execute the `getUserConversationByKey` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getUserConversationByKey(vars: GetUserConversationByKeyVariables): QueryPromise; + +interface GetUserConversationByKeyRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetUserConversationByKeyVariables): QueryRef; +} +export const getUserConversationByKeyRef: GetUserConversationByKeyRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getUserConversationByKey(dc: DataConnect, vars: GetUserConversationByKeyVariables): QueryPromise; + +interface GetUserConversationByKeyRef { + ... + (dc: DataConnect, vars: GetUserConversationByKeyVariables): QueryRef; +} +export const getUserConversationByKeyRef: GetUserConversationByKeyRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getUserConversationByKeyRef: +```typescript +const name = getUserConversationByKeyRef.operationName; +console.log(name); +``` + +### Variables +The `getUserConversationByKey` query requires an argument of type `GetUserConversationByKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetUserConversationByKeyVariables { + conversationId: UUIDString; + userId: string; +} +``` +### Return Type +Recall that executing the `getUserConversationByKey` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetUserConversationByKeyData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetUserConversationByKeyData { + userConversation?: { + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key; +} +``` +### Using `getUserConversationByKey`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getUserConversationByKey, GetUserConversationByKeyVariables } from '@dataconnect/generated'; + +// The `getUserConversationByKey` query requires an argument of type `GetUserConversationByKeyVariables`: +const getUserConversationByKeyVars: GetUserConversationByKeyVariables = { + conversationId: ..., + userId: ..., +}; + +// Call the `getUserConversationByKey()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getUserConversationByKey(getUserConversationByKeyVars); +// Variables can be defined inline as well. +const { data } = await getUserConversationByKey({ conversationId: ..., userId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getUserConversationByKey(dataConnect, getUserConversationByKeyVars); + +console.log(data.userConversation); + +// Or, you can use the `Promise` API. +getUserConversationByKey(getUserConversationByKeyVars).then((response) => { + const data = response.data; + console.log(data.userConversation); +}); +``` + +### Using `getUserConversationByKey`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getUserConversationByKeyRef, GetUserConversationByKeyVariables } from '@dataconnect/generated'; + +// The `getUserConversationByKey` query requires an argument of type `GetUserConversationByKeyVariables`: +const getUserConversationByKeyVars: GetUserConversationByKeyVariables = { + conversationId: ..., + userId: ..., +}; + +// Call the `getUserConversationByKeyRef()` function to get a reference to the query. +const ref = getUserConversationByKeyRef(getUserConversationByKeyVars); +// Variables can be defined inline as well. +const ref = getUserConversationByKeyRef({ conversationId: ..., userId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getUserConversationByKeyRef(dataConnect, getUserConversationByKeyVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.userConversation); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.userConversation); +}); +``` + +## listUserConversationsByUserId +You can execute the `listUserConversationsByUserId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listUserConversationsByUserId(vars: ListUserConversationsByUserIdVariables): QueryPromise; + +interface ListUserConversationsByUserIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListUserConversationsByUserIdVariables): QueryRef; +} +export const listUserConversationsByUserIdRef: ListUserConversationsByUserIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listUserConversationsByUserId(dc: DataConnect, vars: ListUserConversationsByUserIdVariables): QueryPromise; + +interface ListUserConversationsByUserIdRef { + ... + (dc: DataConnect, vars: ListUserConversationsByUserIdVariables): QueryRef; +} +export const listUserConversationsByUserIdRef: ListUserConversationsByUserIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listUserConversationsByUserIdRef: +```typescript +const name = listUserConversationsByUserIdRef.operationName; +console.log(name); +``` + +### Variables +The `listUserConversationsByUserId` query requires an argument of type `ListUserConversationsByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListUserConversationsByUserIdVariables { + userId: string; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listUserConversationsByUserId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListUserConversationsByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListUserConversationsByUserIdData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key)[]; +} +``` +### Using `listUserConversationsByUserId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listUserConversationsByUserId, ListUserConversationsByUserIdVariables } from '@dataconnect/generated'; + +// The `listUserConversationsByUserId` query requires an argument of type `ListUserConversationsByUserIdVariables`: +const listUserConversationsByUserIdVars: ListUserConversationsByUserIdVariables = { + userId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listUserConversationsByUserId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listUserConversationsByUserId(listUserConversationsByUserIdVars); +// Variables can be defined inline as well. +const { data } = await listUserConversationsByUserId({ userId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listUserConversationsByUserId(dataConnect, listUserConversationsByUserIdVars); + +console.log(data.userConversations); + +// Or, you can use the `Promise` API. +listUserConversationsByUserId(listUserConversationsByUserIdVars).then((response) => { + const data = response.data; + console.log(data.userConversations); +}); +``` + +### Using `listUserConversationsByUserId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listUserConversationsByUserIdRef, ListUserConversationsByUserIdVariables } from '@dataconnect/generated'; + +// The `listUserConversationsByUserId` query requires an argument of type `ListUserConversationsByUserIdVariables`: +const listUserConversationsByUserIdVars: ListUserConversationsByUserIdVariables = { + userId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listUserConversationsByUserIdRef()` function to get a reference to the query. +const ref = listUserConversationsByUserIdRef(listUserConversationsByUserIdVars); +// Variables can be defined inline as well. +const ref = listUserConversationsByUserIdRef({ userId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listUserConversationsByUserIdRef(dataConnect, listUserConversationsByUserIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.userConversations); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.userConversations); +}); +``` + +## listUnreadUserConversationsByUserId +You can execute the `listUnreadUserConversationsByUserId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listUnreadUserConversationsByUserId(vars: ListUnreadUserConversationsByUserIdVariables): QueryPromise; + +interface ListUnreadUserConversationsByUserIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListUnreadUserConversationsByUserIdVariables): QueryRef; +} +export const listUnreadUserConversationsByUserIdRef: ListUnreadUserConversationsByUserIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listUnreadUserConversationsByUserId(dc: DataConnect, vars: ListUnreadUserConversationsByUserIdVariables): QueryPromise; + +interface ListUnreadUserConversationsByUserIdRef { + ... + (dc: DataConnect, vars: ListUnreadUserConversationsByUserIdVariables): QueryRef; +} +export const listUnreadUserConversationsByUserIdRef: ListUnreadUserConversationsByUserIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listUnreadUserConversationsByUserIdRef: +```typescript +const name = listUnreadUserConversationsByUserIdRef.operationName; +console.log(name); +``` + +### Variables +The `listUnreadUserConversationsByUserId` query requires an argument of type `ListUnreadUserConversationsByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListUnreadUserConversationsByUserIdVariables { + userId: string; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listUnreadUserConversationsByUserId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListUnreadUserConversationsByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListUnreadUserConversationsByUserIdData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + } & Conversation_Key; + } & UserConversation_Key)[]; +} +``` +### Using `listUnreadUserConversationsByUserId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listUnreadUserConversationsByUserId, ListUnreadUserConversationsByUserIdVariables } from '@dataconnect/generated'; + +// The `listUnreadUserConversationsByUserId` query requires an argument of type `ListUnreadUserConversationsByUserIdVariables`: +const listUnreadUserConversationsByUserIdVars: ListUnreadUserConversationsByUserIdVariables = { + userId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listUnreadUserConversationsByUserId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listUnreadUserConversationsByUserId(listUnreadUserConversationsByUserIdVars); +// Variables can be defined inline as well. +const { data } = await listUnreadUserConversationsByUserId({ userId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listUnreadUserConversationsByUserId(dataConnect, listUnreadUserConversationsByUserIdVars); + +console.log(data.userConversations); + +// Or, you can use the `Promise` API. +listUnreadUserConversationsByUserId(listUnreadUserConversationsByUserIdVars).then((response) => { + const data = response.data; + console.log(data.userConversations); +}); +``` + +### Using `listUnreadUserConversationsByUserId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listUnreadUserConversationsByUserIdRef, ListUnreadUserConversationsByUserIdVariables } from '@dataconnect/generated'; + +// The `listUnreadUserConversationsByUserId` query requires an argument of type `ListUnreadUserConversationsByUserIdVariables`: +const listUnreadUserConversationsByUserIdVars: ListUnreadUserConversationsByUserIdVariables = { + userId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listUnreadUserConversationsByUserIdRef()` function to get a reference to the query. +const ref = listUnreadUserConversationsByUserIdRef(listUnreadUserConversationsByUserIdVars); +// Variables can be defined inline as well. +const ref = listUnreadUserConversationsByUserIdRef({ userId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listUnreadUserConversationsByUserIdRef(dataConnect, listUnreadUserConversationsByUserIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.userConversations); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.userConversations); +}); +``` + +## listUserConversationsByConversationId +You can execute the `listUserConversationsByConversationId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listUserConversationsByConversationId(vars: ListUserConversationsByConversationIdVariables): QueryPromise; + +interface ListUserConversationsByConversationIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListUserConversationsByConversationIdVariables): QueryRef; +} +export const listUserConversationsByConversationIdRef: ListUserConversationsByConversationIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listUserConversationsByConversationId(dc: DataConnect, vars: ListUserConversationsByConversationIdVariables): QueryPromise; + +interface ListUserConversationsByConversationIdRef { + ... + (dc: DataConnect, vars: ListUserConversationsByConversationIdVariables): QueryRef; +} +export const listUserConversationsByConversationIdRef: ListUserConversationsByConversationIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listUserConversationsByConversationIdRef: +```typescript +const name = listUserConversationsByConversationIdRef.operationName; +console.log(name); +``` + +### Variables +The `listUserConversationsByConversationId` query requires an argument of type `ListUserConversationsByConversationIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListUserConversationsByConversationIdVariables { + conversationId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listUserConversationsByConversationId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListUserConversationsByConversationIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListUserConversationsByConversationIdData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key)[]; +} +``` +### Using `listUserConversationsByConversationId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listUserConversationsByConversationId, ListUserConversationsByConversationIdVariables } from '@dataconnect/generated'; + +// The `listUserConversationsByConversationId` query requires an argument of type `ListUserConversationsByConversationIdVariables`: +const listUserConversationsByConversationIdVars: ListUserConversationsByConversationIdVariables = { + conversationId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listUserConversationsByConversationId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listUserConversationsByConversationId(listUserConversationsByConversationIdVars); +// Variables can be defined inline as well. +const { data } = await listUserConversationsByConversationId({ conversationId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listUserConversationsByConversationId(dataConnect, listUserConversationsByConversationIdVars); + +console.log(data.userConversations); + +// Or, you can use the `Promise` API. +listUserConversationsByConversationId(listUserConversationsByConversationIdVars).then((response) => { + const data = response.data; + console.log(data.userConversations); +}); +``` + +### Using `listUserConversationsByConversationId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listUserConversationsByConversationIdRef, ListUserConversationsByConversationIdVariables } from '@dataconnect/generated'; + +// The `listUserConversationsByConversationId` query requires an argument of type `ListUserConversationsByConversationIdVariables`: +const listUserConversationsByConversationIdVars: ListUserConversationsByConversationIdVariables = { + conversationId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listUserConversationsByConversationIdRef()` function to get a reference to the query. +const ref = listUserConversationsByConversationIdRef(listUserConversationsByConversationIdVars); +// Variables can be defined inline as well. +const ref = listUserConversationsByConversationIdRef({ conversationId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listUserConversationsByConversationIdRef(dataConnect, listUserConversationsByConversationIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.userConversations); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.userConversations); +}); +``` + +## filterUserConversations +You can execute the `filterUserConversations` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterUserConversations(vars?: FilterUserConversationsVariables): QueryPromise; + +interface FilterUserConversationsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterUserConversationsVariables): QueryRef; +} +export const filterUserConversationsRef: FilterUserConversationsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterUserConversations(dc: DataConnect, vars?: FilterUserConversationsVariables): QueryPromise; + +interface FilterUserConversationsRef { + ... + (dc: DataConnect, vars?: FilterUserConversationsVariables): QueryRef; +} +export const filterUserConversationsRef: FilterUserConversationsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterUserConversationsRef: +```typescript +const name = filterUserConversationsRef.operationName; +console.log(name); +``` + +### Variables +The `filterUserConversations` query has an optional argument of type `FilterUserConversationsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterUserConversationsVariables { + userId?: string | null; + conversationId?: UUIDString | null; + unreadMin?: number | null; + unreadMax?: number | null; + lastReadAfter?: TimestampString | null; + lastReadBefore?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `filterUserConversations` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterUserConversationsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterUserConversationsData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key)[]; +} +``` +### Using `filterUserConversations`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterUserConversations, FilterUserConversationsVariables } from '@dataconnect/generated'; + +// The `filterUserConversations` query has an optional argument of type `FilterUserConversationsVariables`: +const filterUserConversationsVars: FilterUserConversationsVariables = { + userId: ..., // optional + conversationId: ..., // optional + unreadMin: ..., // optional + unreadMax: ..., // optional + lastReadAfter: ..., // optional + lastReadBefore: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterUserConversations()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterUserConversations(filterUserConversationsVars); +// Variables can be defined inline as well. +const { data } = await filterUserConversations({ userId: ..., conversationId: ..., unreadMin: ..., unreadMax: ..., lastReadAfter: ..., lastReadBefore: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterUserConversationsVariables` argument. +const { data } = await filterUserConversations(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterUserConversations(dataConnect, filterUserConversationsVars); + +console.log(data.userConversations); + +// Or, you can use the `Promise` API. +filterUserConversations(filterUserConversationsVars).then((response) => { + const data = response.data; + console.log(data.userConversations); +}); +``` + +### Using `filterUserConversations`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterUserConversationsRef, FilterUserConversationsVariables } from '@dataconnect/generated'; + +// The `filterUserConversations` query has an optional argument of type `FilterUserConversationsVariables`: +const filterUserConversationsVars: FilterUserConversationsVariables = { + userId: ..., // optional + conversationId: ..., // optional + unreadMin: ..., // optional + unreadMax: ..., // optional + lastReadAfter: ..., // optional + lastReadBefore: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterUserConversationsRef()` function to get a reference to the query. +const ref = filterUserConversationsRef(filterUserConversationsVars); +// Variables can be defined inline as well. +const ref = filterUserConversationsRef({ userId: ..., conversationId: ..., unreadMin: ..., unreadMax: ..., lastReadAfter: ..., lastReadBefore: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterUserConversationsVariables` argument. +const ref = filterUserConversationsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterUserConversationsRef(dataConnect, filterUserConversationsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.userConversations); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.userConversations); +}); +``` + +## listHubs +You can execute the `listHubs` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listHubs(): QueryPromise; + +interface ListHubsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listHubsRef: ListHubsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listHubs(dc: DataConnect): QueryPromise; + +interface ListHubsRef { + ... + (dc: DataConnect): QueryRef; +} +export const listHubsRef: ListHubsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listHubsRef: +```typescript +const name = listHubsRef.operationName; +console.log(name); +``` + +### Variables +The `listHubs` query has no variables. +### Return Type +Recall that executing the `listHubs` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListHubsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListHubsData { + hubs: ({ + id: UUIDString; + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Hub_Key)[]; +} +``` +### Using `listHubs`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listHubs } from '@dataconnect/generated'; + + +// Call the `listHubs()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listHubs(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listHubs(dataConnect); + +console.log(data.hubs); + +// Or, you can use the `Promise` API. +listHubs().then((response) => { + const data = response.data; + console.log(data.hubs); +}); +``` + +### Using `listHubs`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listHubsRef } from '@dataconnect/generated'; + + +// Call the `listHubsRef()` function to get a reference to the query. +const ref = listHubsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listHubsRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.hubs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.hubs); +}); +``` + +## getHubById +You can execute the `getHubById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getHubById(vars: GetHubByIdVariables): QueryPromise; + +interface GetHubByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetHubByIdVariables): QueryRef; +} +export const getHubByIdRef: GetHubByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getHubById(dc: DataConnect, vars: GetHubByIdVariables): QueryPromise; + +interface GetHubByIdRef { + ... + (dc: DataConnect, vars: GetHubByIdVariables): QueryRef; +} +export const getHubByIdRef: GetHubByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getHubByIdRef: +```typescript +const name = getHubByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getHubById` query requires an argument of type `GetHubByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetHubByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getHubById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetHubByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetHubByIdData { + hub?: { + id: UUIDString; + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Hub_Key; +} +``` +### Using `getHubById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getHubById, GetHubByIdVariables } from '@dataconnect/generated'; + +// The `getHubById` query requires an argument of type `GetHubByIdVariables`: +const getHubByIdVars: GetHubByIdVariables = { + id: ..., +}; + +// Call the `getHubById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getHubById(getHubByIdVars); +// Variables can be defined inline as well. +const { data } = await getHubById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getHubById(dataConnect, getHubByIdVars); + +console.log(data.hub); + +// Or, you can use the `Promise` API. +getHubById(getHubByIdVars).then((response) => { + const data = response.data; + console.log(data.hub); +}); +``` + +### Using `getHubById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getHubByIdRef, GetHubByIdVariables } from '@dataconnect/generated'; + +// The `getHubById` query requires an argument of type `GetHubByIdVariables`: +const getHubByIdVars: GetHubByIdVariables = { + id: ..., +}; + +// Call the `getHubByIdRef()` function to get a reference to the query. +const ref = getHubByIdRef(getHubByIdVars); +// Variables can be defined inline as well. +const ref = getHubByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getHubByIdRef(dataConnect, getHubByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.hub); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.hub); +}); +``` + +## getHubsByOwnerId +You can execute the `getHubsByOwnerId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getHubsByOwnerId(vars: GetHubsByOwnerIdVariables): QueryPromise; + +interface GetHubsByOwnerIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetHubsByOwnerIdVariables): QueryRef; +} +export const getHubsByOwnerIdRef: GetHubsByOwnerIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getHubsByOwnerId(dc: DataConnect, vars: GetHubsByOwnerIdVariables): QueryPromise; + +interface GetHubsByOwnerIdRef { + ... + (dc: DataConnect, vars: GetHubsByOwnerIdVariables): QueryRef; +} +export const getHubsByOwnerIdRef: GetHubsByOwnerIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getHubsByOwnerIdRef: +```typescript +const name = getHubsByOwnerIdRef.operationName; +console.log(name); +``` + +### Variables +The `getHubsByOwnerId` query requires an argument of type `GetHubsByOwnerIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetHubsByOwnerIdVariables { + ownerId: UUIDString; +} +``` +### Return Type +Recall that executing the `getHubsByOwnerId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetHubsByOwnerIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetHubsByOwnerIdData { + hubs: ({ + id: UUIDString; + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Hub_Key)[]; +} +``` +### Using `getHubsByOwnerId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getHubsByOwnerId, GetHubsByOwnerIdVariables } from '@dataconnect/generated'; + +// The `getHubsByOwnerId` query requires an argument of type `GetHubsByOwnerIdVariables`: +const getHubsByOwnerIdVars: GetHubsByOwnerIdVariables = { + ownerId: ..., +}; + +// Call the `getHubsByOwnerId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getHubsByOwnerId(getHubsByOwnerIdVars); +// Variables can be defined inline as well. +const { data } = await getHubsByOwnerId({ ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getHubsByOwnerId(dataConnect, getHubsByOwnerIdVars); + +console.log(data.hubs); + +// Or, you can use the `Promise` API. +getHubsByOwnerId(getHubsByOwnerIdVars).then((response) => { + const data = response.data; + console.log(data.hubs); +}); +``` + +### Using `getHubsByOwnerId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getHubsByOwnerIdRef, GetHubsByOwnerIdVariables } from '@dataconnect/generated'; + +// The `getHubsByOwnerId` query requires an argument of type `GetHubsByOwnerIdVariables`: +const getHubsByOwnerIdVars: GetHubsByOwnerIdVariables = { + ownerId: ..., +}; + +// Call the `getHubsByOwnerIdRef()` function to get a reference to the query. +const ref = getHubsByOwnerIdRef(getHubsByOwnerIdVars); +// Variables can be defined inline as well. +const ref = getHubsByOwnerIdRef({ ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getHubsByOwnerIdRef(dataConnect, getHubsByOwnerIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.hubs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.hubs); +}); +``` + +## filterHubs +You can execute the `filterHubs` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterHubs(vars?: FilterHubsVariables): QueryPromise; + +interface FilterHubsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterHubsVariables): QueryRef; +} +export const filterHubsRef: FilterHubsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterHubs(dc: DataConnect, vars?: FilterHubsVariables): QueryPromise; + +interface FilterHubsRef { + ... + (dc: DataConnect, vars?: FilterHubsVariables): QueryRef; +} +export const filterHubsRef: FilterHubsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterHubsRef: +```typescript +const name = filterHubsRef.operationName; +console.log(name); +``` + +### Variables +The `filterHubs` query has an optional argument of type `FilterHubsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterHubsVariables { + ownerId?: UUIDString | null; + name?: string | null; + nfcTagId?: string | null; +} +``` +### Return Type +Recall that executing the `filterHubs` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterHubsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterHubsData { + hubs: ({ + id: UUIDString; + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; + } & Hub_Key)[]; +} +``` +### Using `filterHubs`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterHubs, FilterHubsVariables } from '@dataconnect/generated'; + +// The `filterHubs` query has an optional argument of type `FilterHubsVariables`: +const filterHubsVars: FilterHubsVariables = { + ownerId: ..., // optional + name: ..., // optional + nfcTagId: ..., // optional +}; + +// Call the `filterHubs()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterHubs(filterHubsVars); +// Variables can be defined inline as well. +const { data } = await filterHubs({ ownerId: ..., name: ..., nfcTagId: ..., }); +// Since all variables are optional for this query, you can omit the `FilterHubsVariables` argument. +const { data } = await filterHubs(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterHubs(dataConnect, filterHubsVars); + +console.log(data.hubs); + +// Or, you can use the `Promise` API. +filterHubs(filterHubsVars).then((response) => { + const data = response.data; + console.log(data.hubs); +}); +``` + +### Using `filterHubs`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterHubsRef, FilterHubsVariables } from '@dataconnect/generated'; + +// The `filterHubs` query has an optional argument of type `FilterHubsVariables`: +const filterHubsVars: FilterHubsVariables = { + ownerId: ..., // optional + name: ..., // optional + nfcTagId: ..., // optional +}; + +// Call the `filterHubsRef()` function to get a reference to the query. +const ref = filterHubsRef(filterHubsVars); +// Variables can be defined inline as well. +const ref = filterHubsRef({ ownerId: ..., name: ..., nfcTagId: ..., }); +// Since all variables are optional for this query, you can omit the `FilterHubsVariables` argument. +const ref = filterHubsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterHubsRef(dataConnect, filterHubsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.hubs); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.hubs); +}); +``` + +## listInvoices +You can execute the `listInvoices` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listInvoices(vars?: ListInvoicesVariables): QueryPromise; + +interface ListInvoicesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListInvoicesVariables): QueryRef; +} +export const listInvoicesRef: ListInvoicesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listInvoices(dc: DataConnect, vars?: ListInvoicesVariables): QueryPromise; + +interface ListInvoicesRef { + ... + (dc: DataConnect, vars?: ListInvoicesVariables): QueryRef; +} +export const listInvoicesRef: ListInvoicesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listInvoicesRef: +```typescript +const name = listInvoicesRef.operationName; +console.log(name); +``` + +### Variables +The `listInvoices` query has an optional argument of type `ListInvoicesVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListInvoicesVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listInvoices` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListInvoicesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListInvoicesData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` +### Using `listInvoices`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listInvoices, ListInvoicesVariables } from '@dataconnect/generated'; + +// The `listInvoices` query has an optional argument of type `ListInvoicesVariables`: +const listInvoicesVars: ListInvoicesVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoices()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listInvoices(listInvoicesVars); +// Variables can be defined inline as well. +const { data } = await listInvoices({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListInvoicesVariables` argument. +const { data } = await listInvoices(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listInvoices(dataConnect, listInvoicesVars); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +listInvoices(listInvoicesVars).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +### Using `listInvoices`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesRef, ListInvoicesVariables } from '@dataconnect/generated'; + +// The `listInvoices` query has an optional argument of type `ListInvoicesVariables`: +const listInvoicesVars: ListInvoicesVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoicesRef()` function to get a reference to the query. +const ref = listInvoicesRef(listInvoicesVars); +// Variables can be defined inline as well. +const ref = listInvoicesRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListInvoicesVariables` argument. +const ref = listInvoicesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listInvoicesRef(dataConnect, listInvoicesVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +## getInvoiceById +You can execute the `getInvoiceById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getInvoiceById(vars: GetInvoiceByIdVariables): QueryPromise; + +interface GetInvoiceByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetInvoiceByIdVariables): QueryRef; +} +export const getInvoiceByIdRef: GetInvoiceByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getInvoiceById(dc: DataConnect, vars: GetInvoiceByIdVariables): QueryPromise; + +interface GetInvoiceByIdRef { + ... + (dc: DataConnect, vars: GetInvoiceByIdVariables): QueryRef; +} +export const getInvoiceByIdRef: GetInvoiceByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getInvoiceByIdRef: +```typescript +const name = getInvoiceByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getInvoiceById` query requires an argument of type `GetInvoiceByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetInvoiceByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getInvoiceById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetInvoiceByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetInvoiceByIdData { + invoice?: { + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key; +} +``` +### Using `getInvoiceById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getInvoiceById, GetInvoiceByIdVariables } from '@dataconnect/generated'; + +// The `getInvoiceById` query requires an argument of type `GetInvoiceByIdVariables`: +const getInvoiceByIdVars: GetInvoiceByIdVariables = { + id: ..., +}; + +// Call the `getInvoiceById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getInvoiceById(getInvoiceByIdVars); +// Variables can be defined inline as well. +const { data } = await getInvoiceById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getInvoiceById(dataConnect, getInvoiceByIdVars); + +console.log(data.invoice); + +// Or, you can use the `Promise` API. +getInvoiceById(getInvoiceByIdVars).then((response) => { + const data = response.data; + console.log(data.invoice); +}); +``` + +### Using `getInvoiceById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getInvoiceByIdRef, GetInvoiceByIdVariables } from '@dataconnect/generated'; + +// The `getInvoiceById` query requires an argument of type `GetInvoiceByIdVariables`: +const getInvoiceByIdVars: GetInvoiceByIdVariables = { + id: ..., +}; + +// Call the `getInvoiceByIdRef()` function to get a reference to the query. +const ref = getInvoiceByIdRef(getInvoiceByIdVars); +// Variables can be defined inline as well. +const ref = getInvoiceByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getInvoiceByIdRef(dataConnect, getInvoiceByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoice); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoice); +}); +``` + +## listInvoicesByVendorId +You can execute the `listInvoicesByVendorId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listInvoicesByVendorId(vars: ListInvoicesByVendorIdVariables): QueryPromise; + +interface ListInvoicesByVendorIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesByVendorIdVariables): QueryRef; +} +export const listInvoicesByVendorIdRef: ListInvoicesByVendorIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listInvoicesByVendorId(dc: DataConnect, vars: ListInvoicesByVendorIdVariables): QueryPromise; + +interface ListInvoicesByVendorIdRef { + ... + (dc: DataConnect, vars: ListInvoicesByVendorIdVariables): QueryRef; +} +export const listInvoicesByVendorIdRef: ListInvoicesByVendorIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listInvoicesByVendorIdRef: +```typescript +const name = listInvoicesByVendorIdRef.operationName; +console.log(name); +``` + +### Variables +The `listInvoicesByVendorId` query requires an argument of type `ListInvoicesByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListInvoicesByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listInvoicesByVendorId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListInvoicesByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListInvoicesByVendorIdData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` +### Using `listInvoicesByVendorId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesByVendorId, ListInvoicesByVendorIdVariables } from '@dataconnect/generated'; + +// The `listInvoicesByVendorId` query requires an argument of type `ListInvoicesByVendorIdVariables`: +const listInvoicesByVendorIdVars: ListInvoicesByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoicesByVendorId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listInvoicesByVendorId(listInvoicesByVendorIdVars); +// Variables can be defined inline as well. +const { data } = await listInvoicesByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listInvoicesByVendorId(dataConnect, listInvoicesByVendorIdVars); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +listInvoicesByVendorId(listInvoicesByVendorIdVars).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +### Using `listInvoicesByVendorId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesByVendorIdRef, ListInvoicesByVendorIdVariables } from '@dataconnect/generated'; + +// The `listInvoicesByVendorId` query requires an argument of type `ListInvoicesByVendorIdVariables`: +const listInvoicesByVendorIdVars: ListInvoicesByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoicesByVendorIdRef()` function to get a reference to the query. +const ref = listInvoicesByVendorIdRef(listInvoicesByVendorIdVars); +// Variables can be defined inline as well. +const ref = listInvoicesByVendorIdRef({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listInvoicesByVendorIdRef(dataConnect, listInvoicesByVendorIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +## listInvoicesByBusinessId +You can execute the `listInvoicesByBusinessId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listInvoicesByBusinessId(vars: ListInvoicesByBusinessIdVariables): QueryPromise; + +interface ListInvoicesByBusinessIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesByBusinessIdVariables): QueryRef; +} +export const listInvoicesByBusinessIdRef: ListInvoicesByBusinessIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listInvoicesByBusinessId(dc: DataConnect, vars: ListInvoicesByBusinessIdVariables): QueryPromise; + +interface ListInvoicesByBusinessIdRef { + ... + (dc: DataConnect, vars: ListInvoicesByBusinessIdVariables): QueryRef; +} +export const listInvoicesByBusinessIdRef: ListInvoicesByBusinessIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listInvoicesByBusinessIdRef: +```typescript +const name = listInvoicesByBusinessIdRef.operationName; +console.log(name); +``` + +### Variables +The `listInvoicesByBusinessId` query requires an argument of type `ListInvoicesByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListInvoicesByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listInvoicesByBusinessId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListInvoicesByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListInvoicesByBusinessIdData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` +### Using `listInvoicesByBusinessId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesByBusinessId, ListInvoicesByBusinessIdVariables } from '@dataconnect/generated'; + +// The `listInvoicesByBusinessId` query requires an argument of type `ListInvoicesByBusinessIdVariables`: +const listInvoicesByBusinessIdVars: ListInvoicesByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoicesByBusinessId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listInvoicesByBusinessId(listInvoicesByBusinessIdVars); +// Variables can be defined inline as well. +const { data } = await listInvoicesByBusinessId({ businessId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listInvoicesByBusinessId(dataConnect, listInvoicesByBusinessIdVars); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +listInvoicesByBusinessId(listInvoicesByBusinessIdVars).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +### Using `listInvoicesByBusinessId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesByBusinessIdRef, ListInvoicesByBusinessIdVariables } from '@dataconnect/generated'; + +// The `listInvoicesByBusinessId` query requires an argument of type `ListInvoicesByBusinessIdVariables`: +const listInvoicesByBusinessIdVars: ListInvoicesByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoicesByBusinessIdRef()` function to get a reference to the query. +const ref = listInvoicesByBusinessIdRef(listInvoicesByBusinessIdVars); +// Variables can be defined inline as well. +const ref = listInvoicesByBusinessIdRef({ businessId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listInvoicesByBusinessIdRef(dataConnect, listInvoicesByBusinessIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +## listInvoicesByOrderId +You can execute the `listInvoicesByOrderId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listInvoicesByOrderId(vars: ListInvoicesByOrderIdVariables): QueryPromise; + +interface ListInvoicesByOrderIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesByOrderIdVariables): QueryRef; +} +export const listInvoicesByOrderIdRef: ListInvoicesByOrderIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listInvoicesByOrderId(dc: DataConnect, vars: ListInvoicesByOrderIdVariables): QueryPromise; + +interface ListInvoicesByOrderIdRef { + ... + (dc: DataConnect, vars: ListInvoicesByOrderIdVariables): QueryRef; +} +export const listInvoicesByOrderIdRef: ListInvoicesByOrderIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listInvoicesByOrderIdRef: +```typescript +const name = listInvoicesByOrderIdRef.operationName; +console.log(name); +``` + +### Variables +The `listInvoicesByOrderId` query requires an argument of type `ListInvoicesByOrderIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListInvoicesByOrderIdVariables { + orderId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listInvoicesByOrderId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListInvoicesByOrderIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListInvoicesByOrderIdData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` +### Using `listInvoicesByOrderId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesByOrderId, ListInvoicesByOrderIdVariables } from '@dataconnect/generated'; + +// The `listInvoicesByOrderId` query requires an argument of type `ListInvoicesByOrderIdVariables`: +const listInvoicesByOrderIdVars: ListInvoicesByOrderIdVariables = { + orderId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoicesByOrderId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listInvoicesByOrderId(listInvoicesByOrderIdVars); +// Variables can be defined inline as well. +const { data } = await listInvoicesByOrderId({ orderId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listInvoicesByOrderId(dataConnect, listInvoicesByOrderIdVars); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +listInvoicesByOrderId(listInvoicesByOrderIdVars).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +### Using `listInvoicesByOrderId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesByOrderIdRef, ListInvoicesByOrderIdVariables } from '@dataconnect/generated'; + +// The `listInvoicesByOrderId` query requires an argument of type `ListInvoicesByOrderIdVariables`: +const listInvoicesByOrderIdVars: ListInvoicesByOrderIdVariables = { + orderId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoicesByOrderIdRef()` function to get a reference to the query. +const ref = listInvoicesByOrderIdRef(listInvoicesByOrderIdVars); +// Variables can be defined inline as well. +const ref = listInvoicesByOrderIdRef({ orderId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listInvoicesByOrderIdRef(dataConnect, listInvoicesByOrderIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +## listInvoicesByStatus +You can execute the `listInvoicesByStatus` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listInvoicesByStatus(vars: ListInvoicesByStatusVariables): QueryPromise; + +interface ListInvoicesByStatusRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesByStatusVariables): QueryRef; +} +export const listInvoicesByStatusRef: ListInvoicesByStatusRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listInvoicesByStatus(dc: DataConnect, vars: ListInvoicesByStatusVariables): QueryPromise; + +interface ListInvoicesByStatusRef { + ... + (dc: DataConnect, vars: ListInvoicesByStatusVariables): QueryRef; +} +export const listInvoicesByStatusRef: ListInvoicesByStatusRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listInvoicesByStatusRef: +```typescript +const name = listInvoicesByStatusRef.operationName; +console.log(name); +``` + +### Variables +The `listInvoicesByStatus` query requires an argument of type `ListInvoicesByStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListInvoicesByStatusVariables { + status: InvoiceStatus; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listInvoicesByStatus` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListInvoicesByStatusData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListInvoicesByStatusData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` +### Using `listInvoicesByStatus`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesByStatus, ListInvoicesByStatusVariables } from '@dataconnect/generated'; + +// The `listInvoicesByStatus` query requires an argument of type `ListInvoicesByStatusVariables`: +const listInvoicesByStatusVars: ListInvoicesByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoicesByStatus()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listInvoicesByStatus(listInvoicesByStatusVars); +// Variables can be defined inline as well. +const { data } = await listInvoicesByStatus({ status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listInvoicesByStatus(dataConnect, listInvoicesByStatusVars); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +listInvoicesByStatus(listInvoicesByStatusVars).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +### Using `listInvoicesByStatus`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listInvoicesByStatusRef, ListInvoicesByStatusVariables } from '@dataconnect/generated'; + +// The `listInvoicesByStatus` query requires an argument of type `ListInvoicesByStatusVariables`: +const listInvoicesByStatusVars: ListInvoicesByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listInvoicesByStatusRef()` function to get a reference to the query. +const ref = listInvoicesByStatusRef(listInvoicesByStatusVars); +// Variables can be defined inline as well. +const ref = listInvoicesByStatusRef({ status: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listInvoicesByStatusRef(dataConnect, listInvoicesByStatusVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +## filterInvoices +You can execute the `filterInvoices` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterInvoices(vars?: FilterInvoicesVariables): QueryPromise; + +interface FilterInvoicesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterInvoicesVariables): QueryRef; +} +export const filterInvoicesRef: FilterInvoicesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterInvoices(dc: DataConnect, vars?: FilterInvoicesVariables): QueryPromise; + +interface FilterInvoicesRef { + ... + (dc: DataConnect, vars?: FilterInvoicesVariables): QueryRef; +} +export const filterInvoicesRef: FilterInvoicesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterInvoicesRef: +```typescript +const name = filterInvoicesRef.operationName; +console.log(name); +``` + +### Variables +The `filterInvoices` query has an optional argument of type `FilterInvoicesVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterInvoicesVariables { + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + status?: InvoiceStatus | null; + issueDateFrom?: TimestampString | null; + issueDateTo?: TimestampString | null; + dueDateFrom?: TimestampString | null; + dueDateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `filterInvoices` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterInvoicesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterInvoicesData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` +### Using `filterInvoices`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterInvoices, FilterInvoicesVariables } from '@dataconnect/generated'; + +// The `filterInvoices` query has an optional argument of type `FilterInvoicesVariables`: +const filterInvoicesVars: FilterInvoicesVariables = { + vendorId: ..., // optional + businessId: ..., // optional + orderId: ..., // optional + status: ..., // optional + issueDateFrom: ..., // optional + issueDateTo: ..., // optional + dueDateFrom: ..., // optional + dueDateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterInvoices()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterInvoices(filterInvoicesVars); +// Variables can be defined inline as well. +const { data } = await filterInvoices({ vendorId: ..., businessId: ..., orderId: ..., status: ..., issueDateFrom: ..., issueDateTo: ..., dueDateFrom: ..., dueDateTo: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterInvoicesVariables` argument. +const { data } = await filterInvoices(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterInvoices(dataConnect, filterInvoicesVars); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +filterInvoices(filterInvoicesVars).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +### Using `filterInvoices`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterInvoicesRef, FilterInvoicesVariables } from '@dataconnect/generated'; + +// The `filterInvoices` query has an optional argument of type `FilterInvoicesVariables`: +const filterInvoicesVars: FilterInvoicesVariables = { + vendorId: ..., // optional + businessId: ..., // optional + orderId: ..., // optional + status: ..., // optional + issueDateFrom: ..., // optional + issueDateTo: ..., // optional + dueDateFrom: ..., // optional + dueDateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterInvoicesRef()` function to get a reference to the query. +const ref = filterInvoicesRef(filterInvoicesVars); +// Variables can be defined inline as well. +const ref = filterInvoicesRef({ vendorId: ..., businessId: ..., orderId: ..., status: ..., issueDateFrom: ..., issueDateTo: ..., dueDateFrom: ..., dueDateTo: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterInvoicesVariables` argument. +const ref = filterInvoicesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterInvoicesRef(dataConnect, filterInvoicesVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +## listOverdueInvoices +You can execute the `listOverdueInvoices` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listOverdueInvoices(vars: ListOverdueInvoicesVariables): QueryPromise; + +interface ListOverdueInvoicesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListOverdueInvoicesVariables): QueryRef; +} +export const listOverdueInvoicesRef: ListOverdueInvoicesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listOverdueInvoices(dc: DataConnect, vars: ListOverdueInvoicesVariables): QueryPromise; + +interface ListOverdueInvoicesRef { + ... + (dc: DataConnect, vars: ListOverdueInvoicesVariables): QueryRef; +} +export const listOverdueInvoicesRef: ListOverdueInvoicesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listOverdueInvoicesRef: +```typescript +const name = listOverdueInvoicesRef.operationName; +console.log(name); +``` + +### Variables +The `listOverdueInvoices` query requires an argument of type `ListOverdueInvoicesVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListOverdueInvoicesVariables { + now: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listOverdueInvoices` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListOverdueInvoicesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListOverdueInvoicesData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` +### Using `listOverdueInvoices`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listOverdueInvoices, ListOverdueInvoicesVariables } from '@dataconnect/generated'; + +// The `listOverdueInvoices` query requires an argument of type `ListOverdueInvoicesVariables`: +const listOverdueInvoicesVars: ListOverdueInvoicesVariables = { + now: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listOverdueInvoices()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listOverdueInvoices(listOverdueInvoicesVars); +// Variables can be defined inline as well. +const { data } = await listOverdueInvoices({ now: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listOverdueInvoices(dataConnect, listOverdueInvoicesVars); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +listOverdueInvoices(listOverdueInvoicesVars).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +### Using `listOverdueInvoices`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listOverdueInvoicesRef, ListOverdueInvoicesVariables } from '@dataconnect/generated'; + +// The `listOverdueInvoices` query requires an argument of type `ListOverdueInvoicesVariables`: +const listOverdueInvoicesVars: ListOverdueInvoicesVariables = { + now: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listOverdueInvoicesRef()` function to get a reference to the query. +const ref = listOverdueInvoicesRef(listOverdueInvoicesVars); +// Variables can be defined inline as well. +const ref = listOverdueInvoicesRef({ now: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listOverdueInvoicesRef(dataConnect, listOverdueInvoicesVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.invoices); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.invoices); +}); +``` + +## listCourses +You can execute the `listCourses` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listCourses(): QueryPromise; + +interface ListCoursesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listCoursesRef: ListCoursesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listCourses(dc: DataConnect): QueryPromise; + +interface ListCoursesRef { + ... + (dc: DataConnect): QueryRef; +} +export const listCoursesRef: ListCoursesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listCoursesRef: +```typescript +const name = listCoursesRef.operationName; +console.log(name); +``` + +### Variables +The `listCourses` query has no variables. +### Return Type +Recall that executing the `listCourses` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListCoursesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListCoursesData { + courses: ({ + id: UUIDString; + title?: string | null; + description?: string | null; + thumbnailUrl?: string | null; + durationMinutes?: number | null; + xpReward?: number | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; + createdAt?: TimestampString | null; + category: { + id: UUIDString; + label: string; + } & Category_Key; + } & Course_Key)[]; +} +``` +### Using `listCourses`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listCourses } from '@dataconnect/generated'; + + +// Call the `listCourses()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listCourses(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listCourses(dataConnect); + +console.log(data.courses); + +// Or, you can use the `Promise` API. +listCourses().then((response) => { + const data = response.data; + console.log(data.courses); +}); +``` + +### Using `listCourses`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listCoursesRef } from '@dataconnect/generated'; + + +// Call the `listCoursesRef()` function to get a reference to the query. +const ref = listCoursesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listCoursesRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.courses); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.courses); +}); +``` + +## getCourseById +You can execute the `getCourseById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getCourseById(vars: GetCourseByIdVariables): QueryPromise; + +interface GetCourseByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetCourseByIdVariables): QueryRef; +} +export const getCourseByIdRef: GetCourseByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getCourseById(dc: DataConnect, vars: GetCourseByIdVariables): QueryPromise; + +interface GetCourseByIdRef { + ... + (dc: DataConnect, vars: GetCourseByIdVariables): QueryRef; +} +export const getCourseByIdRef: GetCourseByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getCourseByIdRef: +```typescript +const name = getCourseByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getCourseById` query requires an argument of type `GetCourseByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetCourseByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getCourseById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetCourseByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetCourseByIdData { + course?: { + id: UUIDString; + title?: string | null; + description?: string | null; + thumbnailUrl?: string | null; + durationMinutes?: number | null; + xpReward?: number | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; + createdAt?: TimestampString | null; + category: { + id: UUIDString; + label: string; + } & Category_Key; + } & Course_Key; +} +``` +### Using `getCourseById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getCourseById, GetCourseByIdVariables } from '@dataconnect/generated'; + +// The `getCourseById` query requires an argument of type `GetCourseByIdVariables`: +const getCourseByIdVars: GetCourseByIdVariables = { + id: ..., +}; + +// Call the `getCourseById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getCourseById(getCourseByIdVars); +// Variables can be defined inline as well. +const { data } = await getCourseById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getCourseById(dataConnect, getCourseByIdVars); + +console.log(data.course); + +// Or, you can use the `Promise` API. +getCourseById(getCourseByIdVars).then((response) => { + const data = response.data; + console.log(data.course); +}); +``` + +### Using `getCourseById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getCourseByIdRef, GetCourseByIdVariables } from '@dataconnect/generated'; + +// The `getCourseById` query requires an argument of type `GetCourseByIdVariables`: +const getCourseByIdVars: GetCourseByIdVariables = { + id: ..., +}; + +// Call the `getCourseByIdRef()` function to get a reference to the query. +const ref = getCourseByIdRef(getCourseByIdVars); +// Variables can be defined inline as well. +const ref = getCourseByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getCourseByIdRef(dataConnect, getCourseByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.course); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.course); +}); +``` + +## filterCourses +You can execute the `filterCourses` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterCourses(vars?: FilterCoursesVariables): QueryPromise; + +interface FilterCoursesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterCoursesVariables): QueryRef; +} +export const filterCoursesRef: FilterCoursesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterCourses(dc: DataConnect, vars?: FilterCoursesVariables): QueryPromise; + +interface FilterCoursesRef { + ... + (dc: DataConnect, vars?: FilterCoursesVariables): QueryRef; +} +export const filterCoursesRef: FilterCoursesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterCoursesRef: +```typescript +const name = filterCoursesRef.operationName; +console.log(name); +``` + +### Variables +The `filterCourses` query has an optional argument of type `FilterCoursesVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterCoursesVariables { + categoryId?: UUIDString | null; + isCertification?: boolean | null; + levelRequired?: string | null; + completed?: boolean | null; +} +``` +### Return Type +Recall that executing the `filterCourses` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterCoursesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterCoursesData { + courses: ({ + id: UUIDString; + title?: string | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; + category: { + id: UUIDString; + label: string; + } & Category_Key; + } & Course_Key)[]; +} +``` +### Using `filterCourses`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterCourses, FilterCoursesVariables } from '@dataconnect/generated'; + +// The `filterCourses` query has an optional argument of type `FilterCoursesVariables`: +const filterCoursesVars: FilterCoursesVariables = { + categoryId: ..., // optional + isCertification: ..., // optional + levelRequired: ..., // optional + completed: ..., // optional +}; + +// Call the `filterCourses()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterCourses(filterCoursesVars); +// Variables can be defined inline as well. +const { data } = await filterCourses({ categoryId: ..., isCertification: ..., levelRequired: ..., completed: ..., }); +// Since all variables are optional for this query, you can omit the `FilterCoursesVariables` argument. +const { data } = await filterCourses(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterCourses(dataConnect, filterCoursesVars); + +console.log(data.courses); + +// Or, you can use the `Promise` API. +filterCourses(filterCoursesVars).then((response) => { + const data = response.data; + console.log(data.courses); +}); +``` + +### Using `filterCourses`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterCoursesRef, FilterCoursesVariables } from '@dataconnect/generated'; + +// The `filterCourses` query has an optional argument of type `FilterCoursesVariables`: +const filterCoursesVars: FilterCoursesVariables = { + categoryId: ..., // optional + isCertification: ..., // optional + levelRequired: ..., // optional + completed: ..., // optional +}; + +// Call the `filterCoursesRef()` function to get a reference to the query. +const ref = filterCoursesRef(filterCoursesVars); +// Variables can be defined inline as well. +const ref = filterCoursesRef({ categoryId: ..., isCertification: ..., levelRequired: ..., completed: ..., }); +// Since all variables are optional for this query, you can omit the `FilterCoursesVariables` argument. +const ref = filterCoursesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterCoursesRef(dataConnect, filterCoursesVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.courses); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.courses); +}); +``` + +## listVendorRates +You can execute the `listVendorRates` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listVendorRates(): QueryPromise; + +interface ListVendorRatesRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listVendorRatesRef: ListVendorRatesRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listVendorRates(dc: DataConnect): QueryPromise; + +interface ListVendorRatesRef { + ... + (dc: DataConnect): QueryRef; +} +export const listVendorRatesRef: ListVendorRatesRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listVendorRatesRef: +```typescript +const name = listVendorRatesRef.operationName; +console.log(name); +``` + +### Variables +The `listVendorRates` query has no variables. +### Return Type +Recall that executing the `listVendorRates` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListVendorRatesData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListVendorRatesData { + vendorRates: ({ + id: UUIDString; + vendorId: UUIDString; + roleName?: string | null; + category?: CategoryType | null; + clientRate?: number | null; + employeeWage?: number | null; + markupPercentage?: number | null; + vendorFeePercentage?: number | null; + isActive?: boolean | null; + notes?: string | null; + createdAt?: TimestampString | null; + vendor: { + companyName: string; + region?: string | null; + }; + } & VendorRate_Key)[]; +} +``` +### Using `listVendorRates`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listVendorRates } from '@dataconnect/generated'; + + +// Call the `listVendorRates()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listVendorRates(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listVendorRates(dataConnect); + +console.log(data.vendorRates); + +// Or, you can use the `Promise` API. +listVendorRates().then((response) => { + const data = response.data; + console.log(data.vendorRates); +}); +``` + +### Using `listVendorRates`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listVendorRatesRef } from '@dataconnect/generated'; + + +// Call the `listVendorRatesRef()` function to get a reference to the query. +const ref = listVendorRatesRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listVendorRatesRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.vendorRates); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.vendorRates); +}); +``` + +## getVendorRateById +You can execute the `getVendorRateById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getVendorRateById(vars: GetVendorRateByIdVariables): QueryPromise; + +interface GetVendorRateByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetVendorRateByIdVariables): QueryRef; +} +export const getVendorRateByIdRef: GetVendorRateByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getVendorRateById(dc: DataConnect, vars: GetVendorRateByIdVariables): QueryPromise; + +interface GetVendorRateByIdRef { + ... + (dc: DataConnect, vars: GetVendorRateByIdVariables): QueryRef; +} +export const getVendorRateByIdRef: GetVendorRateByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getVendorRateByIdRef: +```typescript +const name = getVendorRateByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getVendorRateById` query requires an argument of type `GetVendorRateByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetVendorRateByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getVendorRateById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetVendorRateByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetVendorRateByIdData { + vendorRate?: { + id: UUIDString; + vendorId: UUIDString; + roleName?: string | null; + category?: CategoryType | null; + clientRate?: number | null; + employeeWage?: number | null; + markupPercentage?: number | null; + vendorFeePercentage?: number | null; + isActive?: boolean | null; + notes?: string | null; + createdAt?: TimestampString | null; + vendor: { + companyName: string; + region?: string | null; + }; + } & VendorRate_Key; +} +``` +### Using `getVendorRateById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getVendorRateById, GetVendorRateByIdVariables } from '@dataconnect/generated'; + +// The `getVendorRateById` query requires an argument of type `GetVendorRateByIdVariables`: +const getVendorRateByIdVars: GetVendorRateByIdVariables = { + id: ..., +}; + +// Call the `getVendorRateById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getVendorRateById(getVendorRateByIdVars); +// Variables can be defined inline as well. +const { data } = await getVendorRateById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getVendorRateById(dataConnect, getVendorRateByIdVars); + +console.log(data.vendorRate); + +// Or, you can use the `Promise` API. +getVendorRateById(getVendorRateByIdVars).then((response) => { + const data = response.data; + console.log(data.vendorRate); +}); +``` + +### Using `getVendorRateById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getVendorRateByIdRef, GetVendorRateByIdVariables } from '@dataconnect/generated'; + +// The `getVendorRateById` query requires an argument of type `GetVendorRateByIdVariables`: +const getVendorRateByIdVars: GetVendorRateByIdVariables = { + id: ..., +}; + +// Call the `getVendorRateByIdRef()` function to get a reference to the query. +const ref = getVendorRateByIdRef(getVendorRateByIdVars); +// Variables can be defined inline as well. +const ref = getVendorRateByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getVendorRateByIdRef(dataConnect, getVendorRateByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.vendorRate); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.vendorRate); +}); +``` + +## getWorkforceById +You can execute the `getWorkforceById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getWorkforceById(vars: GetWorkforceByIdVariables): QueryPromise; + +interface GetWorkforceByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetWorkforceByIdVariables): QueryRef; +} +export const getWorkforceByIdRef: GetWorkforceByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getWorkforceById(dc: DataConnect, vars: GetWorkforceByIdVariables): QueryPromise; + +interface GetWorkforceByIdRef { + ... + (dc: DataConnect, vars: GetWorkforceByIdVariables): QueryRef; +} +export const getWorkforceByIdRef: GetWorkforceByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getWorkforceByIdRef: +```typescript +const name = getWorkforceByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getWorkforceById` query requires an argument of type `GetWorkforceByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetWorkforceByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getWorkforceById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetWorkforceByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetWorkforceByIdData { + workforce?: { + id: UUIDString; + vendorId: UUIDString; + staffId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Workforce_Key; +} +``` +### Using `getWorkforceById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getWorkforceById, GetWorkforceByIdVariables } from '@dataconnect/generated'; + +// The `getWorkforceById` query requires an argument of type `GetWorkforceByIdVariables`: +const getWorkforceByIdVars: GetWorkforceByIdVariables = { + id: ..., +}; + +// Call the `getWorkforceById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getWorkforceById(getWorkforceByIdVars); +// Variables can be defined inline as well. +const { data } = await getWorkforceById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getWorkforceById(dataConnect, getWorkforceByIdVars); + +console.log(data.workforce); + +// Or, you can use the `Promise` API. +getWorkforceById(getWorkforceByIdVars).then((response) => { + const data = response.data; + console.log(data.workforce); +}); +``` + +### Using `getWorkforceById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getWorkforceByIdRef, GetWorkforceByIdVariables } from '@dataconnect/generated'; + +// The `getWorkforceById` query requires an argument of type `GetWorkforceByIdVariables`: +const getWorkforceByIdVars: GetWorkforceByIdVariables = { + id: ..., +}; + +// Call the `getWorkforceByIdRef()` function to get a reference to the query. +const ref = getWorkforceByIdRef(getWorkforceByIdVars); +// Variables can be defined inline as well. +const ref = getWorkforceByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getWorkforceByIdRef(dataConnect, getWorkforceByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.workforce); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.workforce); +}); +``` + +## getWorkforceByVendorAndStaff +You can execute the `getWorkforceByVendorAndStaff` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getWorkforceByVendorAndStaff(vars: GetWorkforceByVendorAndStaffVariables): QueryPromise; + +interface GetWorkforceByVendorAndStaffRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetWorkforceByVendorAndStaffVariables): QueryRef; +} +export const getWorkforceByVendorAndStaffRef: GetWorkforceByVendorAndStaffRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getWorkforceByVendorAndStaff(dc: DataConnect, vars: GetWorkforceByVendorAndStaffVariables): QueryPromise; + +interface GetWorkforceByVendorAndStaffRef { + ... + (dc: DataConnect, vars: GetWorkforceByVendorAndStaffVariables): QueryRef; +} +export const getWorkforceByVendorAndStaffRef: GetWorkforceByVendorAndStaffRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getWorkforceByVendorAndStaffRef: +```typescript +const name = getWorkforceByVendorAndStaffRef.operationName; +console.log(name); +``` + +### Variables +The `getWorkforceByVendorAndStaff` query requires an argument of type `GetWorkforceByVendorAndStaffVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetWorkforceByVendorAndStaffVariables { + vendorId: UUIDString; + staffId: UUIDString; +} +``` +### Return Type +Recall that executing the `getWorkforceByVendorAndStaff` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetWorkforceByVendorAndStaffData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetWorkforceByVendorAndStaffData { + workforces: ({ + id: UUIDString; + vendorId: UUIDString; + staffId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Workforce_Key)[]; +} +``` +### Using `getWorkforceByVendorAndStaff`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getWorkforceByVendorAndStaff, GetWorkforceByVendorAndStaffVariables } from '@dataconnect/generated'; + +// The `getWorkforceByVendorAndStaff` query requires an argument of type `GetWorkforceByVendorAndStaffVariables`: +const getWorkforceByVendorAndStaffVars: GetWorkforceByVendorAndStaffVariables = { + vendorId: ..., + staffId: ..., +}; + +// Call the `getWorkforceByVendorAndStaff()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getWorkforceByVendorAndStaff(getWorkforceByVendorAndStaffVars); +// Variables can be defined inline as well. +const { data } = await getWorkforceByVendorAndStaff({ vendorId: ..., staffId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getWorkforceByVendorAndStaff(dataConnect, getWorkforceByVendorAndStaffVars); + +console.log(data.workforces); + +// Or, you can use the `Promise` API. +getWorkforceByVendorAndStaff(getWorkforceByVendorAndStaffVars).then((response) => { + const data = response.data; + console.log(data.workforces); +}); +``` + +### Using `getWorkforceByVendorAndStaff`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getWorkforceByVendorAndStaffRef, GetWorkforceByVendorAndStaffVariables } from '@dataconnect/generated'; + +// The `getWorkforceByVendorAndStaff` query requires an argument of type `GetWorkforceByVendorAndStaffVariables`: +const getWorkforceByVendorAndStaffVars: GetWorkforceByVendorAndStaffVariables = { + vendorId: ..., + staffId: ..., +}; + +// Call the `getWorkforceByVendorAndStaffRef()` function to get a reference to the query. +const ref = getWorkforceByVendorAndStaffRef(getWorkforceByVendorAndStaffVars); +// Variables can be defined inline as well. +const ref = getWorkforceByVendorAndStaffRef({ vendorId: ..., staffId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getWorkforceByVendorAndStaffRef(dataConnect, getWorkforceByVendorAndStaffVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.workforces); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.workforces); +}); +``` + +## listWorkforceByVendorId +You can execute the `listWorkforceByVendorId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listWorkforceByVendorId(vars: ListWorkforceByVendorIdVariables): QueryPromise; + +interface ListWorkforceByVendorIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListWorkforceByVendorIdVariables): QueryRef; +} +export const listWorkforceByVendorIdRef: ListWorkforceByVendorIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listWorkforceByVendorId(dc: DataConnect, vars: ListWorkforceByVendorIdVariables): QueryPromise; + +interface ListWorkforceByVendorIdRef { + ... + (dc: DataConnect, vars: ListWorkforceByVendorIdVariables): QueryRef; +} +export const listWorkforceByVendorIdRef: ListWorkforceByVendorIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listWorkforceByVendorIdRef: +```typescript +const name = listWorkforceByVendorIdRef.operationName; +console.log(name); +``` + +### Variables +The `listWorkforceByVendorId` query requires an argument of type `ListWorkforceByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListWorkforceByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listWorkforceByVendorId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListWorkforceByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListWorkforceByVendorIdData { + workforces: ({ + id: UUIDString; + staffId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; + createdAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key)[]; +} +``` +### Using `listWorkforceByVendorId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listWorkforceByVendorId, ListWorkforceByVendorIdVariables } from '@dataconnect/generated'; + +// The `listWorkforceByVendorId` query requires an argument of type `ListWorkforceByVendorIdVariables`: +const listWorkforceByVendorIdVars: ListWorkforceByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listWorkforceByVendorId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listWorkforceByVendorId(listWorkforceByVendorIdVars); +// Variables can be defined inline as well. +const { data } = await listWorkforceByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listWorkforceByVendorId(dataConnect, listWorkforceByVendorIdVars); + +console.log(data.workforces); + +// Or, you can use the `Promise` API. +listWorkforceByVendorId(listWorkforceByVendorIdVars).then((response) => { + const data = response.data; + console.log(data.workforces); +}); +``` + +### Using `listWorkforceByVendorId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listWorkforceByVendorIdRef, ListWorkforceByVendorIdVariables } from '@dataconnect/generated'; + +// The `listWorkforceByVendorId` query requires an argument of type `ListWorkforceByVendorIdVariables`: +const listWorkforceByVendorIdVars: ListWorkforceByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listWorkforceByVendorIdRef()` function to get a reference to the query. +const ref = listWorkforceByVendorIdRef(listWorkforceByVendorIdVars); +// Variables can be defined inline as well. +const ref = listWorkforceByVendorIdRef({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listWorkforceByVendorIdRef(dataConnect, listWorkforceByVendorIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.workforces); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.workforces); +}); +``` + +## listWorkforceByStaffId +You can execute the `listWorkforceByStaffId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listWorkforceByStaffId(vars: ListWorkforceByStaffIdVariables): QueryPromise; + +interface ListWorkforceByStaffIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListWorkforceByStaffIdVariables): QueryRef; +} +export const listWorkforceByStaffIdRef: ListWorkforceByStaffIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listWorkforceByStaffId(dc: DataConnect, vars: ListWorkforceByStaffIdVariables): QueryPromise; + +interface ListWorkforceByStaffIdRef { + ... + (dc: DataConnect, vars: ListWorkforceByStaffIdVariables): QueryRef; +} +export const listWorkforceByStaffIdRef: ListWorkforceByStaffIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listWorkforceByStaffIdRef: +```typescript +const name = listWorkforceByStaffIdRef.operationName; +console.log(name); +``` + +### Variables +The `listWorkforceByStaffId` query requires an argument of type `ListWorkforceByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListWorkforceByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listWorkforceByStaffId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListWorkforceByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListWorkforceByStaffIdData { + workforces: ({ + id: UUIDString; + vendorId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Workforce_Key)[]; +} +``` +### Using `listWorkforceByStaffId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listWorkforceByStaffId, ListWorkforceByStaffIdVariables } from '@dataconnect/generated'; + +// The `listWorkforceByStaffId` query requires an argument of type `ListWorkforceByStaffIdVariables`: +const listWorkforceByStaffIdVars: ListWorkforceByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listWorkforceByStaffId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listWorkforceByStaffId(listWorkforceByStaffIdVars); +// Variables can be defined inline as well. +const { data } = await listWorkforceByStaffId({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listWorkforceByStaffId(dataConnect, listWorkforceByStaffIdVars); + +console.log(data.workforces); + +// Or, you can use the `Promise` API. +listWorkforceByStaffId(listWorkforceByStaffIdVars).then((response) => { + const data = response.data; + console.log(data.workforces); +}); +``` + +### Using `listWorkforceByStaffId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listWorkforceByStaffIdRef, ListWorkforceByStaffIdVariables } from '@dataconnect/generated'; + +// The `listWorkforceByStaffId` query requires an argument of type `ListWorkforceByStaffIdVariables`: +const listWorkforceByStaffIdVars: ListWorkforceByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listWorkforceByStaffIdRef()` function to get a reference to the query. +const ref = listWorkforceByStaffIdRef(listWorkforceByStaffIdVars); +// Variables can be defined inline as well. +const ref = listWorkforceByStaffIdRef({ staffId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listWorkforceByStaffIdRef(dataConnect, listWorkforceByStaffIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.workforces); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.workforces); +}); +``` + +## getWorkforceByVendorAndNumber +You can execute the `getWorkforceByVendorAndNumber` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getWorkforceByVendorAndNumber(vars: GetWorkforceByVendorAndNumberVariables): QueryPromise; + +interface GetWorkforceByVendorAndNumberRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetWorkforceByVendorAndNumberVariables): QueryRef; +} +export const getWorkforceByVendorAndNumberRef: GetWorkforceByVendorAndNumberRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getWorkforceByVendorAndNumber(dc: DataConnect, vars: GetWorkforceByVendorAndNumberVariables): QueryPromise; + +interface GetWorkforceByVendorAndNumberRef { + ... + (dc: DataConnect, vars: GetWorkforceByVendorAndNumberVariables): QueryRef; +} +export const getWorkforceByVendorAndNumberRef: GetWorkforceByVendorAndNumberRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getWorkforceByVendorAndNumberRef: +```typescript +const name = getWorkforceByVendorAndNumberRef.operationName; +console.log(name); +``` + +### Variables +The `getWorkforceByVendorAndNumber` query requires an argument of type `GetWorkforceByVendorAndNumberVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetWorkforceByVendorAndNumberVariables { + vendorId: UUIDString; + workforceNumber: string; +} +``` +### Return Type +Recall that executing the `getWorkforceByVendorAndNumber` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetWorkforceByVendorAndNumberData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetWorkforceByVendorAndNumberData { + workforces: ({ + id: UUIDString; + staffId: UUIDString; + workforceNumber: string; + status?: WorkforceStatus | null; + } & Workforce_Key)[]; +} +``` +### Using `getWorkforceByVendorAndNumber`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getWorkforceByVendorAndNumber, GetWorkforceByVendorAndNumberVariables } from '@dataconnect/generated'; + +// The `getWorkforceByVendorAndNumber` query requires an argument of type `GetWorkforceByVendorAndNumberVariables`: +const getWorkforceByVendorAndNumberVars: GetWorkforceByVendorAndNumberVariables = { + vendorId: ..., + workforceNumber: ..., +}; + +// Call the `getWorkforceByVendorAndNumber()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getWorkforceByVendorAndNumber(getWorkforceByVendorAndNumberVars); +// Variables can be defined inline as well. +const { data } = await getWorkforceByVendorAndNumber({ vendorId: ..., workforceNumber: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getWorkforceByVendorAndNumber(dataConnect, getWorkforceByVendorAndNumberVars); + +console.log(data.workforces); + +// Or, you can use the `Promise` API. +getWorkforceByVendorAndNumber(getWorkforceByVendorAndNumberVars).then((response) => { + const data = response.data; + console.log(data.workforces); +}); +``` + +### Using `getWorkforceByVendorAndNumber`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getWorkforceByVendorAndNumberRef, GetWorkforceByVendorAndNumberVariables } from '@dataconnect/generated'; + +// The `getWorkforceByVendorAndNumber` query requires an argument of type `GetWorkforceByVendorAndNumberVariables`: +const getWorkforceByVendorAndNumberVars: GetWorkforceByVendorAndNumberVariables = { + vendorId: ..., + workforceNumber: ..., +}; + +// Call the `getWorkforceByVendorAndNumberRef()` function to get a reference to the query. +const ref = getWorkforceByVendorAndNumberRef(getWorkforceByVendorAndNumberVars); +// Variables can be defined inline as well. +const ref = getWorkforceByVendorAndNumberRef({ vendorId: ..., workforceNumber: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getWorkforceByVendorAndNumberRef(dataConnect, getWorkforceByVendorAndNumberVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.workforces); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.workforces); +}); +``` + +## listStaffAvailabilityStats +You can execute the `listStaffAvailabilityStats` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listStaffAvailabilityStats(vars?: ListStaffAvailabilityStatsVariables): QueryPromise; + +interface ListStaffAvailabilityStatsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListStaffAvailabilityStatsVariables): QueryRef; +} +export const listStaffAvailabilityStatsRef: ListStaffAvailabilityStatsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listStaffAvailabilityStats(dc: DataConnect, vars?: ListStaffAvailabilityStatsVariables): QueryPromise; + +interface ListStaffAvailabilityStatsRef { + ... + (dc: DataConnect, vars?: ListStaffAvailabilityStatsVariables): QueryRef; +} +export const listStaffAvailabilityStatsRef: ListStaffAvailabilityStatsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listStaffAvailabilityStatsRef: +```typescript +const name = listStaffAvailabilityStatsRef.operationName; +console.log(name); +``` + +### Variables +The `listStaffAvailabilityStats` query has an optional argument of type `ListStaffAvailabilityStatsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListStaffAvailabilityStatsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listStaffAvailabilityStats` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListStaffAvailabilityStatsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListStaffAvailabilityStatsData { + staffAvailabilityStatss: ({ + id: UUIDString; + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailabilityStats_Key)[]; +} +``` +### Using `listStaffAvailabilityStats`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listStaffAvailabilityStats, ListStaffAvailabilityStatsVariables } from '@dataconnect/generated'; + +// The `listStaffAvailabilityStats` query has an optional argument of type `ListStaffAvailabilityStatsVariables`: +const listStaffAvailabilityStatsVars: ListStaffAvailabilityStatsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffAvailabilityStats()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listStaffAvailabilityStats(listStaffAvailabilityStatsVars); +// Variables can be defined inline as well. +const { data } = await listStaffAvailabilityStats({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListStaffAvailabilityStatsVariables` argument. +const { data } = await listStaffAvailabilityStats(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listStaffAvailabilityStats(dataConnect, listStaffAvailabilityStatsVars); + +console.log(data.staffAvailabilityStatss); + +// Or, you can use the `Promise` API. +listStaffAvailabilityStats(listStaffAvailabilityStatsVars).then((response) => { + const data = response.data; + console.log(data.staffAvailabilityStatss); +}); +``` + +### Using `listStaffAvailabilityStats`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listStaffAvailabilityStatsRef, ListStaffAvailabilityStatsVariables } from '@dataconnect/generated'; + +// The `listStaffAvailabilityStats` query has an optional argument of type `ListStaffAvailabilityStatsVariables`: +const listStaffAvailabilityStatsVars: ListStaffAvailabilityStatsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listStaffAvailabilityStatsRef()` function to get a reference to the query. +const ref = listStaffAvailabilityStatsRef(listStaffAvailabilityStatsVars); +// Variables can be defined inline as well. +const ref = listStaffAvailabilityStatsRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListStaffAvailabilityStatsVariables` argument. +const ref = listStaffAvailabilityStatsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listStaffAvailabilityStatsRef(dataConnect, listStaffAvailabilityStatsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffAvailabilityStatss); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffAvailabilityStatss); +}); +``` + +## getStaffAvailabilityStatsByStaffId +You can execute the `getStaffAvailabilityStatsByStaffId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getStaffAvailabilityStatsByStaffId(vars: GetStaffAvailabilityStatsByStaffIdVariables): QueryPromise; + +interface GetStaffAvailabilityStatsByStaffIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffAvailabilityStatsByStaffIdVariables): QueryRef; +} +export const getStaffAvailabilityStatsByStaffIdRef: GetStaffAvailabilityStatsByStaffIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getStaffAvailabilityStatsByStaffId(dc: DataConnect, vars: GetStaffAvailabilityStatsByStaffIdVariables): QueryPromise; + +interface GetStaffAvailabilityStatsByStaffIdRef { + ... + (dc: DataConnect, vars: GetStaffAvailabilityStatsByStaffIdVariables): QueryRef; +} +export const getStaffAvailabilityStatsByStaffIdRef: GetStaffAvailabilityStatsByStaffIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getStaffAvailabilityStatsByStaffIdRef: +```typescript +const name = getStaffAvailabilityStatsByStaffIdRef.operationName; +console.log(name); +``` + +### Variables +The `getStaffAvailabilityStatsByStaffId` query requires an argument of type `GetStaffAvailabilityStatsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetStaffAvailabilityStatsByStaffIdVariables { + staffId: UUIDString; +} +``` +### Return Type +Recall that executing the `getStaffAvailabilityStatsByStaffId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetStaffAvailabilityStatsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetStaffAvailabilityStatsByStaffIdData { + staffAvailabilityStats?: { + id: UUIDString; + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailabilityStats_Key; +} +``` +### Using `getStaffAvailabilityStatsByStaffId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getStaffAvailabilityStatsByStaffId, GetStaffAvailabilityStatsByStaffIdVariables } from '@dataconnect/generated'; + +// The `getStaffAvailabilityStatsByStaffId` query requires an argument of type `GetStaffAvailabilityStatsByStaffIdVariables`: +const getStaffAvailabilityStatsByStaffIdVars: GetStaffAvailabilityStatsByStaffIdVariables = { + staffId: ..., +}; + +// Call the `getStaffAvailabilityStatsByStaffId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getStaffAvailabilityStatsByStaffId(getStaffAvailabilityStatsByStaffIdVars); +// Variables can be defined inline as well. +const { data } = await getStaffAvailabilityStatsByStaffId({ staffId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getStaffAvailabilityStatsByStaffId(dataConnect, getStaffAvailabilityStatsByStaffIdVars); + +console.log(data.staffAvailabilityStats); + +// Or, you can use the `Promise` API. +getStaffAvailabilityStatsByStaffId(getStaffAvailabilityStatsByStaffIdVars).then((response) => { + const data = response.data; + console.log(data.staffAvailabilityStats); +}); +``` + +### Using `getStaffAvailabilityStatsByStaffId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getStaffAvailabilityStatsByStaffIdRef, GetStaffAvailabilityStatsByStaffIdVariables } from '@dataconnect/generated'; + +// The `getStaffAvailabilityStatsByStaffId` query requires an argument of type `GetStaffAvailabilityStatsByStaffIdVariables`: +const getStaffAvailabilityStatsByStaffIdVars: GetStaffAvailabilityStatsByStaffIdVariables = { + staffId: ..., +}; + +// Call the `getStaffAvailabilityStatsByStaffIdRef()` function to get a reference to the query. +const ref = getStaffAvailabilityStatsByStaffIdRef(getStaffAvailabilityStatsByStaffIdVars); +// Variables can be defined inline as well. +const ref = getStaffAvailabilityStatsByStaffIdRef({ staffId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getStaffAvailabilityStatsByStaffIdRef(dataConnect, getStaffAvailabilityStatsByStaffIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffAvailabilityStats); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffAvailabilityStats); +}); +``` + +## filterStaffAvailabilityStats +You can execute the `filterStaffAvailabilityStats` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterStaffAvailabilityStats(vars?: FilterStaffAvailabilityStatsVariables): QueryPromise; + +interface FilterStaffAvailabilityStatsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterStaffAvailabilityStatsVariables): QueryRef; +} +export const filterStaffAvailabilityStatsRef: FilterStaffAvailabilityStatsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterStaffAvailabilityStats(dc: DataConnect, vars?: FilterStaffAvailabilityStatsVariables): QueryPromise; + +interface FilterStaffAvailabilityStatsRef { + ... + (dc: DataConnect, vars?: FilterStaffAvailabilityStatsVariables): QueryRef; +} +export const filterStaffAvailabilityStatsRef: FilterStaffAvailabilityStatsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterStaffAvailabilityStatsRef: +```typescript +const name = filterStaffAvailabilityStatsRef.operationName; +console.log(name); +``` + +### Variables +The `filterStaffAvailabilityStats` query has an optional argument of type `FilterStaffAvailabilityStatsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterStaffAvailabilityStatsVariables { + needWorkIndexMin?: number | null; + needWorkIndexMax?: number | null; + utilizationMin?: number | null; + utilizationMax?: number | null; + acceptanceRateMin?: number | null; + acceptanceRateMax?: number | null; + lastShiftAfter?: TimestampString | null; + lastShiftBefore?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `filterStaffAvailabilityStats` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterStaffAvailabilityStatsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterStaffAvailabilityStatsData { + staffAvailabilityStatss: ({ + id: UUIDString; + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailabilityStats_Key)[]; +} +``` +### Using `filterStaffAvailabilityStats`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterStaffAvailabilityStats, FilterStaffAvailabilityStatsVariables } from '@dataconnect/generated'; + +// The `filterStaffAvailabilityStats` query has an optional argument of type `FilterStaffAvailabilityStatsVariables`: +const filterStaffAvailabilityStatsVars: FilterStaffAvailabilityStatsVariables = { + needWorkIndexMin: ..., // optional + needWorkIndexMax: ..., // optional + utilizationMin: ..., // optional + utilizationMax: ..., // optional + acceptanceRateMin: ..., // optional + acceptanceRateMax: ..., // optional + lastShiftAfter: ..., // optional + lastShiftBefore: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterStaffAvailabilityStats()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterStaffAvailabilityStats(filterStaffAvailabilityStatsVars); +// Variables can be defined inline as well. +const { data } = await filterStaffAvailabilityStats({ needWorkIndexMin: ..., needWorkIndexMax: ..., utilizationMin: ..., utilizationMax: ..., acceptanceRateMin: ..., acceptanceRateMax: ..., lastShiftAfter: ..., lastShiftBefore: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterStaffAvailabilityStatsVariables` argument. +const { data } = await filterStaffAvailabilityStats(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterStaffAvailabilityStats(dataConnect, filterStaffAvailabilityStatsVars); + +console.log(data.staffAvailabilityStatss); + +// Or, you can use the `Promise` API. +filterStaffAvailabilityStats(filterStaffAvailabilityStatsVars).then((response) => { + const data = response.data; + console.log(data.staffAvailabilityStatss); +}); +``` + +### Using `filterStaffAvailabilityStats`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterStaffAvailabilityStatsRef, FilterStaffAvailabilityStatsVariables } from '@dataconnect/generated'; + +// The `filterStaffAvailabilityStats` query has an optional argument of type `FilterStaffAvailabilityStatsVariables`: +const filterStaffAvailabilityStatsVars: FilterStaffAvailabilityStatsVariables = { + needWorkIndexMin: ..., // optional + needWorkIndexMax: ..., // optional + utilizationMin: ..., // optional + utilizationMax: ..., // optional + acceptanceRateMin: ..., // optional + acceptanceRateMax: ..., // optional + lastShiftAfter: ..., // optional + lastShiftBefore: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterStaffAvailabilityStatsRef()` function to get a reference to the query. +const ref = filterStaffAvailabilityStatsRef(filterStaffAvailabilityStatsVars); +// Variables can be defined inline as well. +const ref = filterStaffAvailabilityStatsRef({ needWorkIndexMin: ..., needWorkIndexMax: ..., utilizationMin: ..., utilizationMax: ..., acceptanceRateMin: ..., acceptanceRateMax: ..., lastShiftAfter: ..., lastShiftBefore: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterStaffAvailabilityStatsVariables` argument. +const ref = filterStaffAvailabilityStatsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterStaffAvailabilityStatsRef(dataConnect, filterStaffAvailabilityStatsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.staffAvailabilityStatss); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.staffAvailabilityStatss); +}); +``` + +## listTeamHudDepartments +You can execute the `listTeamHudDepartments` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listTeamHudDepartments(vars?: ListTeamHudDepartmentsVariables): QueryPromise; + +interface ListTeamHudDepartmentsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListTeamHudDepartmentsVariables): QueryRef; +} +export const listTeamHudDepartmentsRef: ListTeamHudDepartmentsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listTeamHudDepartments(dc: DataConnect, vars?: ListTeamHudDepartmentsVariables): QueryPromise; + +interface ListTeamHudDepartmentsRef { + ... + (dc: DataConnect, vars?: ListTeamHudDepartmentsVariables): QueryRef; +} +export const listTeamHudDepartmentsRef: ListTeamHudDepartmentsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listTeamHudDepartmentsRef: +```typescript +const name = listTeamHudDepartmentsRef.operationName; +console.log(name); +``` + +### Variables +The `listTeamHudDepartments` query has an optional argument of type `ListTeamHudDepartmentsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListTeamHudDepartmentsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listTeamHudDepartments` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListTeamHudDepartmentsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListTeamHudDepartmentsData { + teamHudDepartments: ({ + id: UUIDString; + name: string; + costCenter?: string | null; + teamHubId: UUIDString; + teamHub: { + id: UUIDString; + hubName: string; + } & TeamHub_Key; + createdAt?: TimestampString | null; + } & TeamHudDepartment_Key)[]; +} +``` +### Using `listTeamHudDepartments`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listTeamHudDepartments, ListTeamHudDepartmentsVariables } from '@dataconnect/generated'; + +// The `listTeamHudDepartments` query has an optional argument of type `ListTeamHudDepartmentsVariables`: +const listTeamHudDepartmentsVars: ListTeamHudDepartmentsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listTeamHudDepartments()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listTeamHudDepartments(listTeamHudDepartmentsVars); +// Variables can be defined inline as well. +const { data } = await listTeamHudDepartments({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListTeamHudDepartmentsVariables` argument. +const { data } = await listTeamHudDepartments(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listTeamHudDepartments(dataConnect, listTeamHudDepartmentsVars); + +console.log(data.teamHudDepartments); + +// Or, you can use the `Promise` API. +listTeamHudDepartments(listTeamHudDepartmentsVars).then((response) => { + const data = response.data; + console.log(data.teamHudDepartments); +}); +``` + +### Using `listTeamHudDepartments`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listTeamHudDepartmentsRef, ListTeamHudDepartmentsVariables } from '@dataconnect/generated'; + +// The `listTeamHudDepartments` query has an optional argument of type `ListTeamHudDepartmentsVariables`: +const listTeamHudDepartmentsVars: ListTeamHudDepartmentsVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listTeamHudDepartmentsRef()` function to get a reference to the query. +const ref = listTeamHudDepartmentsRef(listTeamHudDepartmentsVars); +// Variables can be defined inline as well. +const ref = listTeamHudDepartmentsRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListTeamHudDepartmentsVariables` argument. +const ref = listTeamHudDepartmentsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listTeamHudDepartmentsRef(dataConnect, listTeamHudDepartmentsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.teamHudDepartments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.teamHudDepartments); +}); +``` + +## getTeamHudDepartmentById +You can execute the `getTeamHudDepartmentById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getTeamHudDepartmentById(vars: GetTeamHudDepartmentByIdVariables): QueryPromise; + +interface GetTeamHudDepartmentByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamHudDepartmentByIdVariables): QueryRef; +} +export const getTeamHudDepartmentByIdRef: GetTeamHudDepartmentByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getTeamHudDepartmentById(dc: DataConnect, vars: GetTeamHudDepartmentByIdVariables): QueryPromise; + +interface GetTeamHudDepartmentByIdRef { + ... + (dc: DataConnect, vars: GetTeamHudDepartmentByIdVariables): QueryRef; +} +export const getTeamHudDepartmentByIdRef: GetTeamHudDepartmentByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getTeamHudDepartmentByIdRef: +```typescript +const name = getTeamHudDepartmentByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getTeamHudDepartmentById` query requires an argument of type `GetTeamHudDepartmentByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetTeamHudDepartmentByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getTeamHudDepartmentById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetTeamHudDepartmentByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetTeamHudDepartmentByIdData { + teamHudDepartment?: { + id: UUIDString; + name: string; + costCenter?: string | null; + teamHubId: UUIDString; + teamHub: { + id: UUIDString; + hubName: string; + } & TeamHub_Key; + createdAt?: TimestampString | null; + } & TeamHudDepartment_Key; +} +``` +### Using `getTeamHudDepartmentById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getTeamHudDepartmentById, GetTeamHudDepartmentByIdVariables } from '@dataconnect/generated'; + +// The `getTeamHudDepartmentById` query requires an argument of type `GetTeamHudDepartmentByIdVariables`: +const getTeamHudDepartmentByIdVars: GetTeamHudDepartmentByIdVariables = { + id: ..., +}; + +// Call the `getTeamHudDepartmentById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getTeamHudDepartmentById(getTeamHudDepartmentByIdVars); +// Variables can be defined inline as well. +const { data } = await getTeamHudDepartmentById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getTeamHudDepartmentById(dataConnect, getTeamHudDepartmentByIdVars); + +console.log(data.teamHudDepartment); + +// Or, you can use the `Promise` API. +getTeamHudDepartmentById(getTeamHudDepartmentByIdVars).then((response) => { + const data = response.data; + console.log(data.teamHudDepartment); +}); +``` + +### Using `getTeamHudDepartmentById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getTeamHudDepartmentByIdRef, GetTeamHudDepartmentByIdVariables } from '@dataconnect/generated'; + +// The `getTeamHudDepartmentById` query requires an argument of type `GetTeamHudDepartmentByIdVariables`: +const getTeamHudDepartmentByIdVars: GetTeamHudDepartmentByIdVariables = { + id: ..., +}; + +// Call the `getTeamHudDepartmentByIdRef()` function to get a reference to the query. +const ref = getTeamHudDepartmentByIdRef(getTeamHudDepartmentByIdVars); +// Variables can be defined inline as well. +const ref = getTeamHudDepartmentByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getTeamHudDepartmentByIdRef(dataConnect, getTeamHudDepartmentByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.teamHudDepartment); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.teamHudDepartment); +}); +``` + +## listTeamHudDepartmentsByTeamHubId +You can execute the `listTeamHudDepartmentsByTeamHubId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listTeamHudDepartmentsByTeamHubId(vars: ListTeamHudDepartmentsByTeamHubIdVariables): QueryPromise; + +interface ListTeamHudDepartmentsByTeamHubIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListTeamHudDepartmentsByTeamHubIdVariables): QueryRef; +} +export const listTeamHudDepartmentsByTeamHubIdRef: ListTeamHudDepartmentsByTeamHubIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listTeamHudDepartmentsByTeamHubId(dc: DataConnect, vars: ListTeamHudDepartmentsByTeamHubIdVariables): QueryPromise; + +interface ListTeamHudDepartmentsByTeamHubIdRef { + ... + (dc: DataConnect, vars: ListTeamHudDepartmentsByTeamHubIdVariables): QueryRef; +} +export const listTeamHudDepartmentsByTeamHubIdRef: ListTeamHudDepartmentsByTeamHubIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listTeamHudDepartmentsByTeamHubIdRef: +```typescript +const name = listTeamHudDepartmentsByTeamHubIdRef.operationName; +console.log(name); +``` + +### Variables +The `listTeamHudDepartmentsByTeamHubId` query requires an argument of type `ListTeamHudDepartmentsByTeamHubIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListTeamHudDepartmentsByTeamHubIdVariables { + teamHubId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listTeamHudDepartmentsByTeamHubId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListTeamHudDepartmentsByTeamHubIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListTeamHudDepartmentsByTeamHubIdData { + teamHudDepartments: ({ + id: UUIDString; + name: string; + costCenter?: string | null; + teamHubId: UUIDString; + teamHub: { + id: UUIDString; + hubName: string; + } & TeamHub_Key; + createdAt?: TimestampString | null; + } & TeamHudDepartment_Key)[]; +} +``` +### Using `listTeamHudDepartmentsByTeamHubId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listTeamHudDepartmentsByTeamHubId, ListTeamHudDepartmentsByTeamHubIdVariables } from '@dataconnect/generated'; + +// The `listTeamHudDepartmentsByTeamHubId` query requires an argument of type `ListTeamHudDepartmentsByTeamHubIdVariables`: +const listTeamHudDepartmentsByTeamHubIdVars: ListTeamHudDepartmentsByTeamHubIdVariables = { + teamHubId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listTeamHudDepartmentsByTeamHubId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listTeamHudDepartmentsByTeamHubId(listTeamHudDepartmentsByTeamHubIdVars); +// Variables can be defined inline as well. +const { data } = await listTeamHudDepartmentsByTeamHubId({ teamHubId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listTeamHudDepartmentsByTeamHubId(dataConnect, listTeamHudDepartmentsByTeamHubIdVars); + +console.log(data.teamHudDepartments); + +// Or, you can use the `Promise` API. +listTeamHudDepartmentsByTeamHubId(listTeamHudDepartmentsByTeamHubIdVars).then((response) => { + const data = response.data; + console.log(data.teamHudDepartments); +}); +``` + +### Using `listTeamHudDepartmentsByTeamHubId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listTeamHudDepartmentsByTeamHubIdRef, ListTeamHudDepartmentsByTeamHubIdVariables } from '@dataconnect/generated'; + +// The `listTeamHudDepartmentsByTeamHubId` query requires an argument of type `ListTeamHudDepartmentsByTeamHubIdVariables`: +const listTeamHudDepartmentsByTeamHubIdVars: ListTeamHudDepartmentsByTeamHubIdVariables = { + teamHubId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listTeamHudDepartmentsByTeamHubIdRef()` function to get a reference to the query. +const ref = listTeamHudDepartmentsByTeamHubIdRef(listTeamHudDepartmentsByTeamHubIdVars); +// Variables can be defined inline as well. +const ref = listTeamHudDepartmentsByTeamHubIdRef({ teamHubId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listTeamHudDepartmentsByTeamHubIdRef(dataConnect, listTeamHudDepartmentsByTeamHubIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.teamHudDepartments); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.teamHudDepartments); +}); +``` + +## listLevels +You can execute the `listLevels` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listLevels(): QueryPromise; + +interface ListLevelsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listLevelsRef: ListLevelsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listLevels(dc: DataConnect): QueryPromise; + +interface ListLevelsRef { + ... + (dc: DataConnect): QueryRef; +} +export const listLevelsRef: ListLevelsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listLevelsRef: +```typescript +const name = listLevelsRef.operationName; +console.log(name); +``` + +### Variables +The `listLevels` query has no variables. +### Return Type +Recall that executing the `listLevels` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListLevelsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListLevelsData { + levels: ({ + id: UUIDString; + name: string; + xpRequired: number; + icon?: string | null; + colors?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Level_Key)[]; +} +``` +### Using `listLevels`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listLevels } from '@dataconnect/generated'; + + +// Call the `listLevels()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listLevels(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listLevels(dataConnect); + +console.log(data.levels); + +// Or, you can use the `Promise` API. +listLevels().then((response) => { + const data = response.data; + console.log(data.levels); +}); +``` + +### Using `listLevels`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listLevelsRef } from '@dataconnect/generated'; + + +// Call the `listLevelsRef()` function to get a reference to the query. +const ref = listLevelsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listLevelsRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.levels); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.levels); +}); +``` + +## getLevelById +You can execute the `getLevelById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getLevelById(vars: GetLevelByIdVariables): QueryPromise; + +interface GetLevelByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetLevelByIdVariables): QueryRef; +} +export const getLevelByIdRef: GetLevelByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getLevelById(dc: DataConnect, vars: GetLevelByIdVariables): QueryPromise; + +interface GetLevelByIdRef { + ... + (dc: DataConnect, vars: GetLevelByIdVariables): QueryRef; +} +export const getLevelByIdRef: GetLevelByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getLevelByIdRef: +```typescript +const name = getLevelByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getLevelById` query requires an argument of type `GetLevelByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetLevelByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getLevelById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetLevelByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetLevelByIdData { + level?: { + id: UUIDString; + name: string; + xpRequired: number; + icon?: string | null; + colors?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Level_Key; +} +``` +### Using `getLevelById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getLevelById, GetLevelByIdVariables } from '@dataconnect/generated'; + +// The `getLevelById` query requires an argument of type `GetLevelByIdVariables`: +const getLevelByIdVars: GetLevelByIdVariables = { + id: ..., +}; + +// Call the `getLevelById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getLevelById(getLevelByIdVars); +// Variables can be defined inline as well. +const { data } = await getLevelById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getLevelById(dataConnect, getLevelByIdVars); + +console.log(data.level); + +// Or, you can use the `Promise` API. +getLevelById(getLevelByIdVars).then((response) => { + const data = response.data; + console.log(data.level); +}); +``` + +### Using `getLevelById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getLevelByIdRef, GetLevelByIdVariables } from '@dataconnect/generated'; + +// The `getLevelById` query requires an argument of type `GetLevelByIdVariables`: +const getLevelByIdVars: GetLevelByIdVariables = { + id: ..., +}; + +// Call the `getLevelByIdRef()` function to get a reference to the query. +const ref = getLevelByIdRef(getLevelByIdVars); +// Variables can be defined inline as well. +const ref = getLevelByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getLevelByIdRef(dataConnect, getLevelByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.level); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.level); +}); +``` + +## filterLevels +You can execute the `filterLevels` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterLevels(vars?: FilterLevelsVariables): QueryPromise; + +interface FilterLevelsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterLevelsVariables): QueryRef; +} +export const filterLevelsRef: FilterLevelsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterLevels(dc: DataConnect, vars?: FilterLevelsVariables): QueryPromise; + +interface FilterLevelsRef { + ... + (dc: DataConnect, vars?: FilterLevelsVariables): QueryRef; +} +export const filterLevelsRef: FilterLevelsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterLevelsRef: +```typescript +const name = filterLevelsRef.operationName; +console.log(name); +``` + +### Variables +The `filterLevels` query has an optional argument of type `FilterLevelsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterLevelsVariables { + name?: string | null; + xpRequired?: number | null; +} +``` +### Return Type +Recall that executing the `filterLevels` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterLevelsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterLevelsData { + levels: ({ + id: UUIDString; + name: string; + xpRequired: number; + icon?: string | null; + colors?: unknown | null; + } & Level_Key)[]; +} +``` +### Using `filterLevels`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterLevels, FilterLevelsVariables } from '@dataconnect/generated'; + +// The `filterLevels` query has an optional argument of type `FilterLevelsVariables`: +const filterLevelsVars: FilterLevelsVariables = { + name: ..., // optional + xpRequired: ..., // optional +}; + +// Call the `filterLevels()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterLevels(filterLevelsVars); +// Variables can be defined inline as well. +const { data } = await filterLevels({ name: ..., xpRequired: ..., }); +// Since all variables are optional for this query, you can omit the `FilterLevelsVariables` argument. +const { data } = await filterLevels(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterLevels(dataConnect, filterLevelsVars); + +console.log(data.levels); + +// Or, you can use the `Promise` API. +filterLevels(filterLevelsVars).then((response) => { + const data = response.data; + console.log(data.levels); +}); +``` + +### Using `filterLevels`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterLevelsRef, FilterLevelsVariables } from '@dataconnect/generated'; + +// The `filterLevels` query has an optional argument of type `FilterLevelsVariables`: +const filterLevelsVars: FilterLevelsVariables = { + name: ..., // optional + xpRequired: ..., // optional +}; + +// Call the `filterLevelsRef()` function to get a reference to the query. +const ref = filterLevelsRef(filterLevelsVars); +// Variables can be defined inline as well. +const ref = filterLevelsRef({ name: ..., xpRequired: ..., }); +// Since all variables are optional for this query, you can omit the `FilterLevelsVariables` argument. +const ref = filterLevelsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterLevelsRef(dataConnect, filterLevelsVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.levels); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.levels); +}); +``` + +## listTeams +You can execute the `listTeams` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listTeams(): QueryPromise; + +interface ListTeamsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listTeamsRef: ListTeamsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listTeams(dc: DataConnect): QueryPromise; + +interface ListTeamsRef { + ... + (dc: DataConnect): QueryRef; +} +export const listTeamsRef: ListTeamsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listTeamsRef: +```typescript +const name = listTeamsRef.operationName; +console.log(name); +``` + +### Variables +The `listTeams` query has no variables. +### Return Type +Recall that executing the `listTeams` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListTeamsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListTeamsData { + teams: ({ + id: UUIDString; + teamName: string; + ownerId: UUIDString; + ownerName: string; + ownerRole: string; + email?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Team_Key)[]; +} +``` +### Using `listTeams`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listTeams } from '@dataconnect/generated'; + + +// Call the `listTeams()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listTeams(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listTeams(dataConnect); + +console.log(data.teams); + +// Or, you can use the `Promise` API. +listTeams().then((response) => { + const data = response.data; + console.log(data.teams); +}); +``` + +### Using `listTeams`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listTeamsRef } from '@dataconnect/generated'; + + +// Call the `listTeamsRef()` function to get a reference to the query. +const ref = listTeamsRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listTeamsRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.teams); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.teams); +}); +``` + +## getTeamById +You can execute the `getTeamById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getTeamById(vars: GetTeamByIdVariables): QueryPromise; + +interface GetTeamByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamByIdVariables): QueryRef; +} +export const getTeamByIdRef: GetTeamByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getTeamById(dc: DataConnect, vars: GetTeamByIdVariables): QueryPromise; + +interface GetTeamByIdRef { + ... + (dc: DataConnect, vars: GetTeamByIdVariables): QueryRef; +} +export const getTeamByIdRef: GetTeamByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getTeamByIdRef: +```typescript +const name = getTeamByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getTeamById` query requires an argument of type `GetTeamByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetTeamByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getTeamById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetTeamByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetTeamByIdData { + team?: { + id: UUIDString; + teamName: string; + ownerId: UUIDString; + ownerName: string; + ownerRole: string; + email?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Team_Key; +} +``` +### Using `getTeamById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getTeamById, GetTeamByIdVariables } from '@dataconnect/generated'; + +// The `getTeamById` query requires an argument of type `GetTeamByIdVariables`: +const getTeamByIdVars: GetTeamByIdVariables = { + id: ..., +}; + +// Call the `getTeamById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getTeamById(getTeamByIdVars); +// Variables can be defined inline as well. +const { data } = await getTeamById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getTeamById(dataConnect, getTeamByIdVars); + +console.log(data.team); + +// Or, you can use the `Promise` API. +getTeamById(getTeamByIdVars).then((response) => { + const data = response.data; + console.log(data.team); +}); +``` + +### Using `getTeamById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getTeamByIdRef, GetTeamByIdVariables } from '@dataconnect/generated'; + +// The `getTeamById` query requires an argument of type `GetTeamByIdVariables`: +const getTeamByIdVars: GetTeamByIdVariables = { + id: ..., +}; + +// Call the `getTeamByIdRef()` function to get a reference to the query. +const ref = getTeamByIdRef(getTeamByIdVars); +// Variables can be defined inline as well. +const ref = getTeamByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getTeamByIdRef(dataConnect, getTeamByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.team); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.team); +}); +``` + +## getTeamsByOwnerId +You can execute the `getTeamsByOwnerId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getTeamsByOwnerId(vars: GetTeamsByOwnerIdVariables): QueryPromise; + +interface GetTeamsByOwnerIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamsByOwnerIdVariables): QueryRef; +} +export const getTeamsByOwnerIdRef: GetTeamsByOwnerIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getTeamsByOwnerId(dc: DataConnect, vars: GetTeamsByOwnerIdVariables): QueryPromise; + +interface GetTeamsByOwnerIdRef { + ... + (dc: DataConnect, vars: GetTeamsByOwnerIdVariables): QueryRef; +} +export const getTeamsByOwnerIdRef: GetTeamsByOwnerIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getTeamsByOwnerIdRef: +```typescript +const name = getTeamsByOwnerIdRef.operationName; +console.log(name); +``` + +### Variables +The `getTeamsByOwnerId` query requires an argument of type `GetTeamsByOwnerIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetTeamsByOwnerIdVariables { + ownerId: UUIDString; +} +``` +### Return Type +Recall that executing the `getTeamsByOwnerId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetTeamsByOwnerIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetTeamsByOwnerIdData { + teams: ({ + id: UUIDString; + teamName: string; + ownerId: UUIDString; + ownerName: string; + ownerRole: string; + email?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Team_Key)[]; +} +``` +### Using `getTeamsByOwnerId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getTeamsByOwnerId, GetTeamsByOwnerIdVariables } from '@dataconnect/generated'; + +// The `getTeamsByOwnerId` query requires an argument of type `GetTeamsByOwnerIdVariables`: +const getTeamsByOwnerIdVars: GetTeamsByOwnerIdVariables = { + ownerId: ..., +}; + +// Call the `getTeamsByOwnerId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getTeamsByOwnerId(getTeamsByOwnerIdVars); +// Variables can be defined inline as well. +const { data } = await getTeamsByOwnerId({ ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getTeamsByOwnerId(dataConnect, getTeamsByOwnerIdVars); + +console.log(data.teams); + +// Or, you can use the `Promise` API. +getTeamsByOwnerId(getTeamsByOwnerIdVars).then((response) => { + const data = response.data; + console.log(data.teams); +}); +``` + +### Using `getTeamsByOwnerId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getTeamsByOwnerIdRef, GetTeamsByOwnerIdVariables } from '@dataconnect/generated'; + +// The `getTeamsByOwnerId` query requires an argument of type `GetTeamsByOwnerIdVariables`: +const getTeamsByOwnerIdVars: GetTeamsByOwnerIdVariables = { + ownerId: ..., +}; + +// Call the `getTeamsByOwnerIdRef()` function to get a reference to the query. +const ref = getTeamsByOwnerIdRef(getTeamsByOwnerIdVars); +// Variables can be defined inline as well. +const ref = getTeamsByOwnerIdRef({ ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getTeamsByOwnerIdRef(dataConnect, getTeamsByOwnerIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.teams); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.teams); +}); +``` + +## listTeamMembers +You can execute the `listTeamMembers` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listTeamMembers(): QueryPromise; + +interface ListTeamMembersRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; +} +export const listTeamMembersRef: ListTeamMembersRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listTeamMembers(dc: DataConnect): QueryPromise; + +interface ListTeamMembersRef { + ... + (dc: DataConnect): QueryRef; +} +export const listTeamMembersRef: ListTeamMembersRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listTeamMembersRef: +```typescript +const name = listTeamMembersRef.operationName; +console.log(name); +``` + +### Variables +The `listTeamMembers` query has no variables. +### Return Type +Recall that executing the `listTeamMembers` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListTeamMembersData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListTeamMembersData { + teamMembers: ({ + id: UUIDString; + teamId: UUIDString; + role: TeamMemberRole; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + email?: string | null; + }; + teamHub?: { + hubName: string; + }; + } & TeamMember_Key)[]; +} +``` +### Using `listTeamMembers`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listTeamMembers } from '@dataconnect/generated'; + + +// Call the `listTeamMembers()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listTeamMembers(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listTeamMembers(dataConnect); + +console.log(data.teamMembers); + +// Or, you can use the `Promise` API. +listTeamMembers().then((response) => { + const data = response.data; + console.log(data.teamMembers); +}); +``` + +### Using `listTeamMembers`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listTeamMembersRef } from '@dataconnect/generated'; + + +// Call the `listTeamMembersRef()` function to get a reference to the query. +const ref = listTeamMembersRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listTeamMembersRef(dataConnect); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.teamMembers); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.teamMembers); +}); +``` + +## getTeamMemberById +You can execute the `getTeamMemberById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getTeamMemberById(vars: GetTeamMemberByIdVariables): QueryPromise; + +interface GetTeamMemberByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamMemberByIdVariables): QueryRef; +} +export const getTeamMemberByIdRef: GetTeamMemberByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getTeamMemberById(dc: DataConnect, vars: GetTeamMemberByIdVariables): QueryPromise; + +interface GetTeamMemberByIdRef { + ... + (dc: DataConnect, vars: GetTeamMemberByIdVariables): QueryRef; +} +export const getTeamMemberByIdRef: GetTeamMemberByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getTeamMemberByIdRef: +```typescript +const name = getTeamMemberByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getTeamMemberById` query requires an argument of type `GetTeamMemberByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetTeamMemberByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getTeamMemberById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetTeamMemberByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetTeamMemberByIdData { + teamMember?: { + id: UUIDString; + teamId: UUIDString; + role: TeamMemberRole; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + email?: string | null; + }; + teamHub?: { + hubName: string; + }; + } & TeamMember_Key; +} +``` +### Using `getTeamMemberById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getTeamMemberById, GetTeamMemberByIdVariables } from '@dataconnect/generated'; + +// The `getTeamMemberById` query requires an argument of type `GetTeamMemberByIdVariables`: +const getTeamMemberByIdVars: GetTeamMemberByIdVariables = { + id: ..., +}; + +// Call the `getTeamMemberById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getTeamMemberById(getTeamMemberByIdVars); +// Variables can be defined inline as well. +const { data } = await getTeamMemberById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getTeamMemberById(dataConnect, getTeamMemberByIdVars); + +console.log(data.teamMember); + +// Or, you can use the `Promise` API. +getTeamMemberById(getTeamMemberByIdVars).then((response) => { + const data = response.data; + console.log(data.teamMember); +}); +``` + +### Using `getTeamMemberById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getTeamMemberByIdRef, GetTeamMemberByIdVariables } from '@dataconnect/generated'; + +// The `getTeamMemberById` query requires an argument of type `GetTeamMemberByIdVariables`: +const getTeamMemberByIdVars: GetTeamMemberByIdVariables = { + id: ..., +}; + +// Call the `getTeamMemberByIdRef()` function to get a reference to the query. +const ref = getTeamMemberByIdRef(getTeamMemberByIdVars); +// Variables can be defined inline as well. +const ref = getTeamMemberByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getTeamMemberByIdRef(dataConnect, getTeamMemberByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.teamMember); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.teamMember); +}); +``` + +## getTeamMembersByTeamId +You can execute the `getTeamMembersByTeamId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getTeamMembersByTeamId(vars: GetTeamMembersByTeamIdVariables): QueryPromise; + +interface GetTeamMembersByTeamIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamMembersByTeamIdVariables): QueryRef; +} +export const getTeamMembersByTeamIdRef: GetTeamMembersByTeamIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getTeamMembersByTeamId(dc: DataConnect, vars: GetTeamMembersByTeamIdVariables): QueryPromise; + +interface GetTeamMembersByTeamIdRef { + ... + (dc: DataConnect, vars: GetTeamMembersByTeamIdVariables): QueryRef; +} +export const getTeamMembersByTeamIdRef: GetTeamMembersByTeamIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getTeamMembersByTeamIdRef: +```typescript +const name = getTeamMembersByTeamIdRef.operationName; +console.log(name); +``` + +### Variables +The `getTeamMembersByTeamId` query requires an argument of type `GetTeamMembersByTeamIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetTeamMembersByTeamIdVariables { + teamId: UUIDString; +} +``` +### Return Type +Recall that executing the `getTeamMembersByTeamId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetTeamMembersByTeamIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetTeamMembersByTeamIdData { + teamMembers: ({ + id: UUIDString; + teamId: UUIDString; + role: TeamMemberRole; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + email?: string | null; + }; + teamHub?: { + hubName: string; + }; + } & TeamMember_Key)[]; +} +``` +### Using `getTeamMembersByTeamId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getTeamMembersByTeamId, GetTeamMembersByTeamIdVariables } from '@dataconnect/generated'; + +// The `getTeamMembersByTeamId` query requires an argument of type `GetTeamMembersByTeamIdVariables`: +const getTeamMembersByTeamIdVars: GetTeamMembersByTeamIdVariables = { + teamId: ..., +}; + +// Call the `getTeamMembersByTeamId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getTeamMembersByTeamId(getTeamMembersByTeamIdVars); +// Variables can be defined inline as well. +const { data } = await getTeamMembersByTeamId({ teamId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getTeamMembersByTeamId(dataConnect, getTeamMembersByTeamIdVars); + +console.log(data.teamMembers); + +// Or, you can use the `Promise` API. +getTeamMembersByTeamId(getTeamMembersByTeamIdVars).then((response) => { + const data = response.data; + console.log(data.teamMembers); +}); +``` + +### Using `getTeamMembersByTeamId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getTeamMembersByTeamIdRef, GetTeamMembersByTeamIdVariables } from '@dataconnect/generated'; + +// The `getTeamMembersByTeamId` query requires an argument of type `GetTeamMembersByTeamIdVariables`: +const getTeamMembersByTeamIdVars: GetTeamMembersByTeamIdVariables = { + teamId: ..., +}; + +// Call the `getTeamMembersByTeamIdRef()` function to get a reference to the query. +const ref = getTeamMembersByTeamIdRef(getTeamMembersByTeamIdVars); +// Variables can be defined inline as well. +const ref = getTeamMembersByTeamIdRef({ teamId: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getTeamMembersByTeamIdRef(dataConnect, getTeamMembersByTeamIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.teamMembers); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.teamMembers); +}); +``` + +## listVendorBenefitPlans +You can execute the `listVendorBenefitPlans` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listVendorBenefitPlans(vars?: ListVendorBenefitPlansVariables): QueryPromise; + +interface ListVendorBenefitPlansRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListVendorBenefitPlansVariables): QueryRef; +} +export const listVendorBenefitPlansRef: ListVendorBenefitPlansRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listVendorBenefitPlans(dc: DataConnect, vars?: ListVendorBenefitPlansVariables): QueryPromise; + +interface ListVendorBenefitPlansRef { + ... + (dc: DataConnect, vars?: ListVendorBenefitPlansVariables): QueryRef; +} +export const listVendorBenefitPlansRef: ListVendorBenefitPlansRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listVendorBenefitPlansRef: +```typescript +const name = listVendorBenefitPlansRef.operationName; +console.log(name); +``` + +### Variables +The `listVendorBenefitPlans` query has an optional argument of type `ListVendorBenefitPlansVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListVendorBenefitPlansVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listVendorBenefitPlans` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListVendorBenefitPlansData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListVendorBenefitPlansData { + vendorBenefitPlans: ({ + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key)[]; +} +``` +### Using `listVendorBenefitPlans`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listVendorBenefitPlans, ListVendorBenefitPlansVariables } from '@dataconnect/generated'; + +// The `listVendorBenefitPlans` query has an optional argument of type `ListVendorBenefitPlansVariables`: +const listVendorBenefitPlansVars: ListVendorBenefitPlansVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listVendorBenefitPlans()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listVendorBenefitPlans(listVendorBenefitPlansVars); +// Variables can be defined inline as well. +const { data } = await listVendorBenefitPlans({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListVendorBenefitPlansVariables` argument. +const { data } = await listVendorBenefitPlans(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listVendorBenefitPlans(dataConnect, listVendorBenefitPlansVars); + +console.log(data.vendorBenefitPlans); + +// Or, you can use the `Promise` API. +listVendorBenefitPlans(listVendorBenefitPlansVars).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlans); +}); +``` + +### Using `listVendorBenefitPlans`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listVendorBenefitPlansRef, ListVendorBenefitPlansVariables } from '@dataconnect/generated'; + +// The `listVendorBenefitPlans` query has an optional argument of type `ListVendorBenefitPlansVariables`: +const listVendorBenefitPlansVars: ListVendorBenefitPlansVariables = { + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listVendorBenefitPlansRef()` function to get a reference to the query. +const ref = listVendorBenefitPlansRef(listVendorBenefitPlansVars); +// Variables can be defined inline as well. +const ref = listVendorBenefitPlansRef({ offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `ListVendorBenefitPlansVariables` argument. +const ref = listVendorBenefitPlansRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listVendorBenefitPlansRef(dataConnect, listVendorBenefitPlansVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.vendorBenefitPlans); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlans); +}); +``` + +## getVendorBenefitPlanById +You can execute the `getVendorBenefitPlanById` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +getVendorBenefitPlanById(vars: GetVendorBenefitPlanByIdVariables): QueryPromise; + +interface GetVendorBenefitPlanByIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: GetVendorBenefitPlanByIdVariables): QueryRef; +} +export const getVendorBenefitPlanByIdRef: GetVendorBenefitPlanByIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +getVendorBenefitPlanById(dc: DataConnect, vars: GetVendorBenefitPlanByIdVariables): QueryPromise; + +interface GetVendorBenefitPlanByIdRef { + ... + (dc: DataConnect, vars: GetVendorBenefitPlanByIdVariables): QueryRef; +} +export const getVendorBenefitPlanByIdRef: GetVendorBenefitPlanByIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the getVendorBenefitPlanByIdRef: +```typescript +const name = getVendorBenefitPlanByIdRef.operationName; +console.log(name); +``` + +### Variables +The `getVendorBenefitPlanById` query requires an argument of type `GetVendorBenefitPlanByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface GetVendorBenefitPlanByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `getVendorBenefitPlanById` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `GetVendorBenefitPlanByIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface GetVendorBenefitPlanByIdData { + vendorBenefitPlan?: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key; +} +``` +### Using `getVendorBenefitPlanById`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, getVendorBenefitPlanById, GetVendorBenefitPlanByIdVariables } from '@dataconnect/generated'; + +// The `getVendorBenefitPlanById` query requires an argument of type `GetVendorBenefitPlanByIdVariables`: +const getVendorBenefitPlanByIdVars: GetVendorBenefitPlanByIdVariables = { + id: ..., +}; + +// Call the `getVendorBenefitPlanById()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await getVendorBenefitPlanById(getVendorBenefitPlanByIdVars); +// Variables can be defined inline as well. +const { data } = await getVendorBenefitPlanById({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await getVendorBenefitPlanById(dataConnect, getVendorBenefitPlanByIdVars); + +console.log(data.vendorBenefitPlan); + +// Or, you can use the `Promise` API. +getVendorBenefitPlanById(getVendorBenefitPlanByIdVars).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlan); +}); +``` + +### Using `getVendorBenefitPlanById`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, getVendorBenefitPlanByIdRef, GetVendorBenefitPlanByIdVariables } from '@dataconnect/generated'; + +// The `getVendorBenefitPlanById` query requires an argument of type `GetVendorBenefitPlanByIdVariables`: +const getVendorBenefitPlanByIdVars: GetVendorBenefitPlanByIdVariables = { + id: ..., +}; + +// Call the `getVendorBenefitPlanByIdRef()` function to get a reference to the query. +const ref = getVendorBenefitPlanByIdRef(getVendorBenefitPlanByIdVars); +// Variables can be defined inline as well. +const ref = getVendorBenefitPlanByIdRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = getVendorBenefitPlanByIdRef(dataConnect, getVendorBenefitPlanByIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.vendorBenefitPlan); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlan); +}); +``` + +## listVendorBenefitPlansByVendorId +You can execute the `listVendorBenefitPlansByVendorId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listVendorBenefitPlansByVendorId(vars: ListVendorBenefitPlansByVendorIdVariables): QueryPromise; + +interface ListVendorBenefitPlansByVendorIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListVendorBenefitPlansByVendorIdVariables): QueryRef; +} +export const listVendorBenefitPlansByVendorIdRef: ListVendorBenefitPlansByVendorIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listVendorBenefitPlansByVendorId(dc: DataConnect, vars: ListVendorBenefitPlansByVendorIdVariables): QueryPromise; + +interface ListVendorBenefitPlansByVendorIdRef { + ... + (dc: DataConnect, vars: ListVendorBenefitPlansByVendorIdVariables): QueryRef; +} +export const listVendorBenefitPlansByVendorIdRef: ListVendorBenefitPlansByVendorIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listVendorBenefitPlansByVendorIdRef: +```typescript +const name = listVendorBenefitPlansByVendorIdRef.operationName; +console.log(name); +``` + +### Variables +The `listVendorBenefitPlansByVendorId` query requires an argument of type `ListVendorBenefitPlansByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListVendorBenefitPlansByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listVendorBenefitPlansByVendorId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListVendorBenefitPlansByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListVendorBenefitPlansByVendorIdData { + vendorBenefitPlans: ({ + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key)[]; +} +``` +### Using `listVendorBenefitPlansByVendorId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listVendorBenefitPlansByVendorId, ListVendorBenefitPlansByVendorIdVariables } from '@dataconnect/generated'; + +// The `listVendorBenefitPlansByVendorId` query requires an argument of type `ListVendorBenefitPlansByVendorIdVariables`: +const listVendorBenefitPlansByVendorIdVars: ListVendorBenefitPlansByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listVendorBenefitPlansByVendorId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listVendorBenefitPlansByVendorId(listVendorBenefitPlansByVendorIdVars); +// Variables can be defined inline as well. +const { data } = await listVendorBenefitPlansByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listVendorBenefitPlansByVendorId(dataConnect, listVendorBenefitPlansByVendorIdVars); + +console.log(data.vendorBenefitPlans); + +// Or, you can use the `Promise` API. +listVendorBenefitPlansByVendorId(listVendorBenefitPlansByVendorIdVars).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlans); +}); +``` + +### Using `listVendorBenefitPlansByVendorId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listVendorBenefitPlansByVendorIdRef, ListVendorBenefitPlansByVendorIdVariables } from '@dataconnect/generated'; + +// The `listVendorBenefitPlansByVendorId` query requires an argument of type `ListVendorBenefitPlansByVendorIdVariables`: +const listVendorBenefitPlansByVendorIdVars: ListVendorBenefitPlansByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listVendorBenefitPlansByVendorIdRef()` function to get a reference to the query. +const ref = listVendorBenefitPlansByVendorIdRef(listVendorBenefitPlansByVendorIdVars); +// Variables can be defined inline as well. +const ref = listVendorBenefitPlansByVendorIdRef({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listVendorBenefitPlansByVendorIdRef(dataConnect, listVendorBenefitPlansByVendorIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.vendorBenefitPlans); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlans); +}); +``` + +## listActiveVendorBenefitPlansByVendorId +You can execute the `listActiveVendorBenefitPlansByVendorId` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +listActiveVendorBenefitPlansByVendorId(vars: ListActiveVendorBenefitPlansByVendorIdVariables): QueryPromise; + +interface ListActiveVendorBenefitPlansByVendorIdRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: ListActiveVendorBenefitPlansByVendorIdVariables): QueryRef; +} +export const listActiveVendorBenefitPlansByVendorIdRef: ListActiveVendorBenefitPlansByVendorIdRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +listActiveVendorBenefitPlansByVendorId(dc: DataConnect, vars: ListActiveVendorBenefitPlansByVendorIdVariables): QueryPromise; + +interface ListActiveVendorBenefitPlansByVendorIdRef { + ... + (dc: DataConnect, vars: ListActiveVendorBenefitPlansByVendorIdVariables): QueryRef; +} +export const listActiveVendorBenefitPlansByVendorIdRef: ListActiveVendorBenefitPlansByVendorIdRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the listActiveVendorBenefitPlansByVendorIdRef: +```typescript +const name = listActiveVendorBenefitPlansByVendorIdRef.operationName; +console.log(name); +``` + +### Variables +The `listActiveVendorBenefitPlansByVendorId` query requires an argument of type `ListActiveVendorBenefitPlansByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface ListActiveVendorBenefitPlansByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `listActiveVendorBenefitPlansByVendorId` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `ListActiveVendorBenefitPlansByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface ListActiveVendorBenefitPlansByVendorIdData { + vendorBenefitPlans: ({ + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key)[]; +} +``` +### Using `listActiveVendorBenefitPlansByVendorId`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, listActiveVendorBenefitPlansByVendorId, ListActiveVendorBenefitPlansByVendorIdVariables } from '@dataconnect/generated'; + +// The `listActiveVendorBenefitPlansByVendorId` query requires an argument of type `ListActiveVendorBenefitPlansByVendorIdVariables`: +const listActiveVendorBenefitPlansByVendorIdVars: ListActiveVendorBenefitPlansByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listActiveVendorBenefitPlansByVendorId()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await listActiveVendorBenefitPlansByVendorId(listActiveVendorBenefitPlansByVendorIdVars); +// Variables can be defined inline as well. +const { data } = await listActiveVendorBenefitPlansByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await listActiveVendorBenefitPlansByVendorId(dataConnect, listActiveVendorBenefitPlansByVendorIdVars); + +console.log(data.vendorBenefitPlans); + +// Or, you can use the `Promise` API. +listActiveVendorBenefitPlansByVendorId(listActiveVendorBenefitPlansByVendorIdVars).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlans); +}); +``` + +### Using `listActiveVendorBenefitPlansByVendorId`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, listActiveVendorBenefitPlansByVendorIdRef, ListActiveVendorBenefitPlansByVendorIdVariables } from '@dataconnect/generated'; + +// The `listActiveVendorBenefitPlansByVendorId` query requires an argument of type `ListActiveVendorBenefitPlansByVendorIdVariables`: +const listActiveVendorBenefitPlansByVendorIdVars: ListActiveVendorBenefitPlansByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `listActiveVendorBenefitPlansByVendorIdRef()` function to get a reference to the query. +const ref = listActiveVendorBenefitPlansByVendorIdRef(listActiveVendorBenefitPlansByVendorIdVars); +// Variables can be defined inline as well. +const ref = listActiveVendorBenefitPlansByVendorIdRef({ vendorId: ..., offset: ..., limit: ..., }); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = listActiveVendorBenefitPlansByVendorIdRef(dataConnect, listActiveVendorBenefitPlansByVendorIdVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.vendorBenefitPlans); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlans); +}); +``` + +## filterVendorBenefitPlans +You can execute the `filterVendorBenefitPlans` query using the following action shortcut function, or by calling `executeQuery()` after calling the following `QueryRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +filterVendorBenefitPlans(vars?: FilterVendorBenefitPlansVariables): QueryPromise; + +interface FilterVendorBenefitPlansRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterVendorBenefitPlansVariables): QueryRef; +} +export const filterVendorBenefitPlansRef: FilterVendorBenefitPlansRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `QueryRef` function. +```typescript +filterVendorBenefitPlans(dc: DataConnect, vars?: FilterVendorBenefitPlansVariables): QueryPromise; + +interface FilterVendorBenefitPlansRef { + ... + (dc: DataConnect, vars?: FilterVendorBenefitPlansVariables): QueryRef; +} +export const filterVendorBenefitPlansRef: FilterVendorBenefitPlansRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the filterVendorBenefitPlansRef: +```typescript +const name = filterVendorBenefitPlansRef.operationName; +console.log(name); +``` + +### Variables +The `filterVendorBenefitPlans` query has an optional argument of type `FilterVendorBenefitPlansVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface FilterVendorBenefitPlansVariables { + vendorId?: UUIDString | null; + title?: string | null; + isActive?: boolean | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that executing the `filterVendorBenefitPlans` query returns a `QueryPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `FilterVendorBenefitPlansData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface FilterVendorBenefitPlansData { + vendorBenefitPlans: ({ + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key)[]; +} +``` +### Using `filterVendorBenefitPlans`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, filterVendorBenefitPlans, FilterVendorBenefitPlansVariables } from '@dataconnect/generated'; + +// The `filterVendorBenefitPlans` query has an optional argument of type `FilterVendorBenefitPlansVariables`: +const filterVendorBenefitPlansVars: FilterVendorBenefitPlansVariables = { + vendorId: ..., // optional + title: ..., // optional + isActive: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterVendorBenefitPlans()` function to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await filterVendorBenefitPlans(filterVendorBenefitPlansVars); +// Variables can be defined inline as well. +const { data } = await filterVendorBenefitPlans({ vendorId: ..., title: ..., isActive: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterVendorBenefitPlansVariables` argument. +const { data } = await filterVendorBenefitPlans(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await filterVendorBenefitPlans(dataConnect, filterVendorBenefitPlansVars); + +console.log(data.vendorBenefitPlans); + +// Or, you can use the `Promise` API. +filterVendorBenefitPlans(filterVendorBenefitPlansVars).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlans); +}); +``` + +### Using `filterVendorBenefitPlans`'s `QueryRef` function + +```typescript +import { getDataConnect, executeQuery } from 'firebase/data-connect'; +import { connectorConfig, filterVendorBenefitPlansRef, FilterVendorBenefitPlansVariables } from '@dataconnect/generated'; + +// The `filterVendorBenefitPlans` query has an optional argument of type `FilterVendorBenefitPlansVariables`: +const filterVendorBenefitPlansVars: FilterVendorBenefitPlansVariables = { + vendorId: ..., // optional + title: ..., // optional + isActive: ..., // optional + offset: ..., // optional + limit: ..., // optional +}; + +// Call the `filterVendorBenefitPlansRef()` function to get a reference to the query. +const ref = filterVendorBenefitPlansRef(filterVendorBenefitPlansVars); +// Variables can be defined inline as well. +const ref = filterVendorBenefitPlansRef({ vendorId: ..., title: ..., isActive: ..., offset: ..., limit: ..., }); +// Since all variables are optional for this query, you can omit the `FilterVendorBenefitPlansVariables` argument. +const ref = filterVendorBenefitPlansRef(); + +// You can also pass in a `DataConnect` instance to the `QueryRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = filterVendorBenefitPlansRef(dataConnect, filterVendorBenefitPlansVars); + +// Call `executeQuery()` on the reference to execute the query. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeQuery(ref); + +console.log(data.vendorBenefitPlans); + +// Or, you can use the `Promise` API. +executeQuery(ref).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlans); +}); +``` + +# Mutations + +There are two ways to execute a Data Connect Mutation using the generated Web SDK: +- Using a Mutation Reference function, which returns a `MutationRef` + - The `MutationRef` can be used as an argument to `executeMutation()`, which will execute the Mutation and return a `MutationPromise` +- Using an action shortcut function, which returns a `MutationPromise` + - Calling the action shortcut function will execute the Mutation and return a `MutationPromise` + +The following is true for both the action shortcut function and the `MutationRef` function: +- The `MutationPromise` returned will resolve to the result of the Mutation once it has finished executing +- If the Mutation accepts arguments, both the action shortcut function and the `MutationRef` function accept a single argument: an object that contains all the required variables (and the optional variables) for the Mutation +- Both functions can be called with or without passing in a `DataConnect` instance as an argument. If no `DataConnect` argument is passed in, then the generated SDK will call `getDataConnect(connectorConfig)` behind the scenes for you. + +Below are examples of how to use the `example` connector's generated functions to execute each mutation. You can also follow the examples from the [Data Connect documentation](https://firebase.google.com/docs/data-connect/web-sdk#using-mutations). + +## createBenefitsData +You can execute the `createBenefitsData` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createBenefitsData(vars: CreateBenefitsDataVariables): MutationPromise; + +interface CreateBenefitsDataRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateBenefitsDataVariables): MutationRef; +} +export const createBenefitsDataRef: CreateBenefitsDataRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createBenefitsData(dc: DataConnect, vars: CreateBenefitsDataVariables): MutationPromise; + +interface CreateBenefitsDataRef { + ... + (dc: DataConnect, vars: CreateBenefitsDataVariables): MutationRef; +} +export const createBenefitsDataRef: CreateBenefitsDataRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createBenefitsDataRef: +```typescript +const name = createBenefitsDataRef.operationName; +console.log(name); +``` + +### Variables +The `createBenefitsData` mutation requires an argument of type `CreateBenefitsDataVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateBenefitsDataVariables { + vendorBenefitPlanId: UUIDString; + staffId: UUIDString; + current: number; +} +``` +### Return Type +Recall that executing the `createBenefitsData` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateBenefitsDataData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateBenefitsDataData { + benefitsData_insert: BenefitsData_Key; +} +``` +### Using `createBenefitsData`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createBenefitsData, CreateBenefitsDataVariables } from '@dataconnect/generated'; + +// The `createBenefitsData` mutation requires an argument of type `CreateBenefitsDataVariables`: +const createBenefitsDataVars: CreateBenefitsDataVariables = { + vendorBenefitPlanId: ..., + staffId: ..., + current: ..., +}; + +// Call the `createBenefitsData()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createBenefitsData(createBenefitsDataVars); +// Variables can be defined inline as well. +const { data } = await createBenefitsData({ vendorBenefitPlanId: ..., staffId: ..., current: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createBenefitsData(dataConnect, createBenefitsDataVars); + +console.log(data.benefitsData_insert); + +// Or, you can use the `Promise` API. +createBenefitsData(createBenefitsDataVars).then((response) => { + const data = response.data; + console.log(data.benefitsData_insert); +}); +``` + +### Using `createBenefitsData`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createBenefitsDataRef, CreateBenefitsDataVariables } from '@dataconnect/generated'; + +// The `createBenefitsData` mutation requires an argument of type `CreateBenefitsDataVariables`: +const createBenefitsDataVars: CreateBenefitsDataVariables = { + vendorBenefitPlanId: ..., + staffId: ..., + current: ..., +}; + +// Call the `createBenefitsDataRef()` function to get a reference to the mutation. +const ref = createBenefitsDataRef(createBenefitsDataVars); +// Variables can be defined inline as well. +const ref = createBenefitsDataRef({ vendorBenefitPlanId: ..., staffId: ..., current: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createBenefitsDataRef(dataConnect, createBenefitsDataVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.benefitsData_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.benefitsData_insert); +}); +``` + +## updateBenefitsData +You can execute the `updateBenefitsData` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateBenefitsData(vars: UpdateBenefitsDataVariables): MutationPromise; + +interface UpdateBenefitsDataRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateBenefitsDataVariables): MutationRef; +} +export const updateBenefitsDataRef: UpdateBenefitsDataRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateBenefitsData(dc: DataConnect, vars: UpdateBenefitsDataVariables): MutationPromise; + +interface UpdateBenefitsDataRef { + ... + (dc: DataConnect, vars: UpdateBenefitsDataVariables): MutationRef; +} +export const updateBenefitsDataRef: UpdateBenefitsDataRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateBenefitsDataRef: +```typescript +const name = updateBenefitsDataRef.operationName; +console.log(name); +``` + +### Variables +The `updateBenefitsData` mutation requires an argument of type `UpdateBenefitsDataVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateBenefitsDataVariables { + staffId: UUIDString; + vendorBenefitPlanId: UUIDString; + current?: number | null; +} +``` +### Return Type +Recall that executing the `updateBenefitsData` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateBenefitsDataData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateBenefitsDataData { + benefitsData_update?: BenefitsData_Key | null; +} +``` +### Using `updateBenefitsData`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateBenefitsData, UpdateBenefitsDataVariables } from '@dataconnect/generated'; + +// The `updateBenefitsData` mutation requires an argument of type `UpdateBenefitsDataVariables`: +const updateBenefitsDataVars: UpdateBenefitsDataVariables = { + staffId: ..., + vendorBenefitPlanId: ..., + current: ..., // optional +}; + +// Call the `updateBenefitsData()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateBenefitsData(updateBenefitsDataVars); +// Variables can be defined inline as well. +const { data } = await updateBenefitsData({ staffId: ..., vendorBenefitPlanId: ..., current: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateBenefitsData(dataConnect, updateBenefitsDataVars); + +console.log(data.benefitsData_update); + +// Or, you can use the `Promise` API. +updateBenefitsData(updateBenefitsDataVars).then((response) => { + const data = response.data; + console.log(data.benefitsData_update); +}); +``` + +### Using `updateBenefitsData`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateBenefitsDataRef, UpdateBenefitsDataVariables } from '@dataconnect/generated'; + +// The `updateBenefitsData` mutation requires an argument of type `UpdateBenefitsDataVariables`: +const updateBenefitsDataVars: UpdateBenefitsDataVariables = { + staffId: ..., + vendorBenefitPlanId: ..., + current: ..., // optional +}; + +// Call the `updateBenefitsDataRef()` function to get a reference to the mutation. +const ref = updateBenefitsDataRef(updateBenefitsDataVars); +// Variables can be defined inline as well. +const ref = updateBenefitsDataRef({ staffId: ..., vendorBenefitPlanId: ..., current: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateBenefitsDataRef(dataConnect, updateBenefitsDataVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.benefitsData_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.benefitsData_update); +}); +``` + +## deleteBenefitsData +You can execute the `deleteBenefitsData` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteBenefitsData(vars: DeleteBenefitsDataVariables): MutationPromise; + +interface DeleteBenefitsDataRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteBenefitsDataVariables): MutationRef; +} +export const deleteBenefitsDataRef: DeleteBenefitsDataRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteBenefitsData(dc: DataConnect, vars: DeleteBenefitsDataVariables): MutationPromise; + +interface DeleteBenefitsDataRef { + ... + (dc: DataConnect, vars: DeleteBenefitsDataVariables): MutationRef; +} +export const deleteBenefitsDataRef: DeleteBenefitsDataRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteBenefitsDataRef: +```typescript +const name = deleteBenefitsDataRef.operationName; +console.log(name); +``` + +### Variables +The `deleteBenefitsData` mutation requires an argument of type `DeleteBenefitsDataVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteBenefitsDataVariables { + staffId: UUIDString; + vendorBenefitPlanId: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteBenefitsData` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteBenefitsDataData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteBenefitsDataData { + benefitsData_delete?: BenefitsData_Key | null; +} +``` +### Using `deleteBenefitsData`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteBenefitsData, DeleteBenefitsDataVariables } from '@dataconnect/generated'; + +// The `deleteBenefitsData` mutation requires an argument of type `DeleteBenefitsDataVariables`: +const deleteBenefitsDataVars: DeleteBenefitsDataVariables = { + staffId: ..., + vendorBenefitPlanId: ..., +}; + +// Call the `deleteBenefitsData()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteBenefitsData(deleteBenefitsDataVars); +// Variables can be defined inline as well. +const { data } = await deleteBenefitsData({ staffId: ..., vendorBenefitPlanId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteBenefitsData(dataConnect, deleteBenefitsDataVars); + +console.log(data.benefitsData_delete); + +// Or, you can use the `Promise` API. +deleteBenefitsData(deleteBenefitsDataVars).then((response) => { + const data = response.data; + console.log(data.benefitsData_delete); +}); +``` + +### Using `deleteBenefitsData`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteBenefitsDataRef, DeleteBenefitsDataVariables } from '@dataconnect/generated'; + +// The `deleteBenefitsData` mutation requires an argument of type `DeleteBenefitsDataVariables`: +const deleteBenefitsDataVars: DeleteBenefitsDataVariables = { + staffId: ..., + vendorBenefitPlanId: ..., +}; + +// Call the `deleteBenefitsDataRef()` function to get a reference to the mutation. +const ref = deleteBenefitsDataRef(deleteBenefitsDataVars); +// Variables can be defined inline as well. +const ref = deleteBenefitsDataRef({ staffId: ..., vendorBenefitPlanId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteBenefitsDataRef(dataConnect, deleteBenefitsDataVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.benefitsData_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.benefitsData_delete); +}); +``` + +## createStaffDocument +You can execute the `createStaffDocument` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createStaffDocument(vars: CreateStaffDocumentVariables): MutationPromise; + +interface CreateStaffDocumentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateStaffDocumentVariables): MutationRef; +} +export const createStaffDocumentRef: CreateStaffDocumentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createStaffDocument(dc: DataConnect, vars: CreateStaffDocumentVariables): MutationPromise; + +interface CreateStaffDocumentRef { + ... + (dc: DataConnect, vars: CreateStaffDocumentVariables): MutationRef; +} +export const createStaffDocumentRef: CreateStaffDocumentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createStaffDocumentRef: +```typescript +const name = createStaffDocumentRef.operationName; +console.log(name); +``` + +### Variables +The `createStaffDocument` mutation requires an argument of type `CreateStaffDocumentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateStaffDocumentVariables { + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `createStaffDocument` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateStaffDocumentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateStaffDocumentData { + staffDocument_insert: StaffDocument_Key; +} +``` +### Using `createStaffDocument`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createStaffDocument, CreateStaffDocumentVariables } from '@dataconnect/generated'; + +// The `createStaffDocument` mutation requires an argument of type `CreateStaffDocumentVariables`: +const createStaffDocumentVars: CreateStaffDocumentVariables = { + staffId: ..., + staffName: ..., + documentId: ..., + status: ..., + documentUrl: ..., // optional + expiryDate: ..., // optional +}; + +// Call the `createStaffDocument()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createStaffDocument(createStaffDocumentVars); +// Variables can be defined inline as well. +const { data } = await createStaffDocument({ staffId: ..., staffName: ..., documentId: ..., status: ..., documentUrl: ..., expiryDate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createStaffDocument(dataConnect, createStaffDocumentVars); + +console.log(data.staffDocument_insert); + +// Or, you can use the `Promise` API. +createStaffDocument(createStaffDocumentVars).then((response) => { + const data = response.data; + console.log(data.staffDocument_insert); +}); +``` + +### Using `createStaffDocument`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createStaffDocumentRef, CreateStaffDocumentVariables } from '@dataconnect/generated'; + +// The `createStaffDocument` mutation requires an argument of type `CreateStaffDocumentVariables`: +const createStaffDocumentVars: CreateStaffDocumentVariables = { + staffId: ..., + staffName: ..., + documentId: ..., + status: ..., + documentUrl: ..., // optional + expiryDate: ..., // optional +}; + +// Call the `createStaffDocumentRef()` function to get a reference to the mutation. +const ref = createStaffDocumentRef(createStaffDocumentVars); +// Variables can be defined inline as well. +const ref = createStaffDocumentRef({ staffId: ..., staffName: ..., documentId: ..., status: ..., documentUrl: ..., expiryDate: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createStaffDocumentRef(dataConnect, createStaffDocumentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffDocument_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffDocument_insert); +}); +``` + +## updateStaffDocument +You can execute the `updateStaffDocument` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateStaffDocument(vars: UpdateStaffDocumentVariables): MutationPromise; + +interface UpdateStaffDocumentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateStaffDocumentVariables): MutationRef; +} +export const updateStaffDocumentRef: UpdateStaffDocumentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateStaffDocument(dc: DataConnect, vars: UpdateStaffDocumentVariables): MutationPromise; + +interface UpdateStaffDocumentRef { + ... + (dc: DataConnect, vars: UpdateStaffDocumentVariables): MutationRef; +} +export const updateStaffDocumentRef: UpdateStaffDocumentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateStaffDocumentRef: +```typescript +const name = updateStaffDocumentRef.operationName; +console.log(name); +``` + +### Variables +The `updateStaffDocument` mutation requires an argument of type `UpdateStaffDocumentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateStaffDocumentVariables { + staffId: UUIDString; + documentId: UUIDString; + status?: DocumentStatus | null; + documentUrl?: string | null; + expiryDate?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `updateStaffDocument` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateStaffDocumentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateStaffDocumentData { + staffDocument_update?: StaffDocument_Key | null; +} +``` +### Using `updateStaffDocument`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateStaffDocument, UpdateStaffDocumentVariables } from '@dataconnect/generated'; + +// The `updateStaffDocument` mutation requires an argument of type `UpdateStaffDocumentVariables`: +const updateStaffDocumentVars: UpdateStaffDocumentVariables = { + staffId: ..., + documentId: ..., + status: ..., // optional + documentUrl: ..., // optional + expiryDate: ..., // optional +}; + +// Call the `updateStaffDocument()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateStaffDocument(updateStaffDocumentVars); +// Variables can be defined inline as well. +const { data } = await updateStaffDocument({ staffId: ..., documentId: ..., status: ..., documentUrl: ..., expiryDate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateStaffDocument(dataConnect, updateStaffDocumentVars); + +console.log(data.staffDocument_update); + +// Or, you can use the `Promise` API. +updateStaffDocument(updateStaffDocumentVars).then((response) => { + const data = response.data; + console.log(data.staffDocument_update); +}); +``` + +### Using `updateStaffDocument`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateStaffDocumentRef, UpdateStaffDocumentVariables } from '@dataconnect/generated'; + +// The `updateStaffDocument` mutation requires an argument of type `UpdateStaffDocumentVariables`: +const updateStaffDocumentVars: UpdateStaffDocumentVariables = { + staffId: ..., + documentId: ..., + status: ..., // optional + documentUrl: ..., // optional + expiryDate: ..., // optional +}; + +// Call the `updateStaffDocumentRef()` function to get a reference to the mutation. +const ref = updateStaffDocumentRef(updateStaffDocumentVars); +// Variables can be defined inline as well. +const ref = updateStaffDocumentRef({ staffId: ..., documentId: ..., status: ..., documentUrl: ..., expiryDate: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateStaffDocumentRef(dataConnect, updateStaffDocumentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffDocument_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffDocument_update); +}); +``` + +## deleteStaffDocument +You can execute the `deleteStaffDocument` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteStaffDocument(vars: DeleteStaffDocumentVariables): MutationPromise; + +interface DeleteStaffDocumentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteStaffDocumentVariables): MutationRef; +} +export const deleteStaffDocumentRef: DeleteStaffDocumentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteStaffDocument(dc: DataConnect, vars: DeleteStaffDocumentVariables): MutationPromise; + +interface DeleteStaffDocumentRef { + ... + (dc: DataConnect, vars: DeleteStaffDocumentVariables): MutationRef; +} +export const deleteStaffDocumentRef: DeleteStaffDocumentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteStaffDocumentRef: +```typescript +const name = deleteStaffDocumentRef.operationName; +console.log(name); +``` + +### Variables +The `deleteStaffDocument` mutation requires an argument of type `DeleteStaffDocumentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteStaffDocumentVariables { + staffId: UUIDString; + documentId: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteStaffDocument` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteStaffDocumentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteStaffDocumentData { + staffDocument_delete?: StaffDocument_Key | null; +} +``` +### Using `deleteStaffDocument`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteStaffDocument, DeleteStaffDocumentVariables } from '@dataconnect/generated'; + +// The `deleteStaffDocument` mutation requires an argument of type `DeleteStaffDocumentVariables`: +const deleteStaffDocumentVars: DeleteStaffDocumentVariables = { + staffId: ..., + documentId: ..., +}; + +// Call the `deleteStaffDocument()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteStaffDocument(deleteStaffDocumentVars); +// Variables can be defined inline as well. +const { data } = await deleteStaffDocument({ staffId: ..., documentId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteStaffDocument(dataConnect, deleteStaffDocumentVars); + +console.log(data.staffDocument_delete); + +// Or, you can use the `Promise` API. +deleteStaffDocument(deleteStaffDocumentVars).then((response) => { + const data = response.data; + console.log(data.staffDocument_delete); +}); +``` + +### Using `deleteStaffDocument`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteStaffDocumentRef, DeleteStaffDocumentVariables } from '@dataconnect/generated'; + +// The `deleteStaffDocument` mutation requires an argument of type `DeleteStaffDocumentVariables`: +const deleteStaffDocumentVars: DeleteStaffDocumentVariables = { + staffId: ..., + documentId: ..., +}; + +// Call the `deleteStaffDocumentRef()` function to get a reference to the mutation. +const ref = deleteStaffDocumentRef(deleteStaffDocumentVars); +// Variables can be defined inline as well. +const ref = deleteStaffDocumentRef({ staffId: ..., documentId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteStaffDocumentRef(dataConnect, deleteStaffDocumentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffDocument_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffDocument_delete); +}); +``` + +## createTeamHudDepartment +You can execute the `createTeamHudDepartment` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createTeamHudDepartment(vars: CreateTeamHudDepartmentVariables): MutationPromise; + +interface CreateTeamHudDepartmentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTeamHudDepartmentVariables): MutationRef; +} +export const createTeamHudDepartmentRef: CreateTeamHudDepartmentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createTeamHudDepartment(dc: DataConnect, vars: CreateTeamHudDepartmentVariables): MutationPromise; + +interface CreateTeamHudDepartmentRef { + ... + (dc: DataConnect, vars: CreateTeamHudDepartmentVariables): MutationRef; +} +export const createTeamHudDepartmentRef: CreateTeamHudDepartmentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createTeamHudDepartmentRef: +```typescript +const name = createTeamHudDepartmentRef.operationName; +console.log(name); +``` + +### Variables +The `createTeamHudDepartment` mutation requires an argument of type `CreateTeamHudDepartmentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateTeamHudDepartmentVariables { + name: string; + costCenter?: string | null; + teamHubId: UUIDString; +} +``` +### Return Type +Recall that executing the `createTeamHudDepartment` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateTeamHudDepartmentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateTeamHudDepartmentData { + teamHudDepartment_insert: TeamHudDepartment_Key; +} +``` +### Using `createTeamHudDepartment`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createTeamHudDepartment, CreateTeamHudDepartmentVariables } from '@dataconnect/generated'; + +// The `createTeamHudDepartment` mutation requires an argument of type `CreateTeamHudDepartmentVariables`: +const createTeamHudDepartmentVars: CreateTeamHudDepartmentVariables = { + name: ..., + costCenter: ..., // optional + teamHubId: ..., +}; + +// Call the `createTeamHudDepartment()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createTeamHudDepartment(createTeamHudDepartmentVars); +// Variables can be defined inline as well. +const { data } = await createTeamHudDepartment({ name: ..., costCenter: ..., teamHubId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createTeamHudDepartment(dataConnect, createTeamHudDepartmentVars); + +console.log(data.teamHudDepartment_insert); + +// Or, you can use the `Promise` API. +createTeamHudDepartment(createTeamHudDepartmentVars).then((response) => { + const data = response.data; + console.log(data.teamHudDepartment_insert); +}); +``` + +### Using `createTeamHudDepartment`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createTeamHudDepartmentRef, CreateTeamHudDepartmentVariables } from '@dataconnect/generated'; + +// The `createTeamHudDepartment` mutation requires an argument of type `CreateTeamHudDepartmentVariables`: +const createTeamHudDepartmentVars: CreateTeamHudDepartmentVariables = { + name: ..., + costCenter: ..., // optional + teamHubId: ..., +}; + +// Call the `createTeamHudDepartmentRef()` function to get a reference to the mutation. +const ref = createTeamHudDepartmentRef(createTeamHudDepartmentVars); +// Variables can be defined inline as well. +const ref = createTeamHudDepartmentRef({ name: ..., costCenter: ..., teamHubId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createTeamHudDepartmentRef(dataConnect, createTeamHudDepartmentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.teamHudDepartment_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.teamHudDepartment_insert); +}); +``` + +## updateTeamHudDepartment +You can execute the `updateTeamHudDepartment` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateTeamHudDepartment(vars: UpdateTeamHudDepartmentVariables): MutationPromise; + +interface UpdateTeamHudDepartmentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTeamHudDepartmentVariables): MutationRef; +} +export const updateTeamHudDepartmentRef: UpdateTeamHudDepartmentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateTeamHudDepartment(dc: DataConnect, vars: UpdateTeamHudDepartmentVariables): MutationPromise; + +interface UpdateTeamHudDepartmentRef { + ... + (dc: DataConnect, vars: UpdateTeamHudDepartmentVariables): MutationRef; +} +export const updateTeamHudDepartmentRef: UpdateTeamHudDepartmentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateTeamHudDepartmentRef: +```typescript +const name = updateTeamHudDepartmentRef.operationName; +console.log(name); +``` + +### Variables +The `updateTeamHudDepartment` mutation requires an argument of type `UpdateTeamHudDepartmentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateTeamHudDepartmentVariables { + id: UUIDString; + name?: string | null; + costCenter?: string | null; + teamHubId?: UUIDString | null; +} +``` +### Return Type +Recall that executing the `updateTeamHudDepartment` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateTeamHudDepartmentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateTeamHudDepartmentData { + teamHudDepartment_update?: TeamHudDepartment_Key | null; +} +``` +### Using `updateTeamHudDepartment`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateTeamHudDepartment, UpdateTeamHudDepartmentVariables } from '@dataconnect/generated'; + +// The `updateTeamHudDepartment` mutation requires an argument of type `UpdateTeamHudDepartmentVariables`: +const updateTeamHudDepartmentVars: UpdateTeamHudDepartmentVariables = { + id: ..., + name: ..., // optional + costCenter: ..., // optional + teamHubId: ..., // optional +}; + +// Call the `updateTeamHudDepartment()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateTeamHudDepartment(updateTeamHudDepartmentVars); +// Variables can be defined inline as well. +const { data } = await updateTeamHudDepartment({ id: ..., name: ..., costCenter: ..., teamHubId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateTeamHudDepartment(dataConnect, updateTeamHudDepartmentVars); + +console.log(data.teamHudDepartment_update); + +// Or, you can use the `Promise` API. +updateTeamHudDepartment(updateTeamHudDepartmentVars).then((response) => { + const data = response.data; + console.log(data.teamHudDepartment_update); +}); +``` + +### Using `updateTeamHudDepartment`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateTeamHudDepartmentRef, UpdateTeamHudDepartmentVariables } from '@dataconnect/generated'; + +// The `updateTeamHudDepartment` mutation requires an argument of type `UpdateTeamHudDepartmentVariables`: +const updateTeamHudDepartmentVars: UpdateTeamHudDepartmentVariables = { + id: ..., + name: ..., // optional + costCenter: ..., // optional + teamHubId: ..., // optional +}; + +// Call the `updateTeamHudDepartmentRef()` function to get a reference to the mutation. +const ref = updateTeamHudDepartmentRef(updateTeamHudDepartmentVars); +// Variables can be defined inline as well. +const ref = updateTeamHudDepartmentRef({ id: ..., name: ..., costCenter: ..., teamHubId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateTeamHudDepartmentRef(dataConnect, updateTeamHudDepartmentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.teamHudDepartment_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.teamHudDepartment_update); +}); +``` + +## deleteTeamHudDepartment +You can execute the `deleteTeamHudDepartment` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteTeamHudDepartment(vars: DeleteTeamHudDepartmentVariables): MutationPromise; + +interface DeleteTeamHudDepartmentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTeamHudDepartmentVariables): MutationRef; +} +export const deleteTeamHudDepartmentRef: DeleteTeamHudDepartmentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteTeamHudDepartment(dc: DataConnect, vars: DeleteTeamHudDepartmentVariables): MutationPromise; + +interface DeleteTeamHudDepartmentRef { + ... + (dc: DataConnect, vars: DeleteTeamHudDepartmentVariables): MutationRef; +} +export const deleteTeamHudDepartmentRef: DeleteTeamHudDepartmentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteTeamHudDepartmentRef: +```typescript +const name = deleteTeamHudDepartmentRef.operationName; +console.log(name); +``` + +### Variables +The `deleteTeamHudDepartment` mutation requires an argument of type `DeleteTeamHudDepartmentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteTeamHudDepartmentVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteTeamHudDepartment` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteTeamHudDepartmentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteTeamHudDepartmentData { + teamHudDepartment_delete?: TeamHudDepartment_Key | null; +} +``` +### Using `deleteTeamHudDepartment`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteTeamHudDepartment, DeleteTeamHudDepartmentVariables } from '@dataconnect/generated'; + +// The `deleteTeamHudDepartment` mutation requires an argument of type `DeleteTeamHudDepartmentVariables`: +const deleteTeamHudDepartmentVars: DeleteTeamHudDepartmentVariables = { + id: ..., +}; + +// Call the `deleteTeamHudDepartment()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteTeamHudDepartment(deleteTeamHudDepartmentVars); +// Variables can be defined inline as well. +const { data } = await deleteTeamHudDepartment({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteTeamHudDepartment(dataConnect, deleteTeamHudDepartmentVars); + +console.log(data.teamHudDepartment_delete); + +// Or, you can use the `Promise` API. +deleteTeamHudDepartment(deleteTeamHudDepartmentVars).then((response) => { + const data = response.data; + console.log(data.teamHudDepartment_delete); +}); +``` + +### Using `deleteTeamHudDepartment`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteTeamHudDepartmentRef, DeleteTeamHudDepartmentVariables } from '@dataconnect/generated'; + +// The `deleteTeamHudDepartment` mutation requires an argument of type `DeleteTeamHudDepartmentVariables`: +const deleteTeamHudDepartmentVars: DeleteTeamHudDepartmentVariables = { + id: ..., +}; + +// Call the `deleteTeamHudDepartmentRef()` function to get a reference to the mutation. +const ref = deleteTeamHudDepartmentRef(deleteTeamHudDepartmentVars); +// Variables can be defined inline as well. +const ref = deleteTeamHudDepartmentRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteTeamHudDepartmentRef(dataConnect, deleteTeamHudDepartmentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.teamHudDepartment_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.teamHudDepartment_delete); +}); +``` + +## createMemberTask +You can execute the `createMemberTask` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createMemberTask(vars: CreateMemberTaskVariables): MutationPromise; + +interface CreateMemberTaskRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateMemberTaskVariables): MutationRef; +} +export const createMemberTaskRef: CreateMemberTaskRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createMemberTask(dc: DataConnect, vars: CreateMemberTaskVariables): MutationPromise; + +interface CreateMemberTaskRef { + ... + (dc: DataConnect, vars: CreateMemberTaskVariables): MutationRef; +} +export const createMemberTaskRef: CreateMemberTaskRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createMemberTaskRef: +```typescript +const name = createMemberTaskRef.operationName; +console.log(name); +``` + +### Variables +The `createMemberTask` mutation requires an argument of type `CreateMemberTaskVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateMemberTaskVariables { + teamMemberId: UUIDString; + taskId: UUIDString; +} +``` +### Return Type +Recall that executing the `createMemberTask` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateMemberTaskData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateMemberTaskData { + memberTask_insert: MemberTask_Key; +} +``` +### Using `createMemberTask`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createMemberTask, CreateMemberTaskVariables } from '@dataconnect/generated'; + +// The `createMemberTask` mutation requires an argument of type `CreateMemberTaskVariables`: +const createMemberTaskVars: CreateMemberTaskVariables = { + teamMemberId: ..., + taskId: ..., +}; + +// Call the `createMemberTask()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createMemberTask(createMemberTaskVars); +// Variables can be defined inline as well. +const { data } = await createMemberTask({ teamMemberId: ..., taskId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createMemberTask(dataConnect, createMemberTaskVars); + +console.log(data.memberTask_insert); + +// Or, you can use the `Promise` API. +createMemberTask(createMemberTaskVars).then((response) => { + const data = response.data; + console.log(data.memberTask_insert); +}); +``` + +### Using `createMemberTask`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createMemberTaskRef, CreateMemberTaskVariables } from '@dataconnect/generated'; + +// The `createMemberTask` mutation requires an argument of type `CreateMemberTaskVariables`: +const createMemberTaskVars: CreateMemberTaskVariables = { + teamMemberId: ..., + taskId: ..., +}; + +// Call the `createMemberTaskRef()` function to get a reference to the mutation. +const ref = createMemberTaskRef(createMemberTaskVars); +// Variables can be defined inline as well. +const ref = createMemberTaskRef({ teamMemberId: ..., taskId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createMemberTaskRef(dataConnect, createMemberTaskVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.memberTask_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.memberTask_insert); +}); +``` + +## deleteMemberTask +You can execute the `deleteMemberTask` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteMemberTask(vars: DeleteMemberTaskVariables): MutationPromise; + +interface DeleteMemberTaskRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteMemberTaskVariables): MutationRef; +} +export const deleteMemberTaskRef: DeleteMemberTaskRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteMemberTask(dc: DataConnect, vars: DeleteMemberTaskVariables): MutationPromise; + +interface DeleteMemberTaskRef { + ... + (dc: DataConnect, vars: DeleteMemberTaskVariables): MutationRef; +} +export const deleteMemberTaskRef: DeleteMemberTaskRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteMemberTaskRef: +```typescript +const name = deleteMemberTaskRef.operationName; +console.log(name); +``` + +### Variables +The `deleteMemberTask` mutation requires an argument of type `DeleteMemberTaskVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteMemberTaskVariables { + teamMemberId: UUIDString; + taskId: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteMemberTask` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteMemberTaskData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteMemberTaskData { + memberTask_delete?: MemberTask_Key | null; +} +``` +### Using `deleteMemberTask`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteMemberTask, DeleteMemberTaskVariables } from '@dataconnect/generated'; + +// The `deleteMemberTask` mutation requires an argument of type `DeleteMemberTaskVariables`: +const deleteMemberTaskVars: DeleteMemberTaskVariables = { + teamMemberId: ..., + taskId: ..., +}; + +// Call the `deleteMemberTask()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteMemberTask(deleteMemberTaskVars); +// Variables can be defined inline as well. +const { data } = await deleteMemberTask({ teamMemberId: ..., taskId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteMemberTask(dataConnect, deleteMemberTaskVars); + +console.log(data.memberTask_delete); + +// Or, you can use the `Promise` API. +deleteMemberTask(deleteMemberTaskVars).then((response) => { + const data = response.data; + console.log(data.memberTask_delete); +}); +``` + +### Using `deleteMemberTask`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteMemberTaskRef, DeleteMemberTaskVariables } from '@dataconnect/generated'; + +// The `deleteMemberTask` mutation requires an argument of type `DeleteMemberTaskVariables`: +const deleteMemberTaskVars: DeleteMemberTaskVariables = { + teamMemberId: ..., + taskId: ..., +}; + +// Call the `deleteMemberTaskRef()` function to get a reference to the mutation. +const ref = deleteMemberTaskRef(deleteMemberTaskVars); +// Variables can be defined inline as well. +const ref = deleteMemberTaskRef({ teamMemberId: ..., taskId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteMemberTaskRef(dataConnect, deleteMemberTaskVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.memberTask_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.memberTask_delete); +}); +``` + +## createTeam +You can execute the `createTeam` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createTeam(vars: CreateTeamVariables): MutationPromise; + +interface CreateTeamRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTeamVariables): MutationRef; +} +export const createTeamRef: CreateTeamRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createTeam(dc: DataConnect, vars: CreateTeamVariables): MutationPromise; + +interface CreateTeamRef { + ... + (dc: DataConnect, vars: CreateTeamVariables): MutationRef; +} +export const createTeamRef: CreateTeamRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createTeamRef: +```typescript +const name = createTeamRef.operationName; +console.log(name); +``` + +### Variables +The `createTeam` mutation requires an argument of type `CreateTeamVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateTeamVariables { + teamName: string; + ownerId: UUIDString; + ownerName: string; + ownerRole: string; + email?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; +} +``` +### Return Type +Recall that executing the `createTeam` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateTeamData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateTeamData { + team_insert: Team_Key; +} +``` +### Using `createTeam`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createTeam, CreateTeamVariables } from '@dataconnect/generated'; + +// The `createTeam` mutation requires an argument of type `CreateTeamVariables`: +const createTeamVars: CreateTeamVariables = { + teamName: ..., + ownerId: ..., + ownerName: ..., + ownerRole: ..., + email: ..., // optional + companyLogo: ..., // optional + totalMembers: ..., // optional + activeMembers: ..., // optional + totalHubs: ..., // optional + departments: ..., // optional + favoriteStaffCount: ..., // optional + blockedStaffCount: ..., // optional + favoriteStaff: ..., // optional + blockedStaff: ..., // optional +}; + +// Call the `createTeam()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createTeam(createTeamVars); +// Variables can be defined inline as well. +const { data } = await createTeam({ teamName: ..., ownerId: ..., ownerName: ..., ownerRole: ..., email: ..., companyLogo: ..., totalMembers: ..., activeMembers: ..., totalHubs: ..., departments: ..., favoriteStaffCount: ..., blockedStaffCount: ..., favoriteStaff: ..., blockedStaff: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createTeam(dataConnect, createTeamVars); + +console.log(data.team_insert); + +// Or, you can use the `Promise` API. +createTeam(createTeamVars).then((response) => { + const data = response.data; + console.log(data.team_insert); +}); +``` + +### Using `createTeam`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createTeamRef, CreateTeamVariables } from '@dataconnect/generated'; + +// The `createTeam` mutation requires an argument of type `CreateTeamVariables`: +const createTeamVars: CreateTeamVariables = { + teamName: ..., + ownerId: ..., + ownerName: ..., + ownerRole: ..., + email: ..., // optional + companyLogo: ..., // optional + totalMembers: ..., // optional + activeMembers: ..., // optional + totalHubs: ..., // optional + departments: ..., // optional + favoriteStaffCount: ..., // optional + blockedStaffCount: ..., // optional + favoriteStaff: ..., // optional + blockedStaff: ..., // optional +}; + +// Call the `createTeamRef()` function to get a reference to the mutation. +const ref = createTeamRef(createTeamVars); +// Variables can be defined inline as well. +const ref = createTeamRef({ teamName: ..., ownerId: ..., ownerName: ..., ownerRole: ..., email: ..., companyLogo: ..., totalMembers: ..., activeMembers: ..., totalHubs: ..., departments: ..., favoriteStaffCount: ..., blockedStaffCount: ..., favoriteStaff: ..., blockedStaff: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createTeamRef(dataConnect, createTeamVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.team_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.team_insert); +}); +``` + +## updateTeam +You can execute the `updateTeam` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateTeam(vars: UpdateTeamVariables): MutationPromise; + +interface UpdateTeamRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTeamVariables): MutationRef; +} +export const updateTeamRef: UpdateTeamRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateTeam(dc: DataConnect, vars: UpdateTeamVariables): MutationPromise; + +interface UpdateTeamRef { + ... + (dc: DataConnect, vars: UpdateTeamVariables): MutationRef; +} +export const updateTeamRef: UpdateTeamRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateTeamRef: +```typescript +const name = updateTeamRef.operationName; +console.log(name); +``` + +### Variables +The `updateTeam` mutation requires an argument of type `UpdateTeamVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateTeamVariables { + id: UUIDString; + teamName?: string | null; + ownerName?: string | null; + ownerRole?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; +} +``` +### Return Type +Recall that executing the `updateTeam` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateTeamData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateTeamData { + team_update?: Team_Key | null; +} +``` +### Using `updateTeam`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateTeam, UpdateTeamVariables } from '@dataconnect/generated'; + +// The `updateTeam` mutation requires an argument of type `UpdateTeamVariables`: +const updateTeamVars: UpdateTeamVariables = { + id: ..., + teamName: ..., // optional + ownerName: ..., // optional + ownerRole: ..., // optional + companyLogo: ..., // optional + totalMembers: ..., // optional + activeMembers: ..., // optional + totalHubs: ..., // optional + departments: ..., // optional + favoriteStaffCount: ..., // optional + blockedStaffCount: ..., // optional + favoriteStaff: ..., // optional + blockedStaff: ..., // optional +}; + +// Call the `updateTeam()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateTeam(updateTeamVars); +// Variables can be defined inline as well. +const { data } = await updateTeam({ id: ..., teamName: ..., ownerName: ..., ownerRole: ..., companyLogo: ..., totalMembers: ..., activeMembers: ..., totalHubs: ..., departments: ..., favoriteStaffCount: ..., blockedStaffCount: ..., favoriteStaff: ..., blockedStaff: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateTeam(dataConnect, updateTeamVars); + +console.log(data.team_update); + +// Or, you can use the `Promise` API. +updateTeam(updateTeamVars).then((response) => { + const data = response.data; + console.log(data.team_update); +}); +``` + +### Using `updateTeam`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateTeamRef, UpdateTeamVariables } from '@dataconnect/generated'; + +// The `updateTeam` mutation requires an argument of type `UpdateTeamVariables`: +const updateTeamVars: UpdateTeamVariables = { + id: ..., + teamName: ..., // optional + ownerName: ..., // optional + ownerRole: ..., // optional + companyLogo: ..., // optional + totalMembers: ..., // optional + activeMembers: ..., // optional + totalHubs: ..., // optional + departments: ..., // optional + favoriteStaffCount: ..., // optional + blockedStaffCount: ..., // optional + favoriteStaff: ..., // optional + blockedStaff: ..., // optional +}; + +// Call the `updateTeamRef()` function to get a reference to the mutation. +const ref = updateTeamRef(updateTeamVars); +// Variables can be defined inline as well. +const ref = updateTeamRef({ id: ..., teamName: ..., ownerName: ..., ownerRole: ..., companyLogo: ..., totalMembers: ..., activeMembers: ..., totalHubs: ..., departments: ..., favoriteStaffCount: ..., blockedStaffCount: ..., favoriteStaff: ..., blockedStaff: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateTeamRef(dataConnect, updateTeamVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.team_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.team_update); +}); +``` + +## deleteTeam +You can execute the `deleteTeam` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteTeam(vars: DeleteTeamVariables): MutationPromise; + +interface DeleteTeamRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTeamVariables): MutationRef; +} +export const deleteTeamRef: DeleteTeamRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteTeam(dc: DataConnect, vars: DeleteTeamVariables): MutationPromise; + +interface DeleteTeamRef { + ... + (dc: DataConnect, vars: DeleteTeamVariables): MutationRef; +} +export const deleteTeamRef: DeleteTeamRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteTeamRef: +```typescript +const name = deleteTeamRef.operationName; +console.log(name); +``` + +### Variables +The `deleteTeam` mutation requires an argument of type `DeleteTeamVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteTeamVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteTeam` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteTeamData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteTeamData { + team_delete?: Team_Key | null; +} +``` +### Using `deleteTeam`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteTeam, DeleteTeamVariables } from '@dataconnect/generated'; + +// The `deleteTeam` mutation requires an argument of type `DeleteTeamVariables`: +const deleteTeamVars: DeleteTeamVariables = { + id: ..., +}; + +// Call the `deleteTeam()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteTeam(deleteTeamVars); +// Variables can be defined inline as well. +const { data } = await deleteTeam({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteTeam(dataConnect, deleteTeamVars); + +console.log(data.team_delete); + +// Or, you can use the `Promise` API. +deleteTeam(deleteTeamVars).then((response) => { + const data = response.data; + console.log(data.team_delete); +}); +``` + +### Using `deleteTeam`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteTeamRef, DeleteTeamVariables } from '@dataconnect/generated'; + +// The `deleteTeam` mutation requires an argument of type `DeleteTeamVariables`: +const deleteTeamVars: DeleteTeamVariables = { + id: ..., +}; + +// Call the `deleteTeamRef()` function to get a reference to the mutation. +const ref = deleteTeamRef(deleteTeamVars); +// Variables can be defined inline as well. +const ref = deleteTeamRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteTeamRef(dataConnect, deleteTeamVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.team_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.team_delete); +}); +``` + +## createUserConversation +You can execute the `createUserConversation` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createUserConversation(vars: CreateUserConversationVariables): MutationPromise; + +interface CreateUserConversationRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateUserConversationVariables): MutationRef; +} +export const createUserConversationRef: CreateUserConversationRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createUserConversation(dc: DataConnect, vars: CreateUserConversationVariables): MutationPromise; + +interface CreateUserConversationRef { + ... + (dc: DataConnect, vars: CreateUserConversationVariables): MutationRef; +} +export const createUserConversationRef: CreateUserConversationRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createUserConversationRef: +```typescript +const name = createUserConversationRef.operationName; +console.log(name); +``` + +### Variables +The `createUserConversation` mutation requires an argument of type `CreateUserConversationVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateUserConversationVariables { + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `createUserConversation` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateUserConversationData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateUserConversationData { + userConversation_insert: UserConversation_Key; +} +``` +### Using `createUserConversation`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createUserConversation, CreateUserConversationVariables } from '@dataconnect/generated'; + +// The `createUserConversation` mutation requires an argument of type `CreateUserConversationVariables`: +const createUserConversationVars: CreateUserConversationVariables = { + conversationId: ..., + userId: ..., + unreadCount: ..., // optional + lastReadAt: ..., // optional +}; + +// Call the `createUserConversation()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createUserConversation(createUserConversationVars); +// Variables can be defined inline as well. +const { data } = await createUserConversation({ conversationId: ..., userId: ..., unreadCount: ..., lastReadAt: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createUserConversation(dataConnect, createUserConversationVars); + +console.log(data.userConversation_insert); + +// Or, you can use the `Promise` API. +createUserConversation(createUserConversationVars).then((response) => { + const data = response.data; + console.log(data.userConversation_insert); +}); +``` + +### Using `createUserConversation`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createUserConversationRef, CreateUserConversationVariables } from '@dataconnect/generated'; + +// The `createUserConversation` mutation requires an argument of type `CreateUserConversationVariables`: +const createUserConversationVars: CreateUserConversationVariables = { + conversationId: ..., + userId: ..., + unreadCount: ..., // optional + lastReadAt: ..., // optional +}; + +// Call the `createUserConversationRef()` function to get a reference to the mutation. +const ref = createUserConversationRef(createUserConversationVars); +// Variables can be defined inline as well. +const ref = createUserConversationRef({ conversationId: ..., userId: ..., unreadCount: ..., lastReadAt: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createUserConversationRef(dataConnect, createUserConversationVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.userConversation_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.userConversation_insert); +}); +``` + +## updateUserConversation +You can execute the `updateUserConversation` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateUserConversation(vars: UpdateUserConversationVariables): MutationPromise; + +interface UpdateUserConversationRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateUserConversationVariables): MutationRef; +} +export const updateUserConversationRef: UpdateUserConversationRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateUserConversation(dc: DataConnect, vars: UpdateUserConversationVariables): MutationPromise; + +interface UpdateUserConversationRef { + ... + (dc: DataConnect, vars: UpdateUserConversationVariables): MutationRef; +} +export const updateUserConversationRef: UpdateUserConversationRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateUserConversationRef: +```typescript +const name = updateUserConversationRef.operationName; +console.log(name); +``` + +### Variables +The `updateUserConversation` mutation requires an argument of type `UpdateUserConversationVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateUserConversationVariables { + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `updateUserConversation` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateUserConversationData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateUserConversationData { + userConversation_update?: UserConversation_Key | null; +} +``` +### Using `updateUserConversation`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateUserConversation, UpdateUserConversationVariables } from '@dataconnect/generated'; + +// The `updateUserConversation` mutation requires an argument of type `UpdateUserConversationVariables`: +const updateUserConversationVars: UpdateUserConversationVariables = { + conversationId: ..., + userId: ..., + unreadCount: ..., // optional + lastReadAt: ..., // optional +}; + +// Call the `updateUserConversation()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateUserConversation(updateUserConversationVars); +// Variables can be defined inline as well. +const { data } = await updateUserConversation({ conversationId: ..., userId: ..., unreadCount: ..., lastReadAt: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateUserConversation(dataConnect, updateUserConversationVars); + +console.log(data.userConversation_update); + +// Or, you can use the `Promise` API. +updateUserConversation(updateUserConversationVars).then((response) => { + const data = response.data; + console.log(data.userConversation_update); +}); +``` + +### Using `updateUserConversation`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateUserConversationRef, UpdateUserConversationVariables } from '@dataconnect/generated'; + +// The `updateUserConversation` mutation requires an argument of type `UpdateUserConversationVariables`: +const updateUserConversationVars: UpdateUserConversationVariables = { + conversationId: ..., + userId: ..., + unreadCount: ..., // optional + lastReadAt: ..., // optional +}; + +// Call the `updateUserConversationRef()` function to get a reference to the mutation. +const ref = updateUserConversationRef(updateUserConversationVars); +// Variables can be defined inline as well. +const ref = updateUserConversationRef({ conversationId: ..., userId: ..., unreadCount: ..., lastReadAt: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateUserConversationRef(dataConnect, updateUserConversationVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.userConversation_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.userConversation_update); +}); +``` + +## markConversationAsRead +You can execute the `markConversationAsRead` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +markConversationAsRead(vars: MarkConversationAsReadVariables): MutationPromise; + +interface MarkConversationAsReadRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: MarkConversationAsReadVariables): MutationRef; +} +export const markConversationAsReadRef: MarkConversationAsReadRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +markConversationAsRead(dc: DataConnect, vars: MarkConversationAsReadVariables): MutationPromise; + +interface MarkConversationAsReadRef { + ... + (dc: DataConnect, vars: MarkConversationAsReadVariables): MutationRef; +} +export const markConversationAsReadRef: MarkConversationAsReadRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the markConversationAsReadRef: +```typescript +const name = markConversationAsReadRef.operationName; +console.log(name); +``` + +### Variables +The `markConversationAsRead` mutation requires an argument of type `MarkConversationAsReadVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface MarkConversationAsReadVariables { + conversationId: UUIDString; + userId: string; + lastReadAt?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `markConversationAsRead` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `MarkConversationAsReadData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface MarkConversationAsReadData { + userConversation_update?: UserConversation_Key | null; +} +``` +### Using `markConversationAsRead`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, markConversationAsRead, MarkConversationAsReadVariables } from '@dataconnect/generated'; + +// The `markConversationAsRead` mutation requires an argument of type `MarkConversationAsReadVariables`: +const markConversationAsReadVars: MarkConversationAsReadVariables = { + conversationId: ..., + userId: ..., + lastReadAt: ..., // optional +}; + +// Call the `markConversationAsRead()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await markConversationAsRead(markConversationAsReadVars); +// Variables can be defined inline as well. +const { data } = await markConversationAsRead({ conversationId: ..., userId: ..., lastReadAt: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await markConversationAsRead(dataConnect, markConversationAsReadVars); + +console.log(data.userConversation_update); + +// Or, you can use the `Promise` API. +markConversationAsRead(markConversationAsReadVars).then((response) => { + const data = response.data; + console.log(data.userConversation_update); +}); +``` + +### Using `markConversationAsRead`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, markConversationAsReadRef, MarkConversationAsReadVariables } from '@dataconnect/generated'; + +// The `markConversationAsRead` mutation requires an argument of type `MarkConversationAsReadVariables`: +const markConversationAsReadVars: MarkConversationAsReadVariables = { + conversationId: ..., + userId: ..., + lastReadAt: ..., // optional +}; + +// Call the `markConversationAsReadRef()` function to get a reference to the mutation. +const ref = markConversationAsReadRef(markConversationAsReadVars); +// Variables can be defined inline as well. +const ref = markConversationAsReadRef({ conversationId: ..., userId: ..., lastReadAt: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = markConversationAsReadRef(dataConnect, markConversationAsReadVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.userConversation_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.userConversation_update); +}); +``` + +## incrementUnreadForUser +You can execute the `incrementUnreadForUser` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +incrementUnreadForUser(vars: IncrementUnreadForUserVariables): MutationPromise; + +interface IncrementUnreadForUserRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: IncrementUnreadForUserVariables): MutationRef; +} +export const incrementUnreadForUserRef: IncrementUnreadForUserRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +incrementUnreadForUser(dc: DataConnect, vars: IncrementUnreadForUserVariables): MutationPromise; + +interface IncrementUnreadForUserRef { + ... + (dc: DataConnect, vars: IncrementUnreadForUserVariables): MutationRef; +} +export const incrementUnreadForUserRef: IncrementUnreadForUserRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the incrementUnreadForUserRef: +```typescript +const name = incrementUnreadForUserRef.operationName; +console.log(name); +``` + +### Variables +The `incrementUnreadForUser` mutation requires an argument of type `IncrementUnreadForUserVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface IncrementUnreadForUserVariables { + conversationId: UUIDString; + userId: string; + unreadCount: number; +} +``` +### Return Type +Recall that executing the `incrementUnreadForUser` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `IncrementUnreadForUserData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface IncrementUnreadForUserData { + userConversation_update?: UserConversation_Key | null; +} +``` +### Using `incrementUnreadForUser`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, incrementUnreadForUser, IncrementUnreadForUserVariables } from '@dataconnect/generated'; + +// The `incrementUnreadForUser` mutation requires an argument of type `IncrementUnreadForUserVariables`: +const incrementUnreadForUserVars: IncrementUnreadForUserVariables = { + conversationId: ..., + userId: ..., + unreadCount: ..., +}; + +// Call the `incrementUnreadForUser()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await incrementUnreadForUser(incrementUnreadForUserVars); +// Variables can be defined inline as well. +const { data } = await incrementUnreadForUser({ conversationId: ..., userId: ..., unreadCount: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await incrementUnreadForUser(dataConnect, incrementUnreadForUserVars); + +console.log(data.userConversation_update); + +// Or, you can use the `Promise` API. +incrementUnreadForUser(incrementUnreadForUserVars).then((response) => { + const data = response.data; + console.log(data.userConversation_update); +}); +``` + +### Using `incrementUnreadForUser`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, incrementUnreadForUserRef, IncrementUnreadForUserVariables } from '@dataconnect/generated'; + +// The `incrementUnreadForUser` mutation requires an argument of type `IncrementUnreadForUserVariables`: +const incrementUnreadForUserVars: IncrementUnreadForUserVariables = { + conversationId: ..., + userId: ..., + unreadCount: ..., +}; + +// Call the `incrementUnreadForUserRef()` function to get a reference to the mutation. +const ref = incrementUnreadForUserRef(incrementUnreadForUserVars); +// Variables can be defined inline as well. +const ref = incrementUnreadForUserRef({ conversationId: ..., userId: ..., unreadCount: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = incrementUnreadForUserRef(dataConnect, incrementUnreadForUserVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.userConversation_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.userConversation_update); +}); +``` + +## deleteUserConversation +You can execute the `deleteUserConversation` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteUserConversation(vars: DeleteUserConversationVariables): MutationPromise; + +interface DeleteUserConversationRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteUserConversationVariables): MutationRef; +} +export const deleteUserConversationRef: DeleteUserConversationRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteUserConversation(dc: DataConnect, vars: DeleteUserConversationVariables): MutationPromise; + +interface DeleteUserConversationRef { + ... + (dc: DataConnect, vars: DeleteUserConversationVariables): MutationRef; +} +export const deleteUserConversationRef: DeleteUserConversationRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteUserConversationRef: +```typescript +const name = deleteUserConversationRef.operationName; +console.log(name); +``` + +### Variables +The `deleteUserConversation` mutation requires an argument of type `DeleteUserConversationVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteUserConversationVariables { + conversationId: UUIDString; + userId: string; +} +``` +### Return Type +Recall that executing the `deleteUserConversation` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteUserConversationData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteUserConversationData { + userConversation_delete?: UserConversation_Key | null; +} +``` +### Using `deleteUserConversation`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteUserConversation, DeleteUserConversationVariables } from '@dataconnect/generated'; + +// The `deleteUserConversation` mutation requires an argument of type `DeleteUserConversationVariables`: +const deleteUserConversationVars: DeleteUserConversationVariables = { + conversationId: ..., + userId: ..., +}; + +// Call the `deleteUserConversation()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteUserConversation(deleteUserConversationVars); +// Variables can be defined inline as well. +const { data } = await deleteUserConversation({ conversationId: ..., userId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteUserConversation(dataConnect, deleteUserConversationVars); + +console.log(data.userConversation_delete); + +// Or, you can use the `Promise` API. +deleteUserConversation(deleteUserConversationVars).then((response) => { + const data = response.data; + console.log(data.userConversation_delete); +}); +``` + +### Using `deleteUserConversation`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteUserConversationRef, DeleteUserConversationVariables } from '@dataconnect/generated'; + +// The `deleteUserConversation` mutation requires an argument of type `DeleteUserConversationVariables`: +const deleteUserConversationVars: DeleteUserConversationVariables = { + conversationId: ..., + userId: ..., +}; + +// Call the `deleteUserConversationRef()` function to get a reference to the mutation. +const ref = deleteUserConversationRef(deleteUserConversationVars); +// Variables can be defined inline as well. +const ref = deleteUserConversationRef({ conversationId: ..., userId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteUserConversationRef(dataConnect, deleteUserConversationVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.userConversation_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.userConversation_delete); +}); +``` + +## createAttireOption +You can execute the `createAttireOption` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createAttireOption(vars: CreateAttireOptionVariables): MutationPromise; + +interface CreateAttireOptionRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateAttireOptionVariables): MutationRef; +} +export const createAttireOptionRef: CreateAttireOptionRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createAttireOption(dc: DataConnect, vars: CreateAttireOptionVariables): MutationPromise; + +interface CreateAttireOptionRef { + ... + (dc: DataConnect, vars: CreateAttireOptionVariables): MutationRef; +} +export const createAttireOptionRef: CreateAttireOptionRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createAttireOptionRef: +```typescript +const name = createAttireOptionRef.operationName; +console.log(name); +``` + +### Variables +The `createAttireOption` mutation requires an argument of type `CreateAttireOptionVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateAttireOptionVariables { + itemId: string; + label: string; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; +} +``` +### Return Type +Recall that executing the `createAttireOption` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateAttireOptionData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateAttireOptionData { + attireOption_insert: AttireOption_Key; +} +``` +### Using `createAttireOption`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createAttireOption, CreateAttireOptionVariables } from '@dataconnect/generated'; + +// The `createAttireOption` mutation requires an argument of type `CreateAttireOptionVariables`: +const createAttireOptionVars: CreateAttireOptionVariables = { + itemId: ..., + label: ..., + icon: ..., // optional + imageUrl: ..., // optional + isMandatory: ..., // optional + vendorId: ..., // optional +}; + +// Call the `createAttireOption()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createAttireOption(createAttireOptionVars); +// Variables can be defined inline as well. +const { data } = await createAttireOption({ itemId: ..., label: ..., icon: ..., imageUrl: ..., isMandatory: ..., vendorId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createAttireOption(dataConnect, createAttireOptionVars); + +console.log(data.attireOption_insert); + +// Or, you can use the `Promise` API. +createAttireOption(createAttireOptionVars).then((response) => { + const data = response.data; + console.log(data.attireOption_insert); +}); +``` + +### Using `createAttireOption`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createAttireOptionRef, CreateAttireOptionVariables } from '@dataconnect/generated'; + +// The `createAttireOption` mutation requires an argument of type `CreateAttireOptionVariables`: +const createAttireOptionVars: CreateAttireOptionVariables = { + itemId: ..., + label: ..., + icon: ..., // optional + imageUrl: ..., // optional + isMandatory: ..., // optional + vendorId: ..., // optional +}; + +// Call the `createAttireOptionRef()` function to get a reference to the mutation. +const ref = createAttireOptionRef(createAttireOptionVars); +// Variables can be defined inline as well. +const ref = createAttireOptionRef({ itemId: ..., label: ..., icon: ..., imageUrl: ..., isMandatory: ..., vendorId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createAttireOptionRef(dataConnect, createAttireOptionVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.attireOption_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.attireOption_insert); +}); +``` + +## updateAttireOption +You can execute the `updateAttireOption` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateAttireOption(vars: UpdateAttireOptionVariables): MutationPromise; + +interface UpdateAttireOptionRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateAttireOptionVariables): MutationRef; +} +export const updateAttireOptionRef: UpdateAttireOptionRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateAttireOption(dc: DataConnect, vars: UpdateAttireOptionVariables): MutationPromise; + +interface UpdateAttireOptionRef { + ... + (dc: DataConnect, vars: UpdateAttireOptionVariables): MutationRef; +} +export const updateAttireOptionRef: UpdateAttireOptionRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateAttireOptionRef: +```typescript +const name = updateAttireOptionRef.operationName; +console.log(name); +``` + +### Variables +The `updateAttireOption` mutation requires an argument of type `UpdateAttireOptionVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateAttireOptionVariables { + id: UUIDString; + itemId?: string | null; + label?: string | null; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; +} +``` +### Return Type +Recall that executing the `updateAttireOption` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateAttireOptionData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateAttireOptionData { + attireOption_update?: AttireOption_Key | null; +} +``` +### Using `updateAttireOption`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateAttireOption, UpdateAttireOptionVariables } from '@dataconnect/generated'; + +// The `updateAttireOption` mutation requires an argument of type `UpdateAttireOptionVariables`: +const updateAttireOptionVars: UpdateAttireOptionVariables = { + id: ..., + itemId: ..., // optional + label: ..., // optional + icon: ..., // optional + imageUrl: ..., // optional + isMandatory: ..., // optional + vendorId: ..., // optional +}; + +// Call the `updateAttireOption()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateAttireOption(updateAttireOptionVars); +// Variables can be defined inline as well. +const { data } = await updateAttireOption({ id: ..., itemId: ..., label: ..., icon: ..., imageUrl: ..., isMandatory: ..., vendorId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateAttireOption(dataConnect, updateAttireOptionVars); + +console.log(data.attireOption_update); + +// Or, you can use the `Promise` API. +updateAttireOption(updateAttireOptionVars).then((response) => { + const data = response.data; + console.log(data.attireOption_update); +}); +``` + +### Using `updateAttireOption`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateAttireOptionRef, UpdateAttireOptionVariables } from '@dataconnect/generated'; + +// The `updateAttireOption` mutation requires an argument of type `UpdateAttireOptionVariables`: +const updateAttireOptionVars: UpdateAttireOptionVariables = { + id: ..., + itemId: ..., // optional + label: ..., // optional + icon: ..., // optional + imageUrl: ..., // optional + isMandatory: ..., // optional + vendorId: ..., // optional +}; + +// Call the `updateAttireOptionRef()` function to get a reference to the mutation. +const ref = updateAttireOptionRef(updateAttireOptionVars); +// Variables can be defined inline as well. +const ref = updateAttireOptionRef({ id: ..., itemId: ..., label: ..., icon: ..., imageUrl: ..., isMandatory: ..., vendorId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateAttireOptionRef(dataConnect, updateAttireOptionVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.attireOption_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.attireOption_update); +}); +``` + +## deleteAttireOption +You can execute the `deleteAttireOption` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteAttireOption(vars: DeleteAttireOptionVariables): MutationPromise; + +interface DeleteAttireOptionRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteAttireOptionVariables): MutationRef; +} +export const deleteAttireOptionRef: DeleteAttireOptionRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteAttireOption(dc: DataConnect, vars: DeleteAttireOptionVariables): MutationPromise; + +interface DeleteAttireOptionRef { + ... + (dc: DataConnect, vars: DeleteAttireOptionVariables): MutationRef; +} +export const deleteAttireOptionRef: DeleteAttireOptionRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteAttireOptionRef: +```typescript +const name = deleteAttireOptionRef.operationName; +console.log(name); +``` + +### Variables +The `deleteAttireOption` mutation requires an argument of type `DeleteAttireOptionVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteAttireOptionVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteAttireOption` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteAttireOptionData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteAttireOptionData { + attireOption_delete?: AttireOption_Key | null; +} +``` +### Using `deleteAttireOption`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteAttireOption, DeleteAttireOptionVariables } from '@dataconnect/generated'; + +// The `deleteAttireOption` mutation requires an argument of type `DeleteAttireOptionVariables`: +const deleteAttireOptionVars: DeleteAttireOptionVariables = { + id: ..., +}; + +// Call the `deleteAttireOption()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteAttireOption(deleteAttireOptionVars); +// Variables can be defined inline as well. +const { data } = await deleteAttireOption({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteAttireOption(dataConnect, deleteAttireOptionVars); + +console.log(data.attireOption_delete); + +// Or, you can use the `Promise` API. +deleteAttireOption(deleteAttireOptionVars).then((response) => { + const data = response.data; + console.log(data.attireOption_delete); +}); +``` + +### Using `deleteAttireOption`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteAttireOptionRef, DeleteAttireOptionVariables } from '@dataconnect/generated'; + +// The `deleteAttireOption` mutation requires an argument of type `DeleteAttireOptionVariables`: +const deleteAttireOptionVars: DeleteAttireOptionVariables = { + id: ..., +}; + +// Call the `deleteAttireOptionRef()` function to get a reference to the mutation. +const ref = deleteAttireOptionRef(deleteAttireOptionVars); +// Variables can be defined inline as well. +const ref = deleteAttireOptionRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteAttireOptionRef(dataConnect, deleteAttireOptionVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.attireOption_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.attireOption_delete); +}); +``` + +## createCourse +You can execute the `createCourse` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createCourse(vars: CreateCourseVariables): MutationPromise; + +interface CreateCourseRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateCourseVariables): MutationRef; +} +export const createCourseRef: CreateCourseRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createCourse(dc: DataConnect, vars: CreateCourseVariables): MutationPromise; + +interface CreateCourseRef { + ... + (dc: DataConnect, vars: CreateCourseVariables): MutationRef; +} +export const createCourseRef: CreateCourseRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createCourseRef: +```typescript +const name = createCourseRef.operationName; +console.log(name); +``` + +### Variables +The `createCourse` mutation requires an argument of type `CreateCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateCourseVariables { + title?: string | null; + description?: string | null; + thumbnailUrl?: string | null; + durationMinutes?: number | null; + xpReward?: number | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; +} +``` +### Return Type +Recall that executing the `createCourse` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateCourseData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateCourseData { + course_insert: Course_Key; +} +``` +### Using `createCourse`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createCourse, CreateCourseVariables } from '@dataconnect/generated'; + +// The `createCourse` mutation requires an argument of type `CreateCourseVariables`: +const createCourseVars: CreateCourseVariables = { + title: ..., // optional + description: ..., // optional + thumbnailUrl: ..., // optional + durationMinutes: ..., // optional + xpReward: ..., // optional + categoryId: ..., + levelRequired: ..., // optional + isCertification: ..., // optional +}; + +// Call the `createCourse()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createCourse(createCourseVars); +// Variables can be defined inline as well. +const { data } = await createCourse({ title: ..., description: ..., thumbnailUrl: ..., durationMinutes: ..., xpReward: ..., categoryId: ..., levelRequired: ..., isCertification: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createCourse(dataConnect, createCourseVars); + +console.log(data.course_insert); + +// Or, you can use the `Promise` API. +createCourse(createCourseVars).then((response) => { + const data = response.data; + console.log(data.course_insert); +}); +``` + +### Using `createCourse`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createCourseRef, CreateCourseVariables } from '@dataconnect/generated'; + +// The `createCourse` mutation requires an argument of type `CreateCourseVariables`: +const createCourseVars: CreateCourseVariables = { + title: ..., // optional + description: ..., // optional + thumbnailUrl: ..., // optional + durationMinutes: ..., // optional + xpReward: ..., // optional + categoryId: ..., + levelRequired: ..., // optional + isCertification: ..., // optional +}; + +// Call the `createCourseRef()` function to get a reference to the mutation. +const ref = createCourseRef(createCourseVars); +// Variables can be defined inline as well. +const ref = createCourseRef({ title: ..., description: ..., thumbnailUrl: ..., durationMinutes: ..., xpReward: ..., categoryId: ..., levelRequired: ..., isCertification: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createCourseRef(dataConnect, createCourseVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.course_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.course_insert); +}); +``` + +## updateCourse +You can execute the `updateCourse` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateCourse(vars: UpdateCourseVariables): MutationPromise; + +interface UpdateCourseRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateCourseVariables): MutationRef; +} +export const updateCourseRef: UpdateCourseRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateCourse(dc: DataConnect, vars: UpdateCourseVariables): MutationPromise; + +interface UpdateCourseRef { + ... + (dc: DataConnect, vars: UpdateCourseVariables): MutationRef; +} +export const updateCourseRef: UpdateCourseRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateCourseRef: +```typescript +const name = updateCourseRef.operationName; +console.log(name); +``` + +### Variables +The `updateCourse` mutation requires an argument of type `UpdateCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateCourseVariables { + id: UUIDString; + title?: string | null; + description?: string | null; + thumbnailUrl?: string | null; + durationMinutes?: number | null; + xpReward?: number | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; +} +``` +### Return Type +Recall that executing the `updateCourse` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateCourseData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateCourseData { + course_update?: Course_Key | null; +} +``` +### Using `updateCourse`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateCourse, UpdateCourseVariables } from '@dataconnect/generated'; + +// The `updateCourse` mutation requires an argument of type `UpdateCourseVariables`: +const updateCourseVars: UpdateCourseVariables = { + id: ..., + title: ..., // optional + description: ..., // optional + thumbnailUrl: ..., // optional + durationMinutes: ..., // optional + xpReward: ..., // optional + categoryId: ..., + levelRequired: ..., // optional + isCertification: ..., // optional +}; + +// Call the `updateCourse()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateCourse(updateCourseVars); +// Variables can be defined inline as well. +const { data } = await updateCourse({ id: ..., title: ..., description: ..., thumbnailUrl: ..., durationMinutes: ..., xpReward: ..., categoryId: ..., levelRequired: ..., isCertification: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateCourse(dataConnect, updateCourseVars); + +console.log(data.course_update); + +// Or, you can use the `Promise` API. +updateCourse(updateCourseVars).then((response) => { + const data = response.data; + console.log(data.course_update); +}); +``` + +### Using `updateCourse`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateCourseRef, UpdateCourseVariables } from '@dataconnect/generated'; + +// The `updateCourse` mutation requires an argument of type `UpdateCourseVariables`: +const updateCourseVars: UpdateCourseVariables = { + id: ..., + title: ..., // optional + description: ..., // optional + thumbnailUrl: ..., // optional + durationMinutes: ..., // optional + xpReward: ..., // optional + categoryId: ..., + levelRequired: ..., // optional + isCertification: ..., // optional +}; + +// Call the `updateCourseRef()` function to get a reference to the mutation. +const ref = updateCourseRef(updateCourseVars); +// Variables can be defined inline as well. +const ref = updateCourseRef({ id: ..., title: ..., description: ..., thumbnailUrl: ..., durationMinutes: ..., xpReward: ..., categoryId: ..., levelRequired: ..., isCertification: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateCourseRef(dataConnect, updateCourseVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.course_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.course_update); +}); +``` + +## deleteCourse +You can execute the `deleteCourse` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteCourse(vars: DeleteCourseVariables): MutationPromise; + +interface DeleteCourseRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteCourseVariables): MutationRef; +} +export const deleteCourseRef: DeleteCourseRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteCourse(dc: DataConnect, vars: DeleteCourseVariables): MutationPromise; + +interface DeleteCourseRef { + ... + (dc: DataConnect, vars: DeleteCourseVariables): MutationRef; +} +export const deleteCourseRef: DeleteCourseRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteCourseRef: +```typescript +const name = deleteCourseRef.operationName; +console.log(name); +``` + +### Variables +The `deleteCourse` mutation requires an argument of type `DeleteCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteCourseVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteCourse` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteCourseData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteCourseData { + course_delete?: Course_Key | null; +} +``` +### Using `deleteCourse`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteCourse, DeleteCourseVariables } from '@dataconnect/generated'; + +// The `deleteCourse` mutation requires an argument of type `DeleteCourseVariables`: +const deleteCourseVars: DeleteCourseVariables = { + id: ..., +}; + +// Call the `deleteCourse()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteCourse(deleteCourseVars); +// Variables can be defined inline as well. +const { data } = await deleteCourse({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteCourse(dataConnect, deleteCourseVars); + +console.log(data.course_delete); + +// Or, you can use the `Promise` API. +deleteCourse(deleteCourseVars).then((response) => { + const data = response.data; + console.log(data.course_delete); +}); +``` + +### Using `deleteCourse`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteCourseRef, DeleteCourseVariables } from '@dataconnect/generated'; + +// The `deleteCourse` mutation requires an argument of type `DeleteCourseVariables`: +const deleteCourseVars: DeleteCourseVariables = { + id: ..., +}; + +// Call the `deleteCourseRef()` function to get a reference to the mutation. +const ref = deleteCourseRef(deleteCourseVars); +// Variables can be defined inline as well. +const ref = deleteCourseRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteCourseRef(dataConnect, deleteCourseVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.course_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.course_delete); +}); +``` + +## createEmergencyContact +You can execute the `createEmergencyContact` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createEmergencyContact(vars: CreateEmergencyContactVariables): MutationPromise; + +interface CreateEmergencyContactRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateEmergencyContactVariables): MutationRef; +} +export const createEmergencyContactRef: CreateEmergencyContactRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createEmergencyContact(dc: DataConnect, vars: CreateEmergencyContactVariables): MutationPromise; + +interface CreateEmergencyContactRef { + ... + (dc: DataConnect, vars: CreateEmergencyContactVariables): MutationRef; +} +export const createEmergencyContactRef: CreateEmergencyContactRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createEmergencyContactRef: +```typescript +const name = createEmergencyContactRef.operationName; +console.log(name); +``` + +### Variables +The `createEmergencyContact` mutation requires an argument of type `CreateEmergencyContactVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateEmergencyContactVariables { + name: string; + phone: string; + relationship: RelationshipType; + staffId: UUIDString; +} +``` +### Return Type +Recall that executing the `createEmergencyContact` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateEmergencyContactData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateEmergencyContactData { + emergencyContact_insert: EmergencyContact_Key; +} +``` +### Using `createEmergencyContact`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createEmergencyContact, CreateEmergencyContactVariables } from '@dataconnect/generated'; + +// The `createEmergencyContact` mutation requires an argument of type `CreateEmergencyContactVariables`: +const createEmergencyContactVars: CreateEmergencyContactVariables = { + name: ..., + phone: ..., + relationship: ..., + staffId: ..., +}; + +// Call the `createEmergencyContact()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createEmergencyContact(createEmergencyContactVars); +// Variables can be defined inline as well. +const { data } = await createEmergencyContact({ name: ..., phone: ..., relationship: ..., staffId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createEmergencyContact(dataConnect, createEmergencyContactVars); + +console.log(data.emergencyContact_insert); + +// Or, you can use the `Promise` API. +createEmergencyContact(createEmergencyContactVars).then((response) => { + const data = response.data; + console.log(data.emergencyContact_insert); +}); +``` + +### Using `createEmergencyContact`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createEmergencyContactRef, CreateEmergencyContactVariables } from '@dataconnect/generated'; + +// The `createEmergencyContact` mutation requires an argument of type `CreateEmergencyContactVariables`: +const createEmergencyContactVars: CreateEmergencyContactVariables = { + name: ..., + phone: ..., + relationship: ..., + staffId: ..., +}; + +// Call the `createEmergencyContactRef()` function to get a reference to the mutation. +const ref = createEmergencyContactRef(createEmergencyContactVars); +// Variables can be defined inline as well. +const ref = createEmergencyContactRef({ name: ..., phone: ..., relationship: ..., staffId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createEmergencyContactRef(dataConnect, createEmergencyContactVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.emergencyContact_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.emergencyContact_insert); +}); +``` + +## updateEmergencyContact +You can execute the `updateEmergencyContact` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateEmergencyContact(vars: UpdateEmergencyContactVariables): MutationPromise; + +interface UpdateEmergencyContactRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateEmergencyContactVariables): MutationRef; +} +export const updateEmergencyContactRef: UpdateEmergencyContactRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateEmergencyContact(dc: DataConnect, vars: UpdateEmergencyContactVariables): MutationPromise; + +interface UpdateEmergencyContactRef { + ... + (dc: DataConnect, vars: UpdateEmergencyContactVariables): MutationRef; +} +export const updateEmergencyContactRef: UpdateEmergencyContactRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateEmergencyContactRef: +```typescript +const name = updateEmergencyContactRef.operationName; +console.log(name); +``` + +### Variables +The `updateEmergencyContact` mutation requires an argument of type `UpdateEmergencyContactVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateEmergencyContactVariables { + id: UUIDString; + name?: string | null; + phone?: string | null; + relationship?: RelationshipType | null; +} +``` +### Return Type +Recall that executing the `updateEmergencyContact` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateEmergencyContactData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateEmergencyContactData { + emergencyContact_update?: EmergencyContact_Key | null; +} +``` +### Using `updateEmergencyContact`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateEmergencyContact, UpdateEmergencyContactVariables } from '@dataconnect/generated'; + +// The `updateEmergencyContact` mutation requires an argument of type `UpdateEmergencyContactVariables`: +const updateEmergencyContactVars: UpdateEmergencyContactVariables = { + id: ..., + name: ..., // optional + phone: ..., // optional + relationship: ..., // optional +}; + +// Call the `updateEmergencyContact()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateEmergencyContact(updateEmergencyContactVars); +// Variables can be defined inline as well. +const { data } = await updateEmergencyContact({ id: ..., name: ..., phone: ..., relationship: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateEmergencyContact(dataConnect, updateEmergencyContactVars); + +console.log(data.emergencyContact_update); + +// Or, you can use the `Promise` API. +updateEmergencyContact(updateEmergencyContactVars).then((response) => { + const data = response.data; + console.log(data.emergencyContact_update); +}); +``` + +### Using `updateEmergencyContact`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateEmergencyContactRef, UpdateEmergencyContactVariables } from '@dataconnect/generated'; + +// The `updateEmergencyContact` mutation requires an argument of type `UpdateEmergencyContactVariables`: +const updateEmergencyContactVars: UpdateEmergencyContactVariables = { + id: ..., + name: ..., // optional + phone: ..., // optional + relationship: ..., // optional +}; + +// Call the `updateEmergencyContactRef()` function to get a reference to the mutation. +const ref = updateEmergencyContactRef(updateEmergencyContactVars); +// Variables can be defined inline as well. +const ref = updateEmergencyContactRef({ id: ..., name: ..., phone: ..., relationship: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateEmergencyContactRef(dataConnect, updateEmergencyContactVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.emergencyContact_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.emergencyContact_update); +}); +``` + +## deleteEmergencyContact +You can execute the `deleteEmergencyContact` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteEmergencyContact(vars: DeleteEmergencyContactVariables): MutationPromise; + +interface DeleteEmergencyContactRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteEmergencyContactVariables): MutationRef; +} +export const deleteEmergencyContactRef: DeleteEmergencyContactRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteEmergencyContact(dc: DataConnect, vars: DeleteEmergencyContactVariables): MutationPromise; + +interface DeleteEmergencyContactRef { + ... + (dc: DataConnect, vars: DeleteEmergencyContactVariables): MutationRef; +} +export const deleteEmergencyContactRef: DeleteEmergencyContactRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteEmergencyContactRef: +```typescript +const name = deleteEmergencyContactRef.operationName; +console.log(name); +``` + +### Variables +The `deleteEmergencyContact` mutation requires an argument of type `DeleteEmergencyContactVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteEmergencyContactVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteEmergencyContact` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteEmergencyContactData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteEmergencyContactData { + emergencyContact_delete?: EmergencyContact_Key | null; +} +``` +### Using `deleteEmergencyContact`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteEmergencyContact, DeleteEmergencyContactVariables } from '@dataconnect/generated'; + +// The `deleteEmergencyContact` mutation requires an argument of type `DeleteEmergencyContactVariables`: +const deleteEmergencyContactVars: DeleteEmergencyContactVariables = { + id: ..., +}; + +// Call the `deleteEmergencyContact()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteEmergencyContact(deleteEmergencyContactVars); +// Variables can be defined inline as well. +const { data } = await deleteEmergencyContact({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteEmergencyContact(dataConnect, deleteEmergencyContactVars); + +console.log(data.emergencyContact_delete); + +// Or, you can use the `Promise` API. +deleteEmergencyContact(deleteEmergencyContactVars).then((response) => { + const data = response.data; + console.log(data.emergencyContact_delete); +}); +``` + +### Using `deleteEmergencyContact`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteEmergencyContactRef, DeleteEmergencyContactVariables } from '@dataconnect/generated'; + +// The `deleteEmergencyContact` mutation requires an argument of type `DeleteEmergencyContactVariables`: +const deleteEmergencyContactVars: DeleteEmergencyContactVariables = { + id: ..., +}; + +// Call the `deleteEmergencyContactRef()` function to get a reference to the mutation. +const ref = deleteEmergencyContactRef(deleteEmergencyContactVars); +// Variables can be defined inline as well. +const ref = deleteEmergencyContactRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteEmergencyContactRef(dataConnect, deleteEmergencyContactVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.emergencyContact_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.emergencyContact_delete); +}); +``` + +## createStaffCourse +You can execute the `createStaffCourse` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createStaffCourse(vars: CreateStaffCourseVariables): MutationPromise; + +interface CreateStaffCourseRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateStaffCourseVariables): MutationRef; +} +export const createStaffCourseRef: CreateStaffCourseRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createStaffCourse(dc: DataConnect, vars: CreateStaffCourseVariables): MutationPromise; + +interface CreateStaffCourseRef { + ... + (dc: DataConnect, vars: CreateStaffCourseVariables): MutationRef; +} +export const createStaffCourseRef: CreateStaffCourseRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createStaffCourseRef: +```typescript +const name = createStaffCourseRef.operationName; +console.log(name); +``` + +### Variables +The `createStaffCourse` mutation requires an argument of type `CreateStaffCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateStaffCourseVariables { + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `createStaffCourse` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateStaffCourseData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateStaffCourseData { + staffCourse_insert: StaffCourse_Key; +} +``` +### Using `createStaffCourse`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createStaffCourse, CreateStaffCourseVariables } from '@dataconnect/generated'; + +// The `createStaffCourse` mutation requires an argument of type `CreateStaffCourseVariables`: +const createStaffCourseVars: CreateStaffCourseVariables = { + staffId: ..., + courseId: ..., + progressPercent: ..., // optional + completed: ..., // optional + completedAt: ..., // optional + startedAt: ..., // optional + lastAccessedAt: ..., // optional +}; + +// Call the `createStaffCourse()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createStaffCourse(createStaffCourseVars); +// Variables can be defined inline as well. +const { data } = await createStaffCourse({ staffId: ..., courseId: ..., progressPercent: ..., completed: ..., completedAt: ..., startedAt: ..., lastAccessedAt: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createStaffCourse(dataConnect, createStaffCourseVars); + +console.log(data.staffCourse_insert); + +// Or, you can use the `Promise` API. +createStaffCourse(createStaffCourseVars).then((response) => { + const data = response.data; + console.log(data.staffCourse_insert); +}); +``` + +### Using `createStaffCourse`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createStaffCourseRef, CreateStaffCourseVariables } from '@dataconnect/generated'; + +// The `createStaffCourse` mutation requires an argument of type `CreateStaffCourseVariables`: +const createStaffCourseVars: CreateStaffCourseVariables = { + staffId: ..., + courseId: ..., + progressPercent: ..., // optional + completed: ..., // optional + completedAt: ..., // optional + startedAt: ..., // optional + lastAccessedAt: ..., // optional +}; + +// Call the `createStaffCourseRef()` function to get a reference to the mutation. +const ref = createStaffCourseRef(createStaffCourseVars); +// Variables can be defined inline as well. +const ref = createStaffCourseRef({ staffId: ..., courseId: ..., progressPercent: ..., completed: ..., completedAt: ..., startedAt: ..., lastAccessedAt: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createStaffCourseRef(dataConnect, createStaffCourseVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffCourse_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffCourse_insert); +}); +``` + +## updateStaffCourse +You can execute the `updateStaffCourse` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateStaffCourse(vars: UpdateStaffCourseVariables): MutationPromise; + +interface UpdateStaffCourseRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateStaffCourseVariables): MutationRef; +} +export const updateStaffCourseRef: UpdateStaffCourseRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateStaffCourse(dc: DataConnect, vars: UpdateStaffCourseVariables): MutationPromise; + +interface UpdateStaffCourseRef { + ... + (dc: DataConnect, vars: UpdateStaffCourseVariables): MutationRef; +} +export const updateStaffCourseRef: UpdateStaffCourseRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateStaffCourseRef: +```typescript +const name = updateStaffCourseRef.operationName; +console.log(name); +``` + +### Variables +The `updateStaffCourse` mutation requires an argument of type `UpdateStaffCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateStaffCourseVariables { + id: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `updateStaffCourse` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateStaffCourseData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateStaffCourseData { + staffCourse_update?: StaffCourse_Key | null; +} +``` +### Using `updateStaffCourse`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateStaffCourse, UpdateStaffCourseVariables } from '@dataconnect/generated'; + +// The `updateStaffCourse` mutation requires an argument of type `UpdateStaffCourseVariables`: +const updateStaffCourseVars: UpdateStaffCourseVariables = { + id: ..., + progressPercent: ..., // optional + completed: ..., // optional + completedAt: ..., // optional + startedAt: ..., // optional + lastAccessedAt: ..., // optional +}; + +// Call the `updateStaffCourse()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateStaffCourse(updateStaffCourseVars); +// Variables can be defined inline as well. +const { data } = await updateStaffCourse({ id: ..., progressPercent: ..., completed: ..., completedAt: ..., startedAt: ..., lastAccessedAt: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateStaffCourse(dataConnect, updateStaffCourseVars); + +console.log(data.staffCourse_update); + +// Or, you can use the `Promise` API. +updateStaffCourse(updateStaffCourseVars).then((response) => { + const data = response.data; + console.log(data.staffCourse_update); +}); +``` + +### Using `updateStaffCourse`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateStaffCourseRef, UpdateStaffCourseVariables } from '@dataconnect/generated'; + +// The `updateStaffCourse` mutation requires an argument of type `UpdateStaffCourseVariables`: +const updateStaffCourseVars: UpdateStaffCourseVariables = { + id: ..., + progressPercent: ..., // optional + completed: ..., // optional + completedAt: ..., // optional + startedAt: ..., // optional + lastAccessedAt: ..., // optional +}; + +// Call the `updateStaffCourseRef()` function to get a reference to the mutation. +const ref = updateStaffCourseRef(updateStaffCourseVars); +// Variables can be defined inline as well. +const ref = updateStaffCourseRef({ id: ..., progressPercent: ..., completed: ..., completedAt: ..., startedAt: ..., lastAccessedAt: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateStaffCourseRef(dataConnect, updateStaffCourseVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffCourse_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffCourse_update); +}); +``` + +## deleteStaffCourse +You can execute the `deleteStaffCourse` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteStaffCourse(vars: DeleteStaffCourseVariables): MutationPromise; + +interface DeleteStaffCourseRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteStaffCourseVariables): MutationRef; +} +export const deleteStaffCourseRef: DeleteStaffCourseRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteStaffCourse(dc: DataConnect, vars: DeleteStaffCourseVariables): MutationPromise; + +interface DeleteStaffCourseRef { + ... + (dc: DataConnect, vars: DeleteStaffCourseVariables): MutationRef; +} +export const deleteStaffCourseRef: DeleteStaffCourseRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteStaffCourseRef: +```typescript +const name = deleteStaffCourseRef.operationName; +console.log(name); +``` + +### Variables +The `deleteStaffCourse` mutation requires an argument of type `DeleteStaffCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteStaffCourseVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteStaffCourse` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteStaffCourseData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteStaffCourseData { + staffCourse_delete?: StaffCourse_Key | null; +} +``` +### Using `deleteStaffCourse`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteStaffCourse, DeleteStaffCourseVariables } from '@dataconnect/generated'; + +// The `deleteStaffCourse` mutation requires an argument of type `DeleteStaffCourseVariables`: +const deleteStaffCourseVars: DeleteStaffCourseVariables = { + id: ..., +}; + +// Call the `deleteStaffCourse()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteStaffCourse(deleteStaffCourseVars); +// Variables can be defined inline as well. +const { data } = await deleteStaffCourse({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteStaffCourse(dataConnect, deleteStaffCourseVars); + +console.log(data.staffCourse_delete); + +// Or, you can use the `Promise` API. +deleteStaffCourse(deleteStaffCourseVars).then((response) => { + const data = response.data; + console.log(data.staffCourse_delete); +}); +``` + +### Using `deleteStaffCourse`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteStaffCourseRef, DeleteStaffCourseVariables } from '@dataconnect/generated'; + +// The `deleteStaffCourse` mutation requires an argument of type `DeleteStaffCourseVariables`: +const deleteStaffCourseVars: DeleteStaffCourseVariables = { + id: ..., +}; + +// Call the `deleteStaffCourseRef()` function to get a reference to the mutation. +const ref = deleteStaffCourseRef(deleteStaffCourseVars); +// Variables can be defined inline as well. +const ref = deleteStaffCourseRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteStaffCourseRef(dataConnect, deleteStaffCourseVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffCourse_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffCourse_delete); +}); +``` + +## createTask +You can execute the `createTask` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createTask(vars: CreateTaskVariables): MutationPromise; + +interface CreateTaskRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTaskVariables): MutationRef; +} +export const createTaskRef: CreateTaskRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createTask(dc: DataConnect, vars: CreateTaskVariables): MutationPromise; + +interface CreateTaskRef { + ... + (dc: DataConnect, vars: CreateTaskVariables): MutationRef; +} +export const createTaskRef: CreateTaskRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createTaskRef: +```typescript +const name = createTaskRef.operationName; +console.log(name); +``` + +### Variables +The `createTask` mutation requires an argument of type `CreateTaskVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateTaskVariables { + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + ownerId: UUIDString; +} +``` +### Return Type +Recall that executing the `createTask` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateTaskData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateTaskData { + task_insert: Task_Key; +} +``` +### Using `createTask`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createTask, CreateTaskVariables } from '@dataconnect/generated'; + +// The `createTask` mutation requires an argument of type `CreateTaskVariables`: +const createTaskVars: CreateTaskVariables = { + taskName: ..., + description: ..., // optional + priority: ..., + status: ..., + dueDate: ..., // optional + progress: ..., // optional + orderIndex: ..., // optional + commentCount: ..., // optional + attachmentCount: ..., // optional + files: ..., // optional + ownerId: ..., +}; + +// Call the `createTask()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createTask(createTaskVars); +// Variables can be defined inline as well. +const { data } = await createTask({ taskName: ..., description: ..., priority: ..., status: ..., dueDate: ..., progress: ..., orderIndex: ..., commentCount: ..., attachmentCount: ..., files: ..., ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createTask(dataConnect, createTaskVars); + +console.log(data.task_insert); + +// Or, you can use the `Promise` API. +createTask(createTaskVars).then((response) => { + const data = response.data; + console.log(data.task_insert); +}); +``` + +### Using `createTask`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createTaskRef, CreateTaskVariables } from '@dataconnect/generated'; + +// The `createTask` mutation requires an argument of type `CreateTaskVariables`: +const createTaskVars: CreateTaskVariables = { + taskName: ..., + description: ..., // optional + priority: ..., + status: ..., + dueDate: ..., // optional + progress: ..., // optional + orderIndex: ..., // optional + commentCount: ..., // optional + attachmentCount: ..., // optional + files: ..., // optional + ownerId: ..., +}; + +// Call the `createTaskRef()` function to get a reference to the mutation. +const ref = createTaskRef(createTaskVars); +// Variables can be defined inline as well. +const ref = createTaskRef({ taskName: ..., description: ..., priority: ..., status: ..., dueDate: ..., progress: ..., orderIndex: ..., commentCount: ..., attachmentCount: ..., files: ..., ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createTaskRef(dataConnect, createTaskVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.task_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.task_insert); +}); +``` + +## updateTask +You can execute the `updateTask` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateTask(vars: UpdateTaskVariables): MutationPromise; + +interface UpdateTaskRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTaskVariables): MutationRef; +} +export const updateTaskRef: UpdateTaskRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateTask(dc: DataConnect, vars: UpdateTaskVariables): MutationPromise; + +interface UpdateTaskRef { + ... + (dc: DataConnect, vars: UpdateTaskVariables): MutationRef; +} +export const updateTaskRef: UpdateTaskRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateTaskRef: +```typescript +const name = updateTaskRef.operationName; +console.log(name); +``` + +### Variables +The `updateTask` mutation requires an argument of type `UpdateTaskVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateTaskVariables { + id: UUIDString; + taskName?: string | null; + description?: string | null; + priority?: TaskPriority | null; + status?: TaskStatus | null; + dueDate?: TimestampString | null; + progress?: number | null; + assignedMembers?: unknown | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; +} +``` +### Return Type +Recall that executing the `updateTask` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateTaskData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateTaskData { + task_update?: Task_Key | null; +} +``` +### Using `updateTask`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateTask, UpdateTaskVariables } from '@dataconnect/generated'; + +// The `updateTask` mutation requires an argument of type `UpdateTaskVariables`: +const updateTaskVars: UpdateTaskVariables = { + id: ..., + taskName: ..., // optional + description: ..., // optional + priority: ..., // optional + status: ..., // optional + dueDate: ..., // optional + progress: ..., // optional + assignedMembers: ..., // optional + orderIndex: ..., // optional + commentCount: ..., // optional + attachmentCount: ..., // optional + files: ..., // optional +}; + +// Call the `updateTask()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateTask(updateTaskVars); +// Variables can be defined inline as well. +const { data } = await updateTask({ id: ..., taskName: ..., description: ..., priority: ..., status: ..., dueDate: ..., progress: ..., assignedMembers: ..., orderIndex: ..., commentCount: ..., attachmentCount: ..., files: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateTask(dataConnect, updateTaskVars); + +console.log(data.task_update); + +// Or, you can use the `Promise` API. +updateTask(updateTaskVars).then((response) => { + const data = response.data; + console.log(data.task_update); +}); +``` + +### Using `updateTask`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateTaskRef, UpdateTaskVariables } from '@dataconnect/generated'; + +// The `updateTask` mutation requires an argument of type `UpdateTaskVariables`: +const updateTaskVars: UpdateTaskVariables = { + id: ..., + taskName: ..., // optional + description: ..., // optional + priority: ..., // optional + status: ..., // optional + dueDate: ..., // optional + progress: ..., // optional + assignedMembers: ..., // optional + orderIndex: ..., // optional + commentCount: ..., // optional + attachmentCount: ..., // optional + files: ..., // optional +}; + +// Call the `updateTaskRef()` function to get a reference to the mutation. +const ref = updateTaskRef(updateTaskVars); +// Variables can be defined inline as well. +const ref = updateTaskRef({ id: ..., taskName: ..., description: ..., priority: ..., status: ..., dueDate: ..., progress: ..., assignedMembers: ..., orderIndex: ..., commentCount: ..., attachmentCount: ..., files: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateTaskRef(dataConnect, updateTaskVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.task_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.task_update); +}); +``` + +## deleteTask +You can execute the `deleteTask` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteTask(vars: DeleteTaskVariables): MutationPromise; + +interface DeleteTaskRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTaskVariables): MutationRef; +} +export const deleteTaskRef: DeleteTaskRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteTask(dc: DataConnect, vars: DeleteTaskVariables): MutationPromise; + +interface DeleteTaskRef { + ... + (dc: DataConnect, vars: DeleteTaskVariables): MutationRef; +} +export const deleteTaskRef: DeleteTaskRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteTaskRef: +```typescript +const name = deleteTaskRef.operationName; +console.log(name); +``` + +### Variables +The `deleteTask` mutation requires an argument of type `DeleteTaskVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteTaskVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteTask` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteTaskData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteTaskData { + task_delete?: Task_Key | null; +} +``` +### Using `deleteTask`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteTask, DeleteTaskVariables } from '@dataconnect/generated'; + +// The `deleteTask` mutation requires an argument of type `DeleteTaskVariables`: +const deleteTaskVars: DeleteTaskVariables = { + id: ..., +}; + +// Call the `deleteTask()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteTask(deleteTaskVars); +// Variables can be defined inline as well. +const { data } = await deleteTask({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteTask(dataConnect, deleteTaskVars); + +console.log(data.task_delete); + +// Or, you can use the `Promise` API. +deleteTask(deleteTaskVars).then((response) => { + const data = response.data; + console.log(data.task_delete); +}); +``` + +### Using `deleteTask`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteTaskRef, DeleteTaskVariables } from '@dataconnect/generated'; + +// The `deleteTask` mutation requires an argument of type `DeleteTaskVariables`: +const deleteTaskVars: DeleteTaskVariables = { + id: ..., +}; + +// Call the `deleteTaskRef()` function to get a reference to the mutation. +const ref = deleteTaskRef(deleteTaskVars); +// Variables can be defined inline as well. +const ref = deleteTaskRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteTaskRef(dataConnect, deleteTaskVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.task_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.task_delete); +}); +``` + +## CreateCertificate +You can execute the `CreateCertificate` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createCertificate(vars: CreateCertificateVariables): MutationPromise; + +interface CreateCertificateRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateCertificateVariables): MutationRef; +} +export const createCertificateRef: CreateCertificateRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createCertificate(dc: DataConnect, vars: CreateCertificateVariables): MutationPromise; + +interface CreateCertificateRef { + ... + (dc: DataConnect, vars: CreateCertificateVariables): MutationRef; +} +export const createCertificateRef: CreateCertificateRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createCertificateRef: +```typescript +const name = createCertificateRef.operationName; +console.log(name); +``` + +### Variables +The `CreateCertificate` mutation requires an argument of type `CreateCertificateVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateCertificateVariables { + name: string; + description?: string | null; + expiry?: TimestampString | null; + status: CertificateStatus; + fileUrl?: string | null; + icon?: string | null; + certificationType?: ComplianceType | null; + issuer?: string | null; + staffId: UUIDString; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; +} +``` +### Return Type +Recall that executing the `CreateCertificate` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateCertificateData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateCertificateData { + certificate_insert: Certificate_Key; +} +``` +### Using `CreateCertificate`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createCertificate, CreateCertificateVariables } from '@dataconnect/generated'; + +// The `CreateCertificate` mutation requires an argument of type `CreateCertificateVariables`: +const createCertificateVars: CreateCertificateVariables = { + name: ..., + description: ..., // optional + expiry: ..., // optional + status: ..., + fileUrl: ..., // optional + icon: ..., // optional + certificationType: ..., // optional + issuer: ..., // optional + staffId: ..., + validationStatus: ..., // optional + certificateNumber: ..., // optional +}; + +// Call the `createCertificate()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createCertificate(createCertificateVars); +// Variables can be defined inline as well. +const { data } = await createCertificate({ name: ..., description: ..., expiry: ..., status: ..., fileUrl: ..., icon: ..., certificationType: ..., issuer: ..., staffId: ..., validationStatus: ..., certificateNumber: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createCertificate(dataConnect, createCertificateVars); + +console.log(data.certificate_insert); + +// Or, you can use the `Promise` API. +createCertificate(createCertificateVars).then((response) => { + const data = response.data; + console.log(data.certificate_insert); +}); +``` + +### Using `CreateCertificate`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createCertificateRef, CreateCertificateVariables } from '@dataconnect/generated'; + +// The `CreateCertificate` mutation requires an argument of type `CreateCertificateVariables`: +const createCertificateVars: CreateCertificateVariables = { + name: ..., + description: ..., // optional + expiry: ..., // optional + status: ..., + fileUrl: ..., // optional + icon: ..., // optional + certificationType: ..., // optional + issuer: ..., // optional + staffId: ..., + validationStatus: ..., // optional + certificateNumber: ..., // optional +}; + +// Call the `createCertificateRef()` function to get a reference to the mutation. +const ref = createCertificateRef(createCertificateVars); +// Variables can be defined inline as well. +const ref = createCertificateRef({ name: ..., description: ..., expiry: ..., status: ..., fileUrl: ..., icon: ..., certificationType: ..., issuer: ..., staffId: ..., validationStatus: ..., certificateNumber: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createCertificateRef(dataConnect, createCertificateVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.certificate_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.certificate_insert); +}); +``` + +## UpdateCertificate +You can execute the `UpdateCertificate` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateCertificate(vars: UpdateCertificateVariables): MutationPromise; + +interface UpdateCertificateRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateCertificateVariables): MutationRef; +} +export const updateCertificateRef: UpdateCertificateRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateCertificate(dc: DataConnect, vars: UpdateCertificateVariables): MutationPromise; + +interface UpdateCertificateRef { + ... + (dc: DataConnect, vars: UpdateCertificateVariables): MutationRef; +} +export const updateCertificateRef: UpdateCertificateRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateCertificateRef: +```typescript +const name = updateCertificateRef.operationName; +console.log(name); +``` + +### Variables +The `UpdateCertificate` mutation requires an argument of type `UpdateCertificateVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateCertificateVariables { + id: UUIDString; + name?: string | null; + description?: string | null; + expiry?: TimestampString | null; + status?: CertificateStatus | null; + fileUrl?: string | null; + icon?: string | null; + staffId?: UUIDString | null; + certificationType?: ComplianceType | null; + issuer?: string | null; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; +} +``` +### Return Type +Recall that executing the `UpdateCertificate` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateCertificateData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateCertificateData { + certificate_update?: Certificate_Key | null; +} +``` +### Using `UpdateCertificate`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateCertificate, UpdateCertificateVariables } from '@dataconnect/generated'; + +// The `UpdateCertificate` mutation requires an argument of type `UpdateCertificateVariables`: +const updateCertificateVars: UpdateCertificateVariables = { + id: ..., + name: ..., // optional + description: ..., // optional + expiry: ..., // optional + status: ..., // optional + fileUrl: ..., // optional + icon: ..., // optional + staffId: ..., // optional + certificationType: ..., // optional + issuer: ..., // optional + validationStatus: ..., // optional + certificateNumber: ..., // optional +}; + +// Call the `updateCertificate()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateCertificate(updateCertificateVars); +// Variables can be defined inline as well. +const { data } = await updateCertificate({ id: ..., name: ..., description: ..., expiry: ..., status: ..., fileUrl: ..., icon: ..., staffId: ..., certificationType: ..., issuer: ..., validationStatus: ..., certificateNumber: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateCertificate(dataConnect, updateCertificateVars); + +console.log(data.certificate_update); + +// Or, you can use the `Promise` API. +updateCertificate(updateCertificateVars).then((response) => { + const data = response.data; + console.log(data.certificate_update); +}); +``` + +### Using `UpdateCertificate`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateCertificateRef, UpdateCertificateVariables } from '@dataconnect/generated'; + +// The `UpdateCertificate` mutation requires an argument of type `UpdateCertificateVariables`: +const updateCertificateVars: UpdateCertificateVariables = { + id: ..., + name: ..., // optional + description: ..., // optional + expiry: ..., // optional + status: ..., // optional + fileUrl: ..., // optional + icon: ..., // optional + staffId: ..., // optional + certificationType: ..., // optional + issuer: ..., // optional + validationStatus: ..., // optional + certificateNumber: ..., // optional +}; + +// Call the `updateCertificateRef()` function to get a reference to the mutation. +const ref = updateCertificateRef(updateCertificateVars); +// Variables can be defined inline as well. +const ref = updateCertificateRef({ id: ..., name: ..., description: ..., expiry: ..., status: ..., fileUrl: ..., icon: ..., staffId: ..., certificationType: ..., issuer: ..., validationStatus: ..., certificateNumber: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateCertificateRef(dataConnect, updateCertificateVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.certificate_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.certificate_update); +}); +``` + +## DeleteCertificate +You can execute the `DeleteCertificate` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteCertificate(vars: DeleteCertificateVariables): MutationPromise; + +interface DeleteCertificateRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteCertificateVariables): MutationRef; +} +export const deleteCertificateRef: DeleteCertificateRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteCertificate(dc: DataConnect, vars: DeleteCertificateVariables): MutationPromise; + +interface DeleteCertificateRef { + ... + (dc: DataConnect, vars: DeleteCertificateVariables): MutationRef; +} +export const deleteCertificateRef: DeleteCertificateRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteCertificateRef: +```typescript +const name = deleteCertificateRef.operationName; +console.log(name); +``` + +### Variables +The `DeleteCertificate` mutation requires an argument of type `DeleteCertificateVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteCertificateVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `DeleteCertificate` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteCertificateData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteCertificateData { + certificate_delete?: Certificate_Key | null; +} +``` +### Using `DeleteCertificate`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteCertificate, DeleteCertificateVariables } from '@dataconnect/generated'; + +// The `DeleteCertificate` mutation requires an argument of type `DeleteCertificateVariables`: +const deleteCertificateVars: DeleteCertificateVariables = { + id: ..., +}; + +// Call the `deleteCertificate()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteCertificate(deleteCertificateVars); +// Variables can be defined inline as well. +const { data } = await deleteCertificate({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteCertificate(dataConnect, deleteCertificateVars); + +console.log(data.certificate_delete); + +// Or, you can use the `Promise` API. +deleteCertificate(deleteCertificateVars).then((response) => { + const data = response.data; + console.log(data.certificate_delete); +}); +``` + +### Using `DeleteCertificate`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteCertificateRef, DeleteCertificateVariables } from '@dataconnect/generated'; + +// The `DeleteCertificate` mutation requires an argument of type `DeleteCertificateVariables`: +const deleteCertificateVars: DeleteCertificateVariables = { + id: ..., +}; + +// Call the `deleteCertificateRef()` function to get a reference to the mutation. +const ref = deleteCertificateRef(deleteCertificateVars); +// Variables can be defined inline as well. +const ref = deleteCertificateRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteCertificateRef(dataConnect, deleteCertificateVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.certificate_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.certificate_delete); +}); +``` + +## createRole +You can execute the `createRole` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createRole(vars: CreateRoleVariables): MutationPromise; + +interface CreateRoleRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateRoleVariables): MutationRef; +} +export const createRoleRef: CreateRoleRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createRole(dc: DataConnect, vars: CreateRoleVariables): MutationPromise; + +interface CreateRoleRef { + ... + (dc: DataConnect, vars: CreateRoleVariables): MutationRef; +} +export const createRoleRef: CreateRoleRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createRoleRef: +```typescript +const name = createRoleRef.operationName; +console.log(name); +``` + +### Variables +The `createRole` mutation requires an argument of type `CreateRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateRoleVariables { + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; +} +``` +### Return Type +Recall that executing the `createRole` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateRoleData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateRoleData { + role_insert: Role_Key; +} +``` +### Using `createRole`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createRole, CreateRoleVariables } from '@dataconnect/generated'; + +// The `createRole` mutation requires an argument of type `CreateRoleVariables`: +const createRoleVars: CreateRoleVariables = { + name: ..., + costPerHour: ..., + vendorId: ..., + roleCategoryId: ..., +}; + +// Call the `createRole()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createRole(createRoleVars); +// Variables can be defined inline as well. +const { data } = await createRole({ name: ..., costPerHour: ..., vendorId: ..., roleCategoryId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createRole(dataConnect, createRoleVars); + +console.log(data.role_insert); + +// Or, you can use the `Promise` API. +createRole(createRoleVars).then((response) => { + const data = response.data; + console.log(data.role_insert); +}); +``` + +### Using `createRole`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createRoleRef, CreateRoleVariables } from '@dataconnect/generated'; + +// The `createRole` mutation requires an argument of type `CreateRoleVariables`: +const createRoleVars: CreateRoleVariables = { + name: ..., + costPerHour: ..., + vendorId: ..., + roleCategoryId: ..., +}; + +// Call the `createRoleRef()` function to get a reference to the mutation. +const ref = createRoleRef(createRoleVars); +// Variables can be defined inline as well. +const ref = createRoleRef({ name: ..., costPerHour: ..., vendorId: ..., roleCategoryId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createRoleRef(dataConnect, createRoleVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.role_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.role_insert); +}); +``` + +## updateRole +You can execute the `updateRole` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateRole(vars: UpdateRoleVariables): MutationPromise; + +interface UpdateRoleRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateRoleVariables): MutationRef; +} +export const updateRoleRef: UpdateRoleRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateRole(dc: DataConnect, vars: UpdateRoleVariables): MutationPromise; + +interface UpdateRoleRef { + ... + (dc: DataConnect, vars: UpdateRoleVariables): MutationRef; +} +export const updateRoleRef: UpdateRoleRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateRoleRef: +```typescript +const name = updateRoleRef.operationName; +console.log(name); +``` + +### Variables +The `updateRole` mutation requires an argument of type `UpdateRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateRoleVariables { + id: UUIDString; + name?: string | null; + costPerHour?: number | null; + roleCategoryId: UUIDString; +} +``` +### Return Type +Recall that executing the `updateRole` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateRoleData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateRoleData { + role_update?: Role_Key | null; +} +``` +### Using `updateRole`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateRole, UpdateRoleVariables } from '@dataconnect/generated'; + +// The `updateRole` mutation requires an argument of type `UpdateRoleVariables`: +const updateRoleVars: UpdateRoleVariables = { + id: ..., + name: ..., // optional + costPerHour: ..., // optional + roleCategoryId: ..., +}; + +// Call the `updateRole()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateRole(updateRoleVars); +// Variables can be defined inline as well. +const { data } = await updateRole({ id: ..., name: ..., costPerHour: ..., roleCategoryId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateRole(dataConnect, updateRoleVars); + +console.log(data.role_update); + +// Or, you can use the `Promise` API. +updateRole(updateRoleVars).then((response) => { + const data = response.data; + console.log(data.role_update); +}); +``` + +### Using `updateRole`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateRoleRef, UpdateRoleVariables } from '@dataconnect/generated'; + +// The `updateRole` mutation requires an argument of type `UpdateRoleVariables`: +const updateRoleVars: UpdateRoleVariables = { + id: ..., + name: ..., // optional + costPerHour: ..., // optional + roleCategoryId: ..., +}; + +// Call the `updateRoleRef()` function to get a reference to the mutation. +const ref = updateRoleRef(updateRoleVars); +// Variables can be defined inline as well. +const ref = updateRoleRef({ id: ..., name: ..., costPerHour: ..., roleCategoryId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateRoleRef(dataConnect, updateRoleVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.role_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.role_update); +}); +``` + +## deleteRole +You can execute the `deleteRole` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteRole(vars: DeleteRoleVariables): MutationPromise; + +interface DeleteRoleRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteRoleVariables): MutationRef; +} +export const deleteRoleRef: DeleteRoleRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteRole(dc: DataConnect, vars: DeleteRoleVariables): MutationPromise; + +interface DeleteRoleRef { + ... + (dc: DataConnect, vars: DeleteRoleVariables): MutationRef; +} +export const deleteRoleRef: DeleteRoleRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteRoleRef: +```typescript +const name = deleteRoleRef.operationName; +console.log(name); +``` + +### Variables +The `deleteRole` mutation requires an argument of type `DeleteRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteRoleVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteRole` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteRoleData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteRoleData { + role_delete?: Role_Key | null; +} +``` +### Using `deleteRole`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteRole, DeleteRoleVariables } from '@dataconnect/generated'; + +// The `deleteRole` mutation requires an argument of type `DeleteRoleVariables`: +const deleteRoleVars: DeleteRoleVariables = { + id: ..., +}; + +// Call the `deleteRole()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteRole(deleteRoleVars); +// Variables can be defined inline as well. +const { data } = await deleteRole({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteRole(dataConnect, deleteRoleVars); + +console.log(data.role_delete); + +// Or, you can use the `Promise` API. +deleteRole(deleteRoleVars).then((response) => { + const data = response.data; + console.log(data.role_delete); +}); +``` + +### Using `deleteRole`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteRoleRef, DeleteRoleVariables } from '@dataconnect/generated'; + +// The `deleteRole` mutation requires an argument of type `DeleteRoleVariables`: +const deleteRoleVars: DeleteRoleVariables = { + id: ..., +}; + +// Call the `deleteRoleRef()` function to get a reference to the mutation. +const ref = deleteRoleRef(deleteRoleVars); +// Variables can be defined inline as well. +const ref = deleteRoleRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteRoleRef(dataConnect, deleteRoleVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.role_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.role_delete); +}); +``` + +## createClientFeedback +You can execute the `createClientFeedback` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createClientFeedback(vars: CreateClientFeedbackVariables): MutationPromise; + +interface CreateClientFeedbackRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateClientFeedbackVariables): MutationRef; +} +export const createClientFeedbackRef: CreateClientFeedbackRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createClientFeedback(dc: DataConnect, vars: CreateClientFeedbackVariables): MutationPromise; + +interface CreateClientFeedbackRef { + ... + (dc: DataConnect, vars: CreateClientFeedbackVariables): MutationRef; +} +export const createClientFeedbackRef: CreateClientFeedbackRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createClientFeedbackRef: +```typescript +const name = createClientFeedbackRef.operationName; +console.log(name); +``` + +### Variables +The `createClientFeedback` mutation requires an argument of type `CreateClientFeedbackVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateClientFeedbackVariables { + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdBy?: string | null; +} +``` +### Return Type +Recall that executing the `createClientFeedback` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateClientFeedbackData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateClientFeedbackData { + clientFeedback_insert: ClientFeedback_Key; +} +``` +### Using `createClientFeedback`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createClientFeedback, CreateClientFeedbackVariables } from '@dataconnect/generated'; + +// The `createClientFeedback` mutation requires an argument of type `CreateClientFeedbackVariables`: +const createClientFeedbackVars: CreateClientFeedbackVariables = { + businessId: ..., + vendorId: ..., + rating: ..., // optional + comment: ..., // optional + date: ..., // optional + createdBy: ..., // optional +}; + +// Call the `createClientFeedback()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createClientFeedback(createClientFeedbackVars); +// Variables can be defined inline as well. +const { data } = await createClientFeedback({ businessId: ..., vendorId: ..., rating: ..., comment: ..., date: ..., createdBy: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createClientFeedback(dataConnect, createClientFeedbackVars); + +console.log(data.clientFeedback_insert); + +// Or, you can use the `Promise` API. +createClientFeedback(createClientFeedbackVars).then((response) => { + const data = response.data; + console.log(data.clientFeedback_insert); +}); +``` + +### Using `createClientFeedback`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createClientFeedbackRef, CreateClientFeedbackVariables } from '@dataconnect/generated'; + +// The `createClientFeedback` mutation requires an argument of type `CreateClientFeedbackVariables`: +const createClientFeedbackVars: CreateClientFeedbackVariables = { + businessId: ..., + vendorId: ..., + rating: ..., // optional + comment: ..., // optional + date: ..., // optional + createdBy: ..., // optional +}; + +// Call the `createClientFeedbackRef()` function to get a reference to the mutation. +const ref = createClientFeedbackRef(createClientFeedbackVars); +// Variables can be defined inline as well. +const ref = createClientFeedbackRef({ businessId: ..., vendorId: ..., rating: ..., comment: ..., date: ..., createdBy: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createClientFeedbackRef(dataConnect, createClientFeedbackVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.clientFeedback_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.clientFeedback_insert); +}); +``` + +## updateClientFeedback +You can execute the `updateClientFeedback` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateClientFeedback(vars: UpdateClientFeedbackVariables): MutationPromise; + +interface UpdateClientFeedbackRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateClientFeedbackVariables): MutationRef; +} +export const updateClientFeedbackRef: UpdateClientFeedbackRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateClientFeedback(dc: DataConnect, vars: UpdateClientFeedbackVariables): MutationPromise; + +interface UpdateClientFeedbackRef { + ... + (dc: DataConnect, vars: UpdateClientFeedbackVariables): MutationRef; +} +export const updateClientFeedbackRef: UpdateClientFeedbackRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateClientFeedbackRef: +```typescript +const name = updateClientFeedbackRef.operationName; +console.log(name); +``` + +### Variables +The `updateClientFeedback` mutation requires an argument of type `UpdateClientFeedbackVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateClientFeedbackVariables { + id: UUIDString; + businessId?: UUIDString | null; + vendorId?: UUIDString | null; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdBy?: string | null; +} +``` +### Return Type +Recall that executing the `updateClientFeedback` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateClientFeedbackData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateClientFeedbackData { + clientFeedback_update?: ClientFeedback_Key | null; +} +``` +### Using `updateClientFeedback`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateClientFeedback, UpdateClientFeedbackVariables } from '@dataconnect/generated'; + +// The `updateClientFeedback` mutation requires an argument of type `UpdateClientFeedbackVariables`: +const updateClientFeedbackVars: UpdateClientFeedbackVariables = { + id: ..., + businessId: ..., // optional + vendorId: ..., // optional + rating: ..., // optional + comment: ..., // optional + date: ..., // optional + createdBy: ..., // optional +}; + +// Call the `updateClientFeedback()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateClientFeedback(updateClientFeedbackVars); +// Variables can be defined inline as well. +const { data } = await updateClientFeedback({ id: ..., businessId: ..., vendorId: ..., rating: ..., comment: ..., date: ..., createdBy: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateClientFeedback(dataConnect, updateClientFeedbackVars); + +console.log(data.clientFeedback_update); + +// Or, you can use the `Promise` API. +updateClientFeedback(updateClientFeedbackVars).then((response) => { + const data = response.data; + console.log(data.clientFeedback_update); +}); +``` + +### Using `updateClientFeedback`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateClientFeedbackRef, UpdateClientFeedbackVariables } from '@dataconnect/generated'; + +// The `updateClientFeedback` mutation requires an argument of type `UpdateClientFeedbackVariables`: +const updateClientFeedbackVars: UpdateClientFeedbackVariables = { + id: ..., + businessId: ..., // optional + vendorId: ..., // optional + rating: ..., // optional + comment: ..., // optional + date: ..., // optional + createdBy: ..., // optional +}; + +// Call the `updateClientFeedbackRef()` function to get a reference to the mutation. +const ref = updateClientFeedbackRef(updateClientFeedbackVars); +// Variables can be defined inline as well. +const ref = updateClientFeedbackRef({ id: ..., businessId: ..., vendorId: ..., rating: ..., comment: ..., date: ..., createdBy: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateClientFeedbackRef(dataConnect, updateClientFeedbackVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.clientFeedback_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.clientFeedback_update); +}); +``` + +## deleteClientFeedback +You can execute the `deleteClientFeedback` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteClientFeedback(vars: DeleteClientFeedbackVariables): MutationPromise; + +interface DeleteClientFeedbackRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteClientFeedbackVariables): MutationRef; +} +export const deleteClientFeedbackRef: DeleteClientFeedbackRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteClientFeedback(dc: DataConnect, vars: DeleteClientFeedbackVariables): MutationPromise; + +interface DeleteClientFeedbackRef { + ... + (dc: DataConnect, vars: DeleteClientFeedbackVariables): MutationRef; +} +export const deleteClientFeedbackRef: DeleteClientFeedbackRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteClientFeedbackRef: +```typescript +const name = deleteClientFeedbackRef.operationName; +console.log(name); +``` + +### Variables +The `deleteClientFeedback` mutation requires an argument of type `DeleteClientFeedbackVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteClientFeedbackVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteClientFeedback` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteClientFeedbackData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteClientFeedbackData { + clientFeedback_delete?: ClientFeedback_Key | null; +} +``` +### Using `deleteClientFeedback`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteClientFeedback, DeleteClientFeedbackVariables } from '@dataconnect/generated'; + +// The `deleteClientFeedback` mutation requires an argument of type `DeleteClientFeedbackVariables`: +const deleteClientFeedbackVars: DeleteClientFeedbackVariables = { + id: ..., +}; + +// Call the `deleteClientFeedback()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteClientFeedback(deleteClientFeedbackVars); +// Variables can be defined inline as well. +const { data } = await deleteClientFeedback({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteClientFeedback(dataConnect, deleteClientFeedbackVars); + +console.log(data.clientFeedback_delete); + +// Or, you can use the `Promise` API. +deleteClientFeedback(deleteClientFeedbackVars).then((response) => { + const data = response.data; + console.log(data.clientFeedback_delete); +}); +``` + +### Using `deleteClientFeedback`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteClientFeedbackRef, DeleteClientFeedbackVariables } from '@dataconnect/generated'; + +// The `deleteClientFeedback` mutation requires an argument of type `DeleteClientFeedbackVariables`: +const deleteClientFeedbackVars: DeleteClientFeedbackVariables = { + id: ..., +}; + +// Call the `deleteClientFeedbackRef()` function to get a reference to the mutation. +const ref = deleteClientFeedbackRef(deleteClientFeedbackVars); +// Variables can be defined inline as well. +const ref = deleteClientFeedbackRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteClientFeedbackRef(dataConnect, deleteClientFeedbackVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.clientFeedback_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.clientFeedback_delete); +}); +``` + +## createBusiness +You can execute the `createBusiness` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createBusiness(vars: CreateBusinessVariables): MutationPromise; + +interface CreateBusinessRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateBusinessVariables): MutationRef; +} +export const createBusinessRef: CreateBusinessRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createBusiness(dc: DataConnect, vars: CreateBusinessVariables): MutationPromise; + +interface CreateBusinessRef { + ... + (dc: DataConnect, vars: CreateBusinessVariables): MutationRef; +} +export const createBusinessRef: CreateBusinessRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createBusinessRef: +```typescript +const name = createBusinessRef.operationName; +console.log(name); +``` + +### Variables +The `createBusiness` mutation requires an argument of type `CreateBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateBusinessVariables { + businessName: string; + contactName?: string | null; + userId: string; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup: BusinessRateGroup; + status: BusinessStatus; + notes?: string | null; +} +``` +### Return Type +Recall that executing the `createBusiness` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateBusinessData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateBusinessData { + business_insert: Business_Key; +} +``` +### Using `createBusiness`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createBusiness, CreateBusinessVariables } from '@dataconnect/generated'; + +// The `createBusiness` mutation requires an argument of type `CreateBusinessVariables`: +const createBusinessVars: CreateBusinessVariables = { + businessName: ..., + contactName: ..., // optional + userId: ..., + companyLogoUrl: ..., // optional + phone: ..., // optional + email: ..., // optional + hubBuilding: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + area: ..., // optional + sector: ..., // optional + rateGroup: ..., + status: ..., + notes: ..., // optional +}; + +// Call the `createBusiness()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createBusiness(createBusinessVars); +// Variables can be defined inline as well. +const { data } = await createBusiness({ businessName: ..., contactName: ..., userId: ..., companyLogoUrl: ..., phone: ..., email: ..., hubBuilding: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., state: ..., street: ..., country: ..., zipCode: ..., area: ..., sector: ..., rateGroup: ..., status: ..., notes: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createBusiness(dataConnect, createBusinessVars); + +console.log(data.business_insert); + +// Or, you can use the `Promise` API. +createBusiness(createBusinessVars).then((response) => { + const data = response.data; + console.log(data.business_insert); +}); +``` + +### Using `createBusiness`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createBusinessRef, CreateBusinessVariables } from '@dataconnect/generated'; + +// The `createBusiness` mutation requires an argument of type `CreateBusinessVariables`: +const createBusinessVars: CreateBusinessVariables = { + businessName: ..., + contactName: ..., // optional + userId: ..., + companyLogoUrl: ..., // optional + phone: ..., // optional + email: ..., // optional + hubBuilding: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + area: ..., // optional + sector: ..., // optional + rateGroup: ..., + status: ..., + notes: ..., // optional +}; + +// Call the `createBusinessRef()` function to get a reference to the mutation. +const ref = createBusinessRef(createBusinessVars); +// Variables can be defined inline as well. +const ref = createBusinessRef({ businessName: ..., contactName: ..., userId: ..., companyLogoUrl: ..., phone: ..., email: ..., hubBuilding: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., state: ..., street: ..., country: ..., zipCode: ..., area: ..., sector: ..., rateGroup: ..., status: ..., notes: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createBusinessRef(dataConnect, createBusinessVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.business_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.business_insert); +}); +``` + +## updateBusiness +You can execute the `updateBusiness` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateBusiness(vars: UpdateBusinessVariables): MutationPromise; + +interface UpdateBusinessRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateBusinessVariables): MutationRef; +} +export const updateBusinessRef: UpdateBusinessRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateBusiness(dc: DataConnect, vars: UpdateBusinessVariables): MutationPromise; + +interface UpdateBusinessRef { + ... + (dc: DataConnect, vars: UpdateBusinessVariables): MutationRef; +} +export const updateBusinessRef: UpdateBusinessRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateBusinessRef: +```typescript +const name = updateBusinessRef.operationName; +console.log(name); +``` + +### Variables +The `updateBusiness` mutation requires an argument of type `UpdateBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateBusinessVariables { + id: UUIDString; + businessName?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup?: BusinessRateGroup | null; + status?: BusinessStatus | null; + notes?: string | null; +} +``` +### Return Type +Recall that executing the `updateBusiness` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateBusinessData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateBusinessData { + business_update?: Business_Key | null; +} +``` +### Using `updateBusiness`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateBusiness, UpdateBusinessVariables } from '@dataconnect/generated'; + +// The `updateBusiness` mutation requires an argument of type `UpdateBusinessVariables`: +const updateBusinessVars: UpdateBusinessVariables = { + id: ..., + businessName: ..., // optional + contactName: ..., // optional + companyLogoUrl: ..., // optional + phone: ..., // optional + email: ..., // optional + hubBuilding: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + area: ..., // optional + sector: ..., // optional + rateGroup: ..., // optional + status: ..., // optional + notes: ..., // optional +}; + +// Call the `updateBusiness()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateBusiness(updateBusinessVars); +// Variables can be defined inline as well. +const { data } = await updateBusiness({ id: ..., businessName: ..., contactName: ..., companyLogoUrl: ..., phone: ..., email: ..., hubBuilding: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., state: ..., street: ..., country: ..., zipCode: ..., area: ..., sector: ..., rateGroup: ..., status: ..., notes: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateBusiness(dataConnect, updateBusinessVars); + +console.log(data.business_update); + +// Or, you can use the `Promise` API. +updateBusiness(updateBusinessVars).then((response) => { + const data = response.data; + console.log(data.business_update); +}); +``` + +### Using `updateBusiness`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateBusinessRef, UpdateBusinessVariables } from '@dataconnect/generated'; + +// The `updateBusiness` mutation requires an argument of type `UpdateBusinessVariables`: +const updateBusinessVars: UpdateBusinessVariables = { + id: ..., + businessName: ..., // optional + contactName: ..., // optional + companyLogoUrl: ..., // optional + phone: ..., // optional + email: ..., // optional + hubBuilding: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + area: ..., // optional + sector: ..., // optional + rateGroup: ..., // optional + status: ..., // optional + notes: ..., // optional +}; + +// Call the `updateBusinessRef()` function to get a reference to the mutation. +const ref = updateBusinessRef(updateBusinessVars); +// Variables can be defined inline as well. +const ref = updateBusinessRef({ id: ..., businessName: ..., contactName: ..., companyLogoUrl: ..., phone: ..., email: ..., hubBuilding: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., state: ..., street: ..., country: ..., zipCode: ..., area: ..., sector: ..., rateGroup: ..., status: ..., notes: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateBusinessRef(dataConnect, updateBusinessVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.business_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.business_update); +}); +``` + +## deleteBusiness +You can execute the `deleteBusiness` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteBusiness(vars: DeleteBusinessVariables): MutationPromise; + +interface DeleteBusinessRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteBusinessVariables): MutationRef; +} +export const deleteBusinessRef: DeleteBusinessRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteBusiness(dc: DataConnect, vars: DeleteBusinessVariables): MutationPromise; + +interface DeleteBusinessRef { + ... + (dc: DataConnect, vars: DeleteBusinessVariables): MutationRef; +} +export const deleteBusinessRef: DeleteBusinessRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteBusinessRef: +```typescript +const name = deleteBusinessRef.operationName; +console.log(name); +``` + +### Variables +The `deleteBusiness` mutation requires an argument of type `DeleteBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteBusinessVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteBusiness` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteBusinessData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteBusinessData { + business_delete?: Business_Key | null; +} +``` +### Using `deleteBusiness`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteBusiness, DeleteBusinessVariables } from '@dataconnect/generated'; + +// The `deleteBusiness` mutation requires an argument of type `DeleteBusinessVariables`: +const deleteBusinessVars: DeleteBusinessVariables = { + id: ..., +}; + +// Call the `deleteBusiness()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteBusiness(deleteBusinessVars); +// Variables can be defined inline as well. +const { data } = await deleteBusiness({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteBusiness(dataConnect, deleteBusinessVars); + +console.log(data.business_delete); + +// Or, you can use the `Promise` API. +deleteBusiness(deleteBusinessVars).then((response) => { + const data = response.data; + console.log(data.business_delete); +}); +``` + +### Using `deleteBusiness`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteBusinessRef, DeleteBusinessVariables } from '@dataconnect/generated'; + +// The `deleteBusiness` mutation requires an argument of type `DeleteBusinessVariables`: +const deleteBusinessVars: DeleteBusinessVariables = { + id: ..., +}; + +// Call the `deleteBusinessRef()` function to get a reference to the mutation. +const ref = deleteBusinessRef(deleteBusinessVars); +// Variables can be defined inline as well. +const ref = deleteBusinessRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteBusinessRef(dataConnect, deleteBusinessVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.business_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.business_delete); +}); +``` + +## createConversation +You can execute the `createConversation` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createConversation(vars?: CreateConversationVariables): MutationPromise; + +interface CreateConversationRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars?: CreateConversationVariables): MutationRef; +} +export const createConversationRef: CreateConversationRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createConversation(dc: DataConnect, vars?: CreateConversationVariables): MutationPromise; + +interface CreateConversationRef { + ... + (dc: DataConnect, vars?: CreateConversationVariables): MutationRef; +} +export const createConversationRef: CreateConversationRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createConversationRef: +```typescript +const name = createConversationRef.operationName; +console.log(name); +``` + +### Variables +The `createConversation` mutation has an optional argument of type `CreateConversationVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateConversationVariables { + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `createConversation` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateConversationData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateConversationData { + conversation_insert: Conversation_Key; +} +``` +### Using `createConversation`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createConversation, CreateConversationVariables } from '@dataconnect/generated'; + +// The `createConversation` mutation has an optional argument of type `CreateConversationVariables`: +const createConversationVars: CreateConversationVariables = { + subject: ..., // optional + status: ..., // optional + conversationType: ..., // optional + isGroup: ..., // optional + groupName: ..., // optional + lastMessage: ..., // optional + lastMessageAt: ..., // optional +}; + +// Call the `createConversation()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createConversation(createConversationVars); +// Variables can be defined inline as well. +const { data } = await createConversation({ subject: ..., status: ..., conversationType: ..., isGroup: ..., groupName: ..., lastMessage: ..., lastMessageAt: ..., }); +// Since all variables are optional for this mutation, you can omit the `CreateConversationVariables` argument. +const { data } = await createConversation(); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createConversation(dataConnect, createConversationVars); + +console.log(data.conversation_insert); + +// Or, you can use the `Promise` API. +createConversation(createConversationVars).then((response) => { + const data = response.data; + console.log(data.conversation_insert); +}); +``` + +### Using `createConversation`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createConversationRef, CreateConversationVariables } from '@dataconnect/generated'; + +// The `createConversation` mutation has an optional argument of type `CreateConversationVariables`: +const createConversationVars: CreateConversationVariables = { + subject: ..., // optional + status: ..., // optional + conversationType: ..., // optional + isGroup: ..., // optional + groupName: ..., // optional + lastMessage: ..., // optional + lastMessageAt: ..., // optional +}; + +// Call the `createConversationRef()` function to get a reference to the mutation. +const ref = createConversationRef(createConversationVars); +// Variables can be defined inline as well. +const ref = createConversationRef({ subject: ..., status: ..., conversationType: ..., isGroup: ..., groupName: ..., lastMessage: ..., lastMessageAt: ..., }); +// Since all variables are optional for this mutation, you can omit the `CreateConversationVariables` argument. +const ref = createConversationRef(); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createConversationRef(dataConnect, createConversationVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.conversation_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.conversation_insert); +}); +``` + +## updateConversation +You can execute the `updateConversation` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateConversation(vars: UpdateConversationVariables): MutationPromise; + +interface UpdateConversationRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateConversationVariables): MutationRef; +} +export const updateConversationRef: UpdateConversationRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateConversation(dc: DataConnect, vars: UpdateConversationVariables): MutationPromise; + +interface UpdateConversationRef { + ... + (dc: DataConnect, vars: UpdateConversationVariables): MutationRef; +} +export const updateConversationRef: UpdateConversationRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateConversationRef: +```typescript +const name = updateConversationRef.operationName; +console.log(name); +``` + +### Variables +The `updateConversation` mutation requires an argument of type `UpdateConversationVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateConversationVariables { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `updateConversation` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateConversationData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateConversationData { + conversation_update?: Conversation_Key | null; +} +``` +### Using `updateConversation`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateConversation, UpdateConversationVariables } from '@dataconnect/generated'; + +// The `updateConversation` mutation requires an argument of type `UpdateConversationVariables`: +const updateConversationVars: UpdateConversationVariables = { + id: ..., + subject: ..., // optional + status: ..., // optional + conversationType: ..., // optional + isGroup: ..., // optional + groupName: ..., // optional + lastMessage: ..., // optional + lastMessageAt: ..., // optional +}; + +// Call the `updateConversation()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateConversation(updateConversationVars); +// Variables can be defined inline as well. +const { data } = await updateConversation({ id: ..., subject: ..., status: ..., conversationType: ..., isGroup: ..., groupName: ..., lastMessage: ..., lastMessageAt: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateConversation(dataConnect, updateConversationVars); + +console.log(data.conversation_update); + +// Or, you can use the `Promise` API. +updateConversation(updateConversationVars).then((response) => { + const data = response.data; + console.log(data.conversation_update); +}); +``` + +### Using `updateConversation`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateConversationRef, UpdateConversationVariables } from '@dataconnect/generated'; + +// The `updateConversation` mutation requires an argument of type `UpdateConversationVariables`: +const updateConversationVars: UpdateConversationVariables = { + id: ..., + subject: ..., // optional + status: ..., // optional + conversationType: ..., // optional + isGroup: ..., // optional + groupName: ..., // optional + lastMessage: ..., // optional + lastMessageAt: ..., // optional +}; + +// Call the `updateConversationRef()` function to get a reference to the mutation. +const ref = updateConversationRef(updateConversationVars); +// Variables can be defined inline as well. +const ref = updateConversationRef({ id: ..., subject: ..., status: ..., conversationType: ..., isGroup: ..., groupName: ..., lastMessage: ..., lastMessageAt: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateConversationRef(dataConnect, updateConversationVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.conversation_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.conversation_update); +}); +``` + +## updateConversationLastMessage +You can execute the `updateConversationLastMessage` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateConversationLastMessage(vars: UpdateConversationLastMessageVariables): MutationPromise; + +interface UpdateConversationLastMessageRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateConversationLastMessageVariables): MutationRef; +} +export const updateConversationLastMessageRef: UpdateConversationLastMessageRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateConversationLastMessage(dc: DataConnect, vars: UpdateConversationLastMessageVariables): MutationPromise; + +interface UpdateConversationLastMessageRef { + ... + (dc: DataConnect, vars: UpdateConversationLastMessageVariables): MutationRef; +} +export const updateConversationLastMessageRef: UpdateConversationLastMessageRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateConversationLastMessageRef: +```typescript +const name = updateConversationLastMessageRef.operationName; +console.log(name); +``` + +### Variables +The `updateConversationLastMessage` mutation requires an argument of type `UpdateConversationLastMessageVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateConversationLastMessageVariables { + id: UUIDString; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `updateConversationLastMessage` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateConversationLastMessageData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateConversationLastMessageData { + conversation_update?: Conversation_Key | null; +} +``` +### Using `updateConversationLastMessage`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateConversationLastMessage, UpdateConversationLastMessageVariables } from '@dataconnect/generated'; + +// The `updateConversationLastMessage` mutation requires an argument of type `UpdateConversationLastMessageVariables`: +const updateConversationLastMessageVars: UpdateConversationLastMessageVariables = { + id: ..., + lastMessage: ..., // optional + lastMessageAt: ..., // optional +}; + +// Call the `updateConversationLastMessage()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateConversationLastMessage(updateConversationLastMessageVars); +// Variables can be defined inline as well. +const { data } = await updateConversationLastMessage({ id: ..., lastMessage: ..., lastMessageAt: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateConversationLastMessage(dataConnect, updateConversationLastMessageVars); + +console.log(data.conversation_update); + +// Or, you can use the `Promise` API. +updateConversationLastMessage(updateConversationLastMessageVars).then((response) => { + const data = response.data; + console.log(data.conversation_update); +}); +``` + +### Using `updateConversationLastMessage`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateConversationLastMessageRef, UpdateConversationLastMessageVariables } from '@dataconnect/generated'; + +// The `updateConversationLastMessage` mutation requires an argument of type `UpdateConversationLastMessageVariables`: +const updateConversationLastMessageVars: UpdateConversationLastMessageVariables = { + id: ..., + lastMessage: ..., // optional + lastMessageAt: ..., // optional +}; + +// Call the `updateConversationLastMessageRef()` function to get a reference to the mutation. +const ref = updateConversationLastMessageRef(updateConversationLastMessageVars); +// Variables can be defined inline as well. +const ref = updateConversationLastMessageRef({ id: ..., lastMessage: ..., lastMessageAt: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateConversationLastMessageRef(dataConnect, updateConversationLastMessageVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.conversation_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.conversation_update); +}); +``` + +## deleteConversation +You can execute the `deleteConversation` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteConversation(vars: DeleteConversationVariables): MutationPromise; + +interface DeleteConversationRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteConversationVariables): MutationRef; +} +export const deleteConversationRef: DeleteConversationRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteConversation(dc: DataConnect, vars: DeleteConversationVariables): MutationPromise; + +interface DeleteConversationRef { + ... + (dc: DataConnect, vars: DeleteConversationVariables): MutationRef; +} +export const deleteConversationRef: DeleteConversationRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteConversationRef: +```typescript +const name = deleteConversationRef.operationName; +console.log(name); +``` + +### Variables +The `deleteConversation` mutation requires an argument of type `DeleteConversationVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteConversationVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteConversation` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteConversationData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteConversationData { + conversation_delete?: Conversation_Key | null; +} +``` +### Using `deleteConversation`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteConversation, DeleteConversationVariables } from '@dataconnect/generated'; + +// The `deleteConversation` mutation requires an argument of type `DeleteConversationVariables`: +const deleteConversationVars: DeleteConversationVariables = { + id: ..., +}; + +// Call the `deleteConversation()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteConversation(deleteConversationVars); +// Variables can be defined inline as well. +const { data } = await deleteConversation({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteConversation(dataConnect, deleteConversationVars); + +console.log(data.conversation_delete); + +// Or, you can use the `Promise` API. +deleteConversation(deleteConversationVars).then((response) => { + const data = response.data; + console.log(data.conversation_delete); +}); +``` + +### Using `deleteConversation`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteConversationRef, DeleteConversationVariables } from '@dataconnect/generated'; + +// The `deleteConversation` mutation requires an argument of type `DeleteConversationVariables`: +const deleteConversationVars: DeleteConversationVariables = { + id: ..., +}; + +// Call the `deleteConversationRef()` function to get a reference to the mutation. +const ref = deleteConversationRef(deleteConversationVars); +// Variables can be defined inline as well. +const ref = deleteConversationRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteConversationRef(dataConnect, deleteConversationVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.conversation_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.conversation_delete); +}); +``` + +## createCustomRateCard +You can execute the `createCustomRateCard` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createCustomRateCard(vars: CreateCustomRateCardVariables): MutationPromise; + +interface CreateCustomRateCardRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateCustomRateCardVariables): MutationRef; +} +export const createCustomRateCardRef: CreateCustomRateCardRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createCustomRateCard(dc: DataConnect, vars: CreateCustomRateCardVariables): MutationPromise; + +interface CreateCustomRateCardRef { + ... + (dc: DataConnect, vars: CreateCustomRateCardVariables): MutationRef; +} +export const createCustomRateCardRef: CreateCustomRateCardRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createCustomRateCardRef: +```typescript +const name = createCustomRateCardRef.operationName; +console.log(name); +``` + +### Variables +The `createCustomRateCard` mutation requires an argument of type `CreateCustomRateCardVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateCustomRateCardVariables { + name: string; + baseBook?: string | null; + discount?: number | null; + isDefault?: boolean | null; +} +``` +### Return Type +Recall that executing the `createCustomRateCard` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateCustomRateCardData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateCustomRateCardData { + customRateCard_insert: CustomRateCard_Key; +} +``` +### Using `createCustomRateCard`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createCustomRateCard, CreateCustomRateCardVariables } from '@dataconnect/generated'; + +// The `createCustomRateCard` mutation requires an argument of type `CreateCustomRateCardVariables`: +const createCustomRateCardVars: CreateCustomRateCardVariables = { + name: ..., + baseBook: ..., // optional + discount: ..., // optional + isDefault: ..., // optional +}; + +// Call the `createCustomRateCard()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createCustomRateCard(createCustomRateCardVars); +// Variables can be defined inline as well. +const { data } = await createCustomRateCard({ name: ..., baseBook: ..., discount: ..., isDefault: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createCustomRateCard(dataConnect, createCustomRateCardVars); + +console.log(data.customRateCard_insert); + +// Or, you can use the `Promise` API. +createCustomRateCard(createCustomRateCardVars).then((response) => { + const data = response.data; + console.log(data.customRateCard_insert); +}); +``` + +### Using `createCustomRateCard`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createCustomRateCardRef, CreateCustomRateCardVariables } from '@dataconnect/generated'; + +// The `createCustomRateCard` mutation requires an argument of type `CreateCustomRateCardVariables`: +const createCustomRateCardVars: CreateCustomRateCardVariables = { + name: ..., + baseBook: ..., // optional + discount: ..., // optional + isDefault: ..., // optional +}; + +// Call the `createCustomRateCardRef()` function to get a reference to the mutation. +const ref = createCustomRateCardRef(createCustomRateCardVars); +// Variables can be defined inline as well. +const ref = createCustomRateCardRef({ name: ..., baseBook: ..., discount: ..., isDefault: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createCustomRateCardRef(dataConnect, createCustomRateCardVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.customRateCard_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.customRateCard_insert); +}); +``` + +## updateCustomRateCard +You can execute the `updateCustomRateCard` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateCustomRateCard(vars: UpdateCustomRateCardVariables): MutationPromise; + +interface UpdateCustomRateCardRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateCustomRateCardVariables): MutationRef; +} +export const updateCustomRateCardRef: UpdateCustomRateCardRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateCustomRateCard(dc: DataConnect, vars: UpdateCustomRateCardVariables): MutationPromise; + +interface UpdateCustomRateCardRef { + ... + (dc: DataConnect, vars: UpdateCustomRateCardVariables): MutationRef; +} +export const updateCustomRateCardRef: UpdateCustomRateCardRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateCustomRateCardRef: +```typescript +const name = updateCustomRateCardRef.operationName; +console.log(name); +``` + +### Variables +The `updateCustomRateCard` mutation requires an argument of type `UpdateCustomRateCardVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateCustomRateCardVariables { + id: UUIDString; + name?: string | null; + baseBook?: string | null; + discount?: number | null; + isDefault?: boolean | null; +} +``` +### Return Type +Recall that executing the `updateCustomRateCard` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateCustomRateCardData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateCustomRateCardData { + customRateCard_update?: CustomRateCard_Key | null; +} +``` +### Using `updateCustomRateCard`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateCustomRateCard, UpdateCustomRateCardVariables } from '@dataconnect/generated'; + +// The `updateCustomRateCard` mutation requires an argument of type `UpdateCustomRateCardVariables`: +const updateCustomRateCardVars: UpdateCustomRateCardVariables = { + id: ..., + name: ..., // optional + baseBook: ..., // optional + discount: ..., // optional + isDefault: ..., // optional +}; + +// Call the `updateCustomRateCard()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateCustomRateCard(updateCustomRateCardVars); +// Variables can be defined inline as well. +const { data } = await updateCustomRateCard({ id: ..., name: ..., baseBook: ..., discount: ..., isDefault: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateCustomRateCard(dataConnect, updateCustomRateCardVars); + +console.log(data.customRateCard_update); + +// Or, you can use the `Promise` API. +updateCustomRateCard(updateCustomRateCardVars).then((response) => { + const data = response.data; + console.log(data.customRateCard_update); +}); +``` + +### Using `updateCustomRateCard`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateCustomRateCardRef, UpdateCustomRateCardVariables } from '@dataconnect/generated'; + +// The `updateCustomRateCard` mutation requires an argument of type `UpdateCustomRateCardVariables`: +const updateCustomRateCardVars: UpdateCustomRateCardVariables = { + id: ..., + name: ..., // optional + baseBook: ..., // optional + discount: ..., // optional + isDefault: ..., // optional +}; + +// Call the `updateCustomRateCardRef()` function to get a reference to the mutation. +const ref = updateCustomRateCardRef(updateCustomRateCardVars); +// Variables can be defined inline as well. +const ref = updateCustomRateCardRef({ id: ..., name: ..., baseBook: ..., discount: ..., isDefault: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateCustomRateCardRef(dataConnect, updateCustomRateCardVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.customRateCard_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.customRateCard_update); +}); +``` + +## deleteCustomRateCard +You can execute the `deleteCustomRateCard` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteCustomRateCard(vars: DeleteCustomRateCardVariables): MutationPromise; + +interface DeleteCustomRateCardRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteCustomRateCardVariables): MutationRef; +} +export const deleteCustomRateCardRef: DeleteCustomRateCardRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteCustomRateCard(dc: DataConnect, vars: DeleteCustomRateCardVariables): MutationPromise; + +interface DeleteCustomRateCardRef { + ... + (dc: DataConnect, vars: DeleteCustomRateCardVariables): MutationRef; +} +export const deleteCustomRateCardRef: DeleteCustomRateCardRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteCustomRateCardRef: +```typescript +const name = deleteCustomRateCardRef.operationName; +console.log(name); +``` + +### Variables +The `deleteCustomRateCard` mutation requires an argument of type `DeleteCustomRateCardVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteCustomRateCardVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteCustomRateCard` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteCustomRateCardData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteCustomRateCardData { + customRateCard_delete?: CustomRateCard_Key | null; +} +``` +### Using `deleteCustomRateCard`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteCustomRateCard, DeleteCustomRateCardVariables } from '@dataconnect/generated'; + +// The `deleteCustomRateCard` mutation requires an argument of type `DeleteCustomRateCardVariables`: +const deleteCustomRateCardVars: DeleteCustomRateCardVariables = { + id: ..., +}; + +// Call the `deleteCustomRateCard()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteCustomRateCard(deleteCustomRateCardVars); +// Variables can be defined inline as well. +const { data } = await deleteCustomRateCard({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteCustomRateCard(dataConnect, deleteCustomRateCardVars); + +console.log(data.customRateCard_delete); + +// Or, you can use the `Promise` API. +deleteCustomRateCard(deleteCustomRateCardVars).then((response) => { + const data = response.data; + console.log(data.customRateCard_delete); +}); +``` + +### Using `deleteCustomRateCard`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteCustomRateCardRef, DeleteCustomRateCardVariables } from '@dataconnect/generated'; + +// The `deleteCustomRateCard` mutation requires an argument of type `DeleteCustomRateCardVariables`: +const deleteCustomRateCardVars: DeleteCustomRateCardVariables = { + id: ..., +}; + +// Call the `deleteCustomRateCardRef()` function to get a reference to the mutation. +const ref = deleteCustomRateCardRef(deleteCustomRateCardVars); +// Variables can be defined inline as well. +const ref = deleteCustomRateCardRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteCustomRateCardRef(dataConnect, deleteCustomRateCardVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.customRateCard_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.customRateCard_delete); +}); +``` + +## createRecentPayment +You can execute the `createRecentPayment` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createRecentPayment(vars: CreateRecentPaymentVariables): MutationPromise; + +interface CreateRecentPaymentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateRecentPaymentVariables): MutationRef; +} +export const createRecentPaymentRef: CreateRecentPaymentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createRecentPayment(dc: DataConnect, vars: CreateRecentPaymentVariables): MutationPromise; + +interface CreateRecentPaymentRef { + ... + (dc: DataConnect, vars: CreateRecentPaymentVariables): MutationRef; +} +export const createRecentPaymentRef: CreateRecentPaymentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createRecentPaymentRef: +```typescript +const name = createRecentPaymentRef.operationName; +console.log(name); +``` + +### Variables +The `createRecentPayment` mutation requires an argument of type `CreateRecentPaymentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateRecentPaymentVariables { + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; +} +``` +### Return Type +Recall that executing the `createRecentPayment` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateRecentPaymentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateRecentPaymentData { + recentPayment_insert: RecentPayment_Key; +} +``` +### Using `createRecentPayment`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createRecentPayment, CreateRecentPaymentVariables } from '@dataconnect/generated'; + +// The `createRecentPayment` mutation requires an argument of type `CreateRecentPaymentVariables`: +const createRecentPaymentVars: CreateRecentPaymentVariables = { + workedTime: ..., // optional + status: ..., // optional + staffId: ..., + applicationId: ..., + invoiceId: ..., +}; + +// Call the `createRecentPayment()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createRecentPayment(createRecentPaymentVars); +// Variables can be defined inline as well. +const { data } = await createRecentPayment({ workedTime: ..., status: ..., staffId: ..., applicationId: ..., invoiceId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createRecentPayment(dataConnect, createRecentPaymentVars); + +console.log(data.recentPayment_insert); + +// Or, you can use the `Promise` API. +createRecentPayment(createRecentPaymentVars).then((response) => { + const data = response.data; + console.log(data.recentPayment_insert); +}); +``` + +### Using `createRecentPayment`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createRecentPaymentRef, CreateRecentPaymentVariables } from '@dataconnect/generated'; + +// The `createRecentPayment` mutation requires an argument of type `CreateRecentPaymentVariables`: +const createRecentPaymentVars: CreateRecentPaymentVariables = { + workedTime: ..., // optional + status: ..., // optional + staffId: ..., + applicationId: ..., + invoiceId: ..., +}; + +// Call the `createRecentPaymentRef()` function to get a reference to the mutation. +const ref = createRecentPaymentRef(createRecentPaymentVars); +// Variables can be defined inline as well. +const ref = createRecentPaymentRef({ workedTime: ..., status: ..., staffId: ..., applicationId: ..., invoiceId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createRecentPaymentRef(dataConnect, createRecentPaymentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.recentPayment_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.recentPayment_insert); +}); +``` + +## updateRecentPayment +You can execute the `updateRecentPayment` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateRecentPayment(vars: UpdateRecentPaymentVariables): MutationPromise; + +interface UpdateRecentPaymentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateRecentPaymentVariables): MutationRef; +} +export const updateRecentPaymentRef: UpdateRecentPaymentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateRecentPayment(dc: DataConnect, vars: UpdateRecentPaymentVariables): MutationPromise; + +interface UpdateRecentPaymentRef { + ... + (dc: DataConnect, vars: UpdateRecentPaymentVariables): MutationRef; +} +export const updateRecentPaymentRef: UpdateRecentPaymentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateRecentPaymentRef: +```typescript +const name = updateRecentPaymentRef.operationName; +console.log(name); +``` + +### Variables +The `updateRecentPayment` mutation requires an argument of type `UpdateRecentPaymentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateRecentPaymentVariables { + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId?: UUIDString | null; + applicationId?: UUIDString | null; + invoiceId?: UUIDString | null; +} +``` +### Return Type +Recall that executing the `updateRecentPayment` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateRecentPaymentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateRecentPaymentData { + recentPayment_update?: RecentPayment_Key | null; +} +``` +### Using `updateRecentPayment`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateRecentPayment, UpdateRecentPaymentVariables } from '@dataconnect/generated'; + +// The `updateRecentPayment` mutation requires an argument of type `UpdateRecentPaymentVariables`: +const updateRecentPaymentVars: UpdateRecentPaymentVariables = { + id: ..., + workedTime: ..., // optional + status: ..., // optional + staffId: ..., // optional + applicationId: ..., // optional + invoiceId: ..., // optional +}; + +// Call the `updateRecentPayment()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateRecentPayment(updateRecentPaymentVars); +// Variables can be defined inline as well. +const { data } = await updateRecentPayment({ id: ..., workedTime: ..., status: ..., staffId: ..., applicationId: ..., invoiceId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateRecentPayment(dataConnect, updateRecentPaymentVars); + +console.log(data.recentPayment_update); + +// Or, you can use the `Promise` API. +updateRecentPayment(updateRecentPaymentVars).then((response) => { + const data = response.data; + console.log(data.recentPayment_update); +}); +``` + +### Using `updateRecentPayment`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateRecentPaymentRef, UpdateRecentPaymentVariables } from '@dataconnect/generated'; + +// The `updateRecentPayment` mutation requires an argument of type `UpdateRecentPaymentVariables`: +const updateRecentPaymentVars: UpdateRecentPaymentVariables = { + id: ..., + workedTime: ..., // optional + status: ..., // optional + staffId: ..., // optional + applicationId: ..., // optional + invoiceId: ..., // optional +}; + +// Call the `updateRecentPaymentRef()` function to get a reference to the mutation. +const ref = updateRecentPaymentRef(updateRecentPaymentVars); +// Variables can be defined inline as well. +const ref = updateRecentPaymentRef({ id: ..., workedTime: ..., status: ..., staffId: ..., applicationId: ..., invoiceId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateRecentPaymentRef(dataConnect, updateRecentPaymentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.recentPayment_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.recentPayment_update); +}); +``` + +## deleteRecentPayment +You can execute the `deleteRecentPayment` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteRecentPayment(vars: DeleteRecentPaymentVariables): MutationPromise; + +interface DeleteRecentPaymentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteRecentPaymentVariables): MutationRef; +} +export const deleteRecentPaymentRef: DeleteRecentPaymentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteRecentPayment(dc: DataConnect, vars: DeleteRecentPaymentVariables): MutationPromise; + +interface DeleteRecentPaymentRef { + ... + (dc: DataConnect, vars: DeleteRecentPaymentVariables): MutationRef; +} +export const deleteRecentPaymentRef: DeleteRecentPaymentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteRecentPaymentRef: +```typescript +const name = deleteRecentPaymentRef.operationName; +console.log(name); +``` + +### Variables +The `deleteRecentPayment` mutation requires an argument of type `DeleteRecentPaymentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteRecentPaymentVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteRecentPayment` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteRecentPaymentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteRecentPaymentData { + recentPayment_delete?: RecentPayment_Key | null; +} +``` +### Using `deleteRecentPayment`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteRecentPayment, DeleteRecentPaymentVariables } from '@dataconnect/generated'; + +// The `deleteRecentPayment` mutation requires an argument of type `DeleteRecentPaymentVariables`: +const deleteRecentPaymentVars: DeleteRecentPaymentVariables = { + id: ..., +}; + +// Call the `deleteRecentPayment()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteRecentPayment(deleteRecentPaymentVars); +// Variables can be defined inline as well. +const { data } = await deleteRecentPayment({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteRecentPayment(dataConnect, deleteRecentPaymentVars); + +console.log(data.recentPayment_delete); + +// Or, you can use the `Promise` API. +deleteRecentPayment(deleteRecentPaymentVars).then((response) => { + const data = response.data; + console.log(data.recentPayment_delete); +}); +``` + +### Using `deleteRecentPayment`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteRecentPaymentRef, DeleteRecentPaymentVariables } from '@dataconnect/generated'; + +// The `deleteRecentPayment` mutation requires an argument of type `DeleteRecentPaymentVariables`: +const deleteRecentPaymentVars: DeleteRecentPaymentVariables = { + id: ..., +}; + +// Call the `deleteRecentPaymentRef()` function to get a reference to the mutation. +const ref = deleteRecentPaymentRef(deleteRecentPaymentVars); +// Variables can be defined inline as well. +const ref = deleteRecentPaymentRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteRecentPaymentRef(dataConnect, deleteRecentPaymentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.recentPayment_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.recentPayment_delete); +}); +``` + +## CreateUser +You can execute the `CreateUser` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createUser(vars: CreateUserVariables): MutationPromise; + +interface CreateUserRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateUserVariables): MutationRef; +} +export const createUserRef: CreateUserRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createUser(dc: DataConnect, vars: CreateUserVariables): MutationPromise; + +interface CreateUserRef { + ... + (dc: DataConnect, vars: CreateUserVariables): MutationRef; +} +export const createUserRef: CreateUserRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createUserRef: +```typescript +const name = createUserRef.operationName; +console.log(name); +``` + +### Variables +The `CreateUser` mutation requires an argument of type `CreateUserVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateUserVariables { + id: string; + email?: string | null; + fullName?: string | null; + role: UserBaseRole; + userRole?: string | null; + photoUrl?: string | null; +} +``` +### Return Type +Recall that executing the `CreateUser` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateUserData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateUserData { + user_insert: User_Key; +} +``` +### Using `CreateUser`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createUser, CreateUserVariables } from '@dataconnect/generated'; + +// The `CreateUser` mutation requires an argument of type `CreateUserVariables`: +const createUserVars: CreateUserVariables = { + id: ..., + email: ..., // optional + fullName: ..., // optional + role: ..., + userRole: ..., // optional + photoUrl: ..., // optional +}; + +// Call the `createUser()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createUser(createUserVars); +// Variables can be defined inline as well. +const { data } = await createUser({ id: ..., email: ..., fullName: ..., role: ..., userRole: ..., photoUrl: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createUser(dataConnect, createUserVars); + +console.log(data.user_insert); + +// Or, you can use the `Promise` API. +createUser(createUserVars).then((response) => { + const data = response.data; + console.log(data.user_insert); +}); +``` + +### Using `CreateUser`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createUserRef, CreateUserVariables } from '@dataconnect/generated'; + +// The `CreateUser` mutation requires an argument of type `CreateUserVariables`: +const createUserVars: CreateUserVariables = { + id: ..., + email: ..., // optional + fullName: ..., // optional + role: ..., + userRole: ..., // optional + photoUrl: ..., // optional +}; + +// Call the `createUserRef()` function to get a reference to the mutation. +const ref = createUserRef(createUserVars); +// Variables can be defined inline as well. +const ref = createUserRef({ id: ..., email: ..., fullName: ..., role: ..., userRole: ..., photoUrl: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createUserRef(dataConnect, createUserVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.user_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.user_insert); +}); +``` + +## UpdateUser +You can execute the `UpdateUser` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateUser(vars: UpdateUserVariables): MutationPromise; + +interface UpdateUserRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateUserVariables): MutationRef; +} +export const updateUserRef: UpdateUserRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateUser(dc: DataConnect, vars: UpdateUserVariables): MutationPromise; + +interface UpdateUserRef { + ... + (dc: DataConnect, vars: UpdateUserVariables): MutationRef; +} +export const updateUserRef: UpdateUserRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateUserRef: +```typescript +const name = updateUserRef.operationName; +console.log(name); +``` + +### Variables +The `UpdateUser` mutation requires an argument of type `UpdateUserVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateUserVariables { + id: string; + email?: string | null; + fullName?: string | null; + role?: UserBaseRole | null; + userRole?: string | null; + photoUrl?: string | null; +} +``` +### Return Type +Recall that executing the `UpdateUser` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateUserData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateUserData { + user_update?: User_Key | null; +} +``` +### Using `UpdateUser`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateUser, UpdateUserVariables } from '@dataconnect/generated'; + +// The `UpdateUser` mutation requires an argument of type `UpdateUserVariables`: +const updateUserVars: UpdateUserVariables = { + id: ..., + email: ..., // optional + fullName: ..., // optional + role: ..., // optional + userRole: ..., // optional + photoUrl: ..., // optional +}; + +// Call the `updateUser()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateUser(updateUserVars); +// Variables can be defined inline as well. +const { data } = await updateUser({ id: ..., email: ..., fullName: ..., role: ..., userRole: ..., photoUrl: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateUser(dataConnect, updateUserVars); + +console.log(data.user_update); + +// Or, you can use the `Promise` API. +updateUser(updateUserVars).then((response) => { + const data = response.data; + console.log(data.user_update); +}); +``` + +### Using `UpdateUser`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateUserRef, UpdateUserVariables } from '@dataconnect/generated'; + +// The `UpdateUser` mutation requires an argument of type `UpdateUserVariables`: +const updateUserVars: UpdateUserVariables = { + id: ..., + email: ..., // optional + fullName: ..., // optional + role: ..., // optional + userRole: ..., // optional + photoUrl: ..., // optional +}; + +// Call the `updateUserRef()` function to get a reference to the mutation. +const ref = updateUserRef(updateUserVars); +// Variables can be defined inline as well. +const ref = updateUserRef({ id: ..., email: ..., fullName: ..., role: ..., userRole: ..., photoUrl: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateUserRef(dataConnect, updateUserVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.user_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.user_update); +}); +``` + +## DeleteUser +You can execute the `DeleteUser` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteUser(vars: DeleteUserVariables): MutationPromise; + +interface DeleteUserRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteUserVariables): MutationRef; +} +export const deleteUserRef: DeleteUserRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteUser(dc: DataConnect, vars: DeleteUserVariables): MutationPromise; + +interface DeleteUserRef { + ... + (dc: DataConnect, vars: DeleteUserVariables): MutationRef; +} +export const deleteUserRef: DeleteUserRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteUserRef: +```typescript +const name = deleteUserRef.operationName; +console.log(name); +``` + +### Variables +The `DeleteUser` mutation requires an argument of type `DeleteUserVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteUserVariables { + id: string; +} +``` +### Return Type +Recall that executing the `DeleteUser` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteUserData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteUserData { + user_delete?: User_Key | null; +} +``` +### Using `DeleteUser`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteUser, DeleteUserVariables } from '@dataconnect/generated'; + +// The `DeleteUser` mutation requires an argument of type `DeleteUserVariables`: +const deleteUserVars: DeleteUserVariables = { + id: ..., +}; + +// Call the `deleteUser()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteUser(deleteUserVars); +// Variables can be defined inline as well. +const { data } = await deleteUser({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteUser(dataConnect, deleteUserVars); + +console.log(data.user_delete); + +// Or, you can use the `Promise` API. +deleteUser(deleteUserVars).then((response) => { + const data = response.data; + console.log(data.user_delete); +}); +``` + +### Using `DeleteUser`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteUserRef, DeleteUserVariables } from '@dataconnect/generated'; + +// The `DeleteUser` mutation requires an argument of type `DeleteUserVariables`: +const deleteUserVars: DeleteUserVariables = { + id: ..., +}; + +// Call the `deleteUserRef()` function to get a reference to the mutation. +const ref = deleteUserRef(deleteUserVars); +// Variables can be defined inline as well. +const ref = deleteUserRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteUserRef(dataConnect, deleteUserVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.user_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.user_delete); +}); +``` + +## createVendor +You can execute the `createVendor` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createVendor(vars: CreateVendorVariables): MutationPromise; + +interface CreateVendorRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateVendorVariables): MutationRef; +} +export const createVendorRef: CreateVendorRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createVendor(dc: DataConnect, vars: CreateVendorVariables): MutationPromise; + +interface CreateVendorRef { + ... + (dc: DataConnect, vars: CreateVendorVariables): MutationRef; +} +export const createVendorRef: CreateVendorRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createVendorRef: +```typescript +const name = createVendorRef.operationName; +console.log(name); +``` + +### Variables +The `createVendor` mutation requires an argument of type `CreateVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateVendorVariables { + userId: string; + companyName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; +} +``` +### Return Type +Recall that executing the `createVendor` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateVendorData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateVendorData { + vendor_insert: Vendor_Key; +} +``` +### Using `createVendor`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createVendor, CreateVendorVariables } from '@dataconnect/generated'; + +// The `createVendor` mutation requires an argument of type `CreateVendorVariables`: +const createVendorVars: CreateVendorVariables = { + userId: ..., + companyName: ..., + email: ..., // optional + phone: ..., // optional + photoUrl: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + billingAddress: ..., // optional + timezone: ..., // optional + legalName: ..., // optional + doingBusinessAs: ..., // optional + region: ..., // optional + state: ..., // optional + city: ..., // optional + serviceSpecialty: ..., // optional + approvalStatus: ..., // optional + isActive: ..., // optional + markup: ..., // optional + fee: ..., // optional + csat: ..., // optional + tier: ..., // optional +}; + +// Call the `createVendor()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createVendor(createVendorVars); +// Variables can be defined inline as well. +const { data } = await createVendor({ userId: ..., companyName: ..., email: ..., phone: ..., photoUrl: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., street: ..., country: ..., zipCode: ..., billingAddress: ..., timezone: ..., legalName: ..., doingBusinessAs: ..., region: ..., state: ..., city: ..., serviceSpecialty: ..., approvalStatus: ..., isActive: ..., markup: ..., fee: ..., csat: ..., tier: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createVendor(dataConnect, createVendorVars); + +console.log(data.vendor_insert); + +// Or, you can use the `Promise` API. +createVendor(createVendorVars).then((response) => { + const data = response.data; + console.log(data.vendor_insert); +}); +``` + +### Using `createVendor`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createVendorRef, CreateVendorVariables } from '@dataconnect/generated'; + +// The `createVendor` mutation requires an argument of type `CreateVendorVariables`: +const createVendorVars: CreateVendorVariables = { + userId: ..., + companyName: ..., + email: ..., // optional + phone: ..., // optional + photoUrl: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + billingAddress: ..., // optional + timezone: ..., // optional + legalName: ..., // optional + doingBusinessAs: ..., // optional + region: ..., // optional + state: ..., // optional + city: ..., // optional + serviceSpecialty: ..., // optional + approvalStatus: ..., // optional + isActive: ..., // optional + markup: ..., // optional + fee: ..., // optional + csat: ..., // optional + tier: ..., // optional +}; + +// Call the `createVendorRef()` function to get a reference to the mutation. +const ref = createVendorRef(createVendorVars); +// Variables can be defined inline as well. +const ref = createVendorRef({ userId: ..., companyName: ..., email: ..., phone: ..., photoUrl: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., street: ..., country: ..., zipCode: ..., billingAddress: ..., timezone: ..., legalName: ..., doingBusinessAs: ..., region: ..., state: ..., city: ..., serviceSpecialty: ..., approvalStatus: ..., isActive: ..., markup: ..., fee: ..., csat: ..., tier: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createVendorRef(dataConnect, createVendorVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.vendor_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.vendor_insert); +}); +``` + +## updateVendor +You can execute the `updateVendor` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateVendor(vars: UpdateVendorVariables): MutationPromise; + +interface UpdateVendorRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateVendorVariables): MutationRef; +} +export const updateVendorRef: UpdateVendorRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateVendor(dc: DataConnect, vars: UpdateVendorVariables): MutationPromise; + +interface UpdateVendorRef { + ... + (dc: DataConnect, vars: UpdateVendorVariables): MutationRef; +} +export const updateVendorRef: UpdateVendorRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateVendorRef: +```typescript +const name = updateVendorRef.operationName; +console.log(name); +``` + +### Variables +The `updateVendor` mutation requires an argument of type `UpdateVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateVendorVariables { + id: UUIDString; + companyName?: string | null; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; +} +``` +### Return Type +Recall that executing the `updateVendor` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateVendorData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateVendorData { + vendor_update?: Vendor_Key | null; +} +``` +### Using `updateVendor`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateVendor, UpdateVendorVariables } from '@dataconnect/generated'; + +// The `updateVendor` mutation requires an argument of type `UpdateVendorVariables`: +const updateVendorVars: UpdateVendorVariables = { + id: ..., + companyName: ..., // optional + email: ..., // optional + phone: ..., // optional + photoUrl: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + billingAddress: ..., // optional + timezone: ..., // optional + legalName: ..., // optional + doingBusinessAs: ..., // optional + region: ..., // optional + state: ..., // optional + city: ..., // optional + serviceSpecialty: ..., // optional + approvalStatus: ..., // optional + isActive: ..., // optional + markup: ..., // optional + fee: ..., // optional + csat: ..., // optional + tier: ..., // optional +}; + +// Call the `updateVendor()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateVendor(updateVendorVars); +// Variables can be defined inline as well. +const { data } = await updateVendor({ id: ..., companyName: ..., email: ..., phone: ..., photoUrl: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., street: ..., country: ..., zipCode: ..., billingAddress: ..., timezone: ..., legalName: ..., doingBusinessAs: ..., region: ..., state: ..., city: ..., serviceSpecialty: ..., approvalStatus: ..., isActive: ..., markup: ..., fee: ..., csat: ..., tier: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateVendor(dataConnect, updateVendorVars); + +console.log(data.vendor_update); + +// Or, you can use the `Promise` API. +updateVendor(updateVendorVars).then((response) => { + const data = response.data; + console.log(data.vendor_update); +}); +``` + +### Using `updateVendor`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateVendorRef, UpdateVendorVariables } from '@dataconnect/generated'; + +// The `updateVendor` mutation requires an argument of type `UpdateVendorVariables`: +const updateVendorVars: UpdateVendorVariables = { + id: ..., + companyName: ..., // optional + email: ..., // optional + phone: ..., // optional + photoUrl: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + billingAddress: ..., // optional + timezone: ..., // optional + legalName: ..., // optional + doingBusinessAs: ..., // optional + region: ..., // optional + state: ..., // optional + city: ..., // optional + serviceSpecialty: ..., // optional + approvalStatus: ..., // optional + isActive: ..., // optional + markup: ..., // optional + fee: ..., // optional + csat: ..., // optional + tier: ..., // optional +}; + +// Call the `updateVendorRef()` function to get a reference to the mutation. +const ref = updateVendorRef(updateVendorVars); +// Variables can be defined inline as well. +const ref = updateVendorRef({ id: ..., companyName: ..., email: ..., phone: ..., photoUrl: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., street: ..., country: ..., zipCode: ..., billingAddress: ..., timezone: ..., legalName: ..., doingBusinessAs: ..., region: ..., state: ..., city: ..., serviceSpecialty: ..., approvalStatus: ..., isActive: ..., markup: ..., fee: ..., csat: ..., tier: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateVendorRef(dataConnect, updateVendorVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.vendor_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.vendor_update); +}); +``` + +## deleteVendor +You can execute the `deleteVendor` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteVendor(vars: DeleteVendorVariables): MutationPromise; + +interface DeleteVendorRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteVendorVariables): MutationRef; +} +export const deleteVendorRef: DeleteVendorRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteVendor(dc: DataConnect, vars: DeleteVendorVariables): MutationPromise; + +interface DeleteVendorRef { + ... + (dc: DataConnect, vars: DeleteVendorVariables): MutationRef; +} +export const deleteVendorRef: DeleteVendorRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteVendorRef: +```typescript +const name = deleteVendorRef.operationName; +console.log(name); +``` + +### Variables +The `deleteVendor` mutation requires an argument of type `DeleteVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteVendorVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteVendor` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteVendorData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteVendorData { + vendor_delete?: Vendor_Key | null; +} +``` +### Using `deleteVendor`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteVendor, DeleteVendorVariables } from '@dataconnect/generated'; + +// The `deleteVendor` mutation requires an argument of type `DeleteVendorVariables`: +const deleteVendorVars: DeleteVendorVariables = { + id: ..., +}; + +// Call the `deleteVendor()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteVendor(deleteVendorVars); +// Variables can be defined inline as well. +const { data } = await deleteVendor({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteVendor(dataConnect, deleteVendorVars); + +console.log(data.vendor_delete); + +// Or, you can use the `Promise` API. +deleteVendor(deleteVendorVars).then((response) => { + const data = response.data; + console.log(data.vendor_delete); +}); +``` + +### Using `deleteVendor`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteVendorRef, DeleteVendorVariables } from '@dataconnect/generated'; + +// The `deleteVendor` mutation requires an argument of type `DeleteVendorVariables`: +const deleteVendorVars: DeleteVendorVariables = { + id: ..., +}; + +// Call the `deleteVendorRef()` function to get a reference to the mutation. +const ref = deleteVendorRef(deleteVendorVars); +// Variables can be defined inline as well. +const ref = deleteVendorRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteVendorRef(dataConnect, deleteVendorVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.vendor_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.vendor_delete); +}); +``` + +## createDocument +You can execute the `createDocument` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createDocument(vars: CreateDocumentVariables): MutationPromise; + +interface CreateDocumentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateDocumentVariables): MutationRef; +} +export const createDocumentRef: CreateDocumentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createDocument(dc: DataConnect, vars: CreateDocumentVariables): MutationPromise; + +interface CreateDocumentRef { + ... + (dc: DataConnect, vars: CreateDocumentVariables): MutationRef; +} +export const createDocumentRef: CreateDocumentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createDocumentRef: +```typescript +const name = createDocumentRef.operationName; +console.log(name); +``` + +### Variables +The `createDocument` mutation requires an argument of type `CreateDocumentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateDocumentVariables { + documentType: DocumentType; + name: string; + description?: string | null; +} +``` +### Return Type +Recall that executing the `createDocument` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateDocumentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateDocumentData { + document_insert: Document_Key; +} +``` +### Using `createDocument`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createDocument, CreateDocumentVariables } from '@dataconnect/generated'; + +// The `createDocument` mutation requires an argument of type `CreateDocumentVariables`: +const createDocumentVars: CreateDocumentVariables = { + documentType: ..., + name: ..., + description: ..., // optional +}; + +// Call the `createDocument()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createDocument(createDocumentVars); +// Variables can be defined inline as well. +const { data } = await createDocument({ documentType: ..., name: ..., description: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createDocument(dataConnect, createDocumentVars); + +console.log(data.document_insert); + +// Or, you can use the `Promise` API. +createDocument(createDocumentVars).then((response) => { + const data = response.data; + console.log(data.document_insert); +}); +``` + +### Using `createDocument`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createDocumentRef, CreateDocumentVariables } from '@dataconnect/generated'; + +// The `createDocument` mutation requires an argument of type `CreateDocumentVariables`: +const createDocumentVars: CreateDocumentVariables = { + documentType: ..., + name: ..., + description: ..., // optional +}; + +// Call the `createDocumentRef()` function to get a reference to the mutation. +const ref = createDocumentRef(createDocumentVars); +// Variables can be defined inline as well. +const ref = createDocumentRef({ documentType: ..., name: ..., description: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createDocumentRef(dataConnect, createDocumentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.document_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.document_insert); +}); +``` + +## updateDocument +You can execute the `updateDocument` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateDocument(vars: UpdateDocumentVariables): MutationPromise; + +interface UpdateDocumentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateDocumentVariables): MutationRef; +} +export const updateDocumentRef: UpdateDocumentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateDocument(dc: DataConnect, vars: UpdateDocumentVariables): MutationPromise; + +interface UpdateDocumentRef { + ... + (dc: DataConnect, vars: UpdateDocumentVariables): MutationRef; +} +export const updateDocumentRef: UpdateDocumentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateDocumentRef: +```typescript +const name = updateDocumentRef.operationName; +console.log(name); +``` + +### Variables +The `updateDocument` mutation requires an argument of type `UpdateDocumentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateDocumentVariables { + id: UUIDString; + documentType?: DocumentType | null; + name?: string | null; + description?: string | null; +} +``` +### Return Type +Recall that executing the `updateDocument` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateDocumentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateDocumentData { + document_update?: Document_Key | null; +} +``` +### Using `updateDocument`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateDocument, UpdateDocumentVariables } from '@dataconnect/generated'; + +// The `updateDocument` mutation requires an argument of type `UpdateDocumentVariables`: +const updateDocumentVars: UpdateDocumentVariables = { + id: ..., + documentType: ..., // optional + name: ..., // optional + description: ..., // optional +}; + +// Call the `updateDocument()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateDocument(updateDocumentVars); +// Variables can be defined inline as well. +const { data } = await updateDocument({ id: ..., documentType: ..., name: ..., description: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateDocument(dataConnect, updateDocumentVars); + +console.log(data.document_update); + +// Or, you can use the `Promise` API. +updateDocument(updateDocumentVars).then((response) => { + const data = response.data; + console.log(data.document_update); +}); +``` + +### Using `updateDocument`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateDocumentRef, UpdateDocumentVariables } from '@dataconnect/generated'; + +// The `updateDocument` mutation requires an argument of type `UpdateDocumentVariables`: +const updateDocumentVars: UpdateDocumentVariables = { + id: ..., + documentType: ..., // optional + name: ..., // optional + description: ..., // optional +}; + +// Call the `updateDocumentRef()` function to get a reference to the mutation. +const ref = updateDocumentRef(updateDocumentVars); +// Variables can be defined inline as well. +const ref = updateDocumentRef({ id: ..., documentType: ..., name: ..., description: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateDocumentRef(dataConnect, updateDocumentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.document_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.document_update); +}); +``` + +## deleteDocument +You can execute the `deleteDocument` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteDocument(vars: DeleteDocumentVariables): MutationPromise; + +interface DeleteDocumentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteDocumentVariables): MutationRef; +} +export const deleteDocumentRef: DeleteDocumentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteDocument(dc: DataConnect, vars: DeleteDocumentVariables): MutationPromise; + +interface DeleteDocumentRef { + ... + (dc: DataConnect, vars: DeleteDocumentVariables): MutationRef; +} +export const deleteDocumentRef: DeleteDocumentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteDocumentRef: +```typescript +const name = deleteDocumentRef.operationName; +console.log(name); +``` + +### Variables +The `deleteDocument` mutation requires an argument of type `DeleteDocumentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteDocumentVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteDocument` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteDocumentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteDocumentData { + document_delete?: Document_Key | null; +} +``` +### Using `deleteDocument`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteDocument, DeleteDocumentVariables } from '@dataconnect/generated'; + +// The `deleteDocument` mutation requires an argument of type `DeleteDocumentVariables`: +const deleteDocumentVars: DeleteDocumentVariables = { + id: ..., +}; + +// Call the `deleteDocument()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteDocument(deleteDocumentVars); +// Variables can be defined inline as well. +const { data } = await deleteDocument({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteDocument(dataConnect, deleteDocumentVars); + +console.log(data.document_delete); + +// Or, you can use the `Promise` API. +deleteDocument(deleteDocumentVars).then((response) => { + const data = response.data; + console.log(data.document_delete); +}); +``` + +### Using `deleteDocument`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteDocumentRef, DeleteDocumentVariables } from '@dataconnect/generated'; + +// The `deleteDocument` mutation requires an argument of type `DeleteDocumentVariables`: +const deleteDocumentVars: DeleteDocumentVariables = { + id: ..., +}; + +// Call the `deleteDocumentRef()` function to get a reference to the mutation. +const ref = deleteDocumentRef(deleteDocumentVars); +// Variables can be defined inline as well. +const ref = deleteDocumentRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteDocumentRef(dataConnect, deleteDocumentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.document_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.document_delete); +}); +``` + +## createTaskComment +You can execute the `createTaskComment` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createTaskComment(vars: CreateTaskCommentVariables): MutationPromise; + +interface CreateTaskCommentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTaskCommentVariables): MutationRef; +} +export const createTaskCommentRef: CreateTaskCommentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createTaskComment(dc: DataConnect, vars: CreateTaskCommentVariables): MutationPromise; + +interface CreateTaskCommentRef { + ... + (dc: DataConnect, vars: CreateTaskCommentVariables): MutationRef; +} +export const createTaskCommentRef: CreateTaskCommentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createTaskCommentRef: +```typescript +const name = createTaskCommentRef.operationName; +console.log(name); +``` + +### Variables +The `createTaskComment` mutation requires an argument of type `CreateTaskCommentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateTaskCommentVariables { + taskId: UUIDString; + teamMemberId: UUIDString; + comment: string; + isSystem?: boolean | null; +} +``` +### Return Type +Recall that executing the `createTaskComment` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateTaskCommentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateTaskCommentData { + taskComment_insert: TaskComment_Key; +} +``` +### Using `createTaskComment`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createTaskComment, CreateTaskCommentVariables } from '@dataconnect/generated'; + +// The `createTaskComment` mutation requires an argument of type `CreateTaskCommentVariables`: +const createTaskCommentVars: CreateTaskCommentVariables = { + taskId: ..., + teamMemberId: ..., + comment: ..., + isSystem: ..., // optional +}; + +// Call the `createTaskComment()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createTaskComment(createTaskCommentVars); +// Variables can be defined inline as well. +const { data } = await createTaskComment({ taskId: ..., teamMemberId: ..., comment: ..., isSystem: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createTaskComment(dataConnect, createTaskCommentVars); + +console.log(data.taskComment_insert); + +// Or, you can use the `Promise` API. +createTaskComment(createTaskCommentVars).then((response) => { + const data = response.data; + console.log(data.taskComment_insert); +}); +``` + +### Using `createTaskComment`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createTaskCommentRef, CreateTaskCommentVariables } from '@dataconnect/generated'; + +// The `createTaskComment` mutation requires an argument of type `CreateTaskCommentVariables`: +const createTaskCommentVars: CreateTaskCommentVariables = { + taskId: ..., + teamMemberId: ..., + comment: ..., + isSystem: ..., // optional +}; + +// Call the `createTaskCommentRef()` function to get a reference to the mutation. +const ref = createTaskCommentRef(createTaskCommentVars); +// Variables can be defined inline as well. +const ref = createTaskCommentRef({ taskId: ..., teamMemberId: ..., comment: ..., isSystem: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createTaskCommentRef(dataConnect, createTaskCommentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.taskComment_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.taskComment_insert); +}); +``` + +## updateTaskComment +You can execute the `updateTaskComment` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateTaskComment(vars: UpdateTaskCommentVariables): MutationPromise; + +interface UpdateTaskCommentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTaskCommentVariables): MutationRef; +} +export const updateTaskCommentRef: UpdateTaskCommentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateTaskComment(dc: DataConnect, vars: UpdateTaskCommentVariables): MutationPromise; + +interface UpdateTaskCommentRef { + ... + (dc: DataConnect, vars: UpdateTaskCommentVariables): MutationRef; +} +export const updateTaskCommentRef: UpdateTaskCommentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateTaskCommentRef: +```typescript +const name = updateTaskCommentRef.operationName; +console.log(name); +``` + +### Variables +The `updateTaskComment` mutation requires an argument of type `UpdateTaskCommentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateTaskCommentVariables { + id: UUIDString; + comment?: string | null; + isSystem?: boolean | null; +} +``` +### Return Type +Recall that executing the `updateTaskComment` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateTaskCommentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateTaskCommentData { + taskComment_update?: TaskComment_Key | null; +} +``` +### Using `updateTaskComment`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateTaskComment, UpdateTaskCommentVariables } from '@dataconnect/generated'; + +// The `updateTaskComment` mutation requires an argument of type `UpdateTaskCommentVariables`: +const updateTaskCommentVars: UpdateTaskCommentVariables = { + id: ..., + comment: ..., // optional + isSystem: ..., // optional +}; + +// Call the `updateTaskComment()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateTaskComment(updateTaskCommentVars); +// Variables can be defined inline as well. +const { data } = await updateTaskComment({ id: ..., comment: ..., isSystem: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateTaskComment(dataConnect, updateTaskCommentVars); + +console.log(data.taskComment_update); + +// Or, you can use the `Promise` API. +updateTaskComment(updateTaskCommentVars).then((response) => { + const data = response.data; + console.log(data.taskComment_update); +}); +``` + +### Using `updateTaskComment`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateTaskCommentRef, UpdateTaskCommentVariables } from '@dataconnect/generated'; + +// The `updateTaskComment` mutation requires an argument of type `UpdateTaskCommentVariables`: +const updateTaskCommentVars: UpdateTaskCommentVariables = { + id: ..., + comment: ..., // optional + isSystem: ..., // optional +}; + +// Call the `updateTaskCommentRef()` function to get a reference to the mutation. +const ref = updateTaskCommentRef(updateTaskCommentVars); +// Variables can be defined inline as well. +const ref = updateTaskCommentRef({ id: ..., comment: ..., isSystem: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateTaskCommentRef(dataConnect, updateTaskCommentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.taskComment_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.taskComment_update); +}); +``` + +## deleteTaskComment +You can execute the `deleteTaskComment` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteTaskComment(vars: DeleteTaskCommentVariables): MutationPromise; + +interface DeleteTaskCommentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTaskCommentVariables): MutationRef; +} +export const deleteTaskCommentRef: DeleteTaskCommentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteTaskComment(dc: DataConnect, vars: DeleteTaskCommentVariables): MutationPromise; + +interface DeleteTaskCommentRef { + ... + (dc: DataConnect, vars: DeleteTaskCommentVariables): MutationRef; +} +export const deleteTaskCommentRef: DeleteTaskCommentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteTaskCommentRef: +```typescript +const name = deleteTaskCommentRef.operationName; +console.log(name); +``` + +### Variables +The `deleteTaskComment` mutation requires an argument of type `DeleteTaskCommentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteTaskCommentVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteTaskComment` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteTaskCommentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteTaskCommentData { + taskComment_delete?: TaskComment_Key | null; +} +``` +### Using `deleteTaskComment`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteTaskComment, DeleteTaskCommentVariables } from '@dataconnect/generated'; + +// The `deleteTaskComment` mutation requires an argument of type `DeleteTaskCommentVariables`: +const deleteTaskCommentVars: DeleteTaskCommentVariables = { + id: ..., +}; + +// Call the `deleteTaskComment()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteTaskComment(deleteTaskCommentVars); +// Variables can be defined inline as well. +const { data } = await deleteTaskComment({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteTaskComment(dataConnect, deleteTaskCommentVars); + +console.log(data.taskComment_delete); + +// Or, you can use the `Promise` API. +deleteTaskComment(deleteTaskCommentVars).then((response) => { + const data = response.data; + console.log(data.taskComment_delete); +}); +``` + +### Using `deleteTaskComment`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteTaskCommentRef, DeleteTaskCommentVariables } from '@dataconnect/generated'; + +// The `deleteTaskComment` mutation requires an argument of type `DeleteTaskCommentVariables`: +const deleteTaskCommentVars: DeleteTaskCommentVariables = { + id: ..., +}; + +// Call the `deleteTaskCommentRef()` function to get a reference to the mutation. +const ref = deleteTaskCommentRef(deleteTaskCommentVars); +// Variables can be defined inline as well. +const ref = deleteTaskCommentRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteTaskCommentRef(dataConnect, deleteTaskCommentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.taskComment_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.taskComment_delete); +}); +``` + +## createVendorBenefitPlan +You can execute the `createVendorBenefitPlan` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createVendorBenefitPlan(vars: CreateVendorBenefitPlanVariables): MutationPromise; + +interface CreateVendorBenefitPlanRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateVendorBenefitPlanVariables): MutationRef; +} +export const createVendorBenefitPlanRef: CreateVendorBenefitPlanRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createVendorBenefitPlan(dc: DataConnect, vars: CreateVendorBenefitPlanVariables): MutationPromise; + +interface CreateVendorBenefitPlanRef { + ... + (dc: DataConnect, vars: CreateVendorBenefitPlanVariables): MutationRef; +} +export const createVendorBenefitPlanRef: CreateVendorBenefitPlanRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createVendorBenefitPlanRef: +```typescript +const name = createVendorBenefitPlanRef.operationName; +console.log(name); +``` + +### Variables +The `createVendorBenefitPlan` mutation requires an argument of type `CreateVendorBenefitPlanVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateVendorBenefitPlanVariables { + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdBy?: string | null; +} +``` +### Return Type +Recall that executing the `createVendorBenefitPlan` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateVendorBenefitPlanData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateVendorBenefitPlanData { + vendorBenefitPlan_insert: VendorBenefitPlan_Key; +} +``` +### Using `createVendorBenefitPlan`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createVendorBenefitPlan, CreateVendorBenefitPlanVariables } from '@dataconnect/generated'; + +// The `createVendorBenefitPlan` mutation requires an argument of type `CreateVendorBenefitPlanVariables`: +const createVendorBenefitPlanVars: CreateVendorBenefitPlanVariables = { + vendorId: ..., + title: ..., + description: ..., // optional + requestLabel: ..., // optional + total: ..., // optional + isActive: ..., // optional + createdBy: ..., // optional +}; + +// Call the `createVendorBenefitPlan()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createVendorBenefitPlan(createVendorBenefitPlanVars); +// Variables can be defined inline as well. +const { data } = await createVendorBenefitPlan({ vendorId: ..., title: ..., description: ..., requestLabel: ..., total: ..., isActive: ..., createdBy: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createVendorBenefitPlan(dataConnect, createVendorBenefitPlanVars); + +console.log(data.vendorBenefitPlan_insert); + +// Or, you can use the `Promise` API. +createVendorBenefitPlan(createVendorBenefitPlanVars).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlan_insert); +}); +``` + +### Using `createVendorBenefitPlan`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createVendorBenefitPlanRef, CreateVendorBenefitPlanVariables } from '@dataconnect/generated'; + +// The `createVendorBenefitPlan` mutation requires an argument of type `CreateVendorBenefitPlanVariables`: +const createVendorBenefitPlanVars: CreateVendorBenefitPlanVariables = { + vendorId: ..., + title: ..., + description: ..., // optional + requestLabel: ..., // optional + total: ..., // optional + isActive: ..., // optional + createdBy: ..., // optional +}; + +// Call the `createVendorBenefitPlanRef()` function to get a reference to the mutation. +const ref = createVendorBenefitPlanRef(createVendorBenefitPlanVars); +// Variables can be defined inline as well. +const ref = createVendorBenefitPlanRef({ vendorId: ..., title: ..., description: ..., requestLabel: ..., total: ..., isActive: ..., createdBy: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createVendorBenefitPlanRef(dataConnect, createVendorBenefitPlanVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.vendorBenefitPlan_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlan_insert); +}); +``` + +## updateVendorBenefitPlan +You can execute the `updateVendorBenefitPlan` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateVendorBenefitPlan(vars: UpdateVendorBenefitPlanVariables): MutationPromise; + +interface UpdateVendorBenefitPlanRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateVendorBenefitPlanVariables): MutationRef; +} +export const updateVendorBenefitPlanRef: UpdateVendorBenefitPlanRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateVendorBenefitPlan(dc: DataConnect, vars: UpdateVendorBenefitPlanVariables): MutationPromise; + +interface UpdateVendorBenefitPlanRef { + ... + (dc: DataConnect, vars: UpdateVendorBenefitPlanVariables): MutationRef; +} +export const updateVendorBenefitPlanRef: UpdateVendorBenefitPlanRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateVendorBenefitPlanRef: +```typescript +const name = updateVendorBenefitPlanRef.operationName; +console.log(name); +``` + +### Variables +The `updateVendorBenefitPlan` mutation requires an argument of type `UpdateVendorBenefitPlanVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateVendorBenefitPlanVariables { + id: UUIDString; + vendorId?: UUIDString | null; + title?: string | null; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdBy?: string | null; +} +``` +### Return Type +Recall that executing the `updateVendorBenefitPlan` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateVendorBenefitPlanData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateVendorBenefitPlanData { + vendorBenefitPlan_update?: VendorBenefitPlan_Key | null; +} +``` +### Using `updateVendorBenefitPlan`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateVendorBenefitPlan, UpdateVendorBenefitPlanVariables } from '@dataconnect/generated'; + +// The `updateVendorBenefitPlan` mutation requires an argument of type `UpdateVendorBenefitPlanVariables`: +const updateVendorBenefitPlanVars: UpdateVendorBenefitPlanVariables = { + id: ..., + vendorId: ..., // optional + title: ..., // optional + description: ..., // optional + requestLabel: ..., // optional + total: ..., // optional + isActive: ..., // optional + createdBy: ..., // optional +}; + +// Call the `updateVendorBenefitPlan()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateVendorBenefitPlan(updateVendorBenefitPlanVars); +// Variables can be defined inline as well. +const { data } = await updateVendorBenefitPlan({ id: ..., vendorId: ..., title: ..., description: ..., requestLabel: ..., total: ..., isActive: ..., createdBy: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateVendorBenefitPlan(dataConnect, updateVendorBenefitPlanVars); + +console.log(data.vendorBenefitPlan_update); + +// Or, you can use the `Promise` API. +updateVendorBenefitPlan(updateVendorBenefitPlanVars).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlan_update); +}); +``` + +### Using `updateVendorBenefitPlan`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateVendorBenefitPlanRef, UpdateVendorBenefitPlanVariables } from '@dataconnect/generated'; + +// The `updateVendorBenefitPlan` mutation requires an argument of type `UpdateVendorBenefitPlanVariables`: +const updateVendorBenefitPlanVars: UpdateVendorBenefitPlanVariables = { + id: ..., + vendorId: ..., // optional + title: ..., // optional + description: ..., // optional + requestLabel: ..., // optional + total: ..., // optional + isActive: ..., // optional + createdBy: ..., // optional +}; + +// Call the `updateVendorBenefitPlanRef()` function to get a reference to the mutation. +const ref = updateVendorBenefitPlanRef(updateVendorBenefitPlanVars); +// Variables can be defined inline as well. +const ref = updateVendorBenefitPlanRef({ id: ..., vendorId: ..., title: ..., description: ..., requestLabel: ..., total: ..., isActive: ..., createdBy: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateVendorBenefitPlanRef(dataConnect, updateVendorBenefitPlanVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.vendorBenefitPlan_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlan_update); +}); +``` + +## deleteVendorBenefitPlan +You can execute the `deleteVendorBenefitPlan` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteVendorBenefitPlan(vars: DeleteVendorBenefitPlanVariables): MutationPromise; + +interface DeleteVendorBenefitPlanRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteVendorBenefitPlanVariables): MutationRef; +} +export const deleteVendorBenefitPlanRef: DeleteVendorBenefitPlanRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteVendorBenefitPlan(dc: DataConnect, vars: DeleteVendorBenefitPlanVariables): MutationPromise; + +interface DeleteVendorBenefitPlanRef { + ... + (dc: DataConnect, vars: DeleteVendorBenefitPlanVariables): MutationRef; +} +export const deleteVendorBenefitPlanRef: DeleteVendorBenefitPlanRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteVendorBenefitPlanRef: +```typescript +const name = deleteVendorBenefitPlanRef.operationName; +console.log(name); +``` + +### Variables +The `deleteVendorBenefitPlan` mutation requires an argument of type `DeleteVendorBenefitPlanVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteVendorBenefitPlanVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteVendorBenefitPlan` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteVendorBenefitPlanData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteVendorBenefitPlanData { + vendorBenefitPlan_delete?: VendorBenefitPlan_Key | null; +} +``` +### Using `deleteVendorBenefitPlan`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteVendorBenefitPlan, DeleteVendorBenefitPlanVariables } from '@dataconnect/generated'; + +// The `deleteVendorBenefitPlan` mutation requires an argument of type `DeleteVendorBenefitPlanVariables`: +const deleteVendorBenefitPlanVars: DeleteVendorBenefitPlanVariables = { + id: ..., +}; + +// Call the `deleteVendorBenefitPlan()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteVendorBenefitPlan(deleteVendorBenefitPlanVars); +// Variables can be defined inline as well. +const { data } = await deleteVendorBenefitPlan({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteVendorBenefitPlan(dataConnect, deleteVendorBenefitPlanVars); + +console.log(data.vendorBenefitPlan_delete); + +// Or, you can use the `Promise` API. +deleteVendorBenefitPlan(deleteVendorBenefitPlanVars).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlan_delete); +}); +``` + +### Using `deleteVendorBenefitPlan`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteVendorBenefitPlanRef, DeleteVendorBenefitPlanVariables } from '@dataconnect/generated'; + +// The `deleteVendorBenefitPlan` mutation requires an argument of type `DeleteVendorBenefitPlanVariables`: +const deleteVendorBenefitPlanVars: DeleteVendorBenefitPlanVariables = { + id: ..., +}; + +// Call the `deleteVendorBenefitPlanRef()` function to get a reference to the mutation. +const ref = deleteVendorBenefitPlanRef(deleteVendorBenefitPlanVars); +// Variables can be defined inline as well. +const ref = deleteVendorBenefitPlanRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteVendorBenefitPlanRef(dataConnect, deleteVendorBenefitPlanVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.vendorBenefitPlan_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.vendorBenefitPlan_delete); +}); +``` + +## createMessage +You can execute the `createMessage` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createMessage(vars: CreateMessageVariables): MutationPromise; + +interface CreateMessageRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateMessageVariables): MutationRef; +} +export const createMessageRef: CreateMessageRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createMessage(dc: DataConnect, vars: CreateMessageVariables): MutationPromise; + +interface CreateMessageRef { + ... + (dc: DataConnect, vars: CreateMessageVariables): MutationRef; +} +export const createMessageRef: CreateMessageRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createMessageRef: +```typescript +const name = createMessageRef.operationName; +console.log(name); +``` + +### Variables +The `createMessage` mutation requires an argument of type `CreateMessageVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateMessageVariables { + conversationId: UUIDString; + senderId: string; + content: string; + isSystem?: boolean | null; +} +``` +### Return Type +Recall that executing the `createMessage` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateMessageData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateMessageData { + message_insert: Message_Key; +} +``` +### Using `createMessage`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createMessage, CreateMessageVariables } from '@dataconnect/generated'; + +// The `createMessage` mutation requires an argument of type `CreateMessageVariables`: +const createMessageVars: CreateMessageVariables = { + conversationId: ..., + senderId: ..., + content: ..., + isSystem: ..., // optional +}; + +// Call the `createMessage()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createMessage(createMessageVars); +// Variables can be defined inline as well. +const { data } = await createMessage({ conversationId: ..., senderId: ..., content: ..., isSystem: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createMessage(dataConnect, createMessageVars); + +console.log(data.message_insert); + +// Or, you can use the `Promise` API. +createMessage(createMessageVars).then((response) => { + const data = response.data; + console.log(data.message_insert); +}); +``` + +### Using `createMessage`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createMessageRef, CreateMessageVariables } from '@dataconnect/generated'; + +// The `createMessage` mutation requires an argument of type `CreateMessageVariables`: +const createMessageVars: CreateMessageVariables = { + conversationId: ..., + senderId: ..., + content: ..., + isSystem: ..., // optional +}; + +// Call the `createMessageRef()` function to get a reference to the mutation. +const ref = createMessageRef(createMessageVars); +// Variables can be defined inline as well. +const ref = createMessageRef({ conversationId: ..., senderId: ..., content: ..., isSystem: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createMessageRef(dataConnect, createMessageVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.message_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.message_insert); +}); +``` + +## updateMessage +You can execute the `updateMessage` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateMessage(vars: UpdateMessageVariables): MutationPromise; + +interface UpdateMessageRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateMessageVariables): MutationRef; +} +export const updateMessageRef: UpdateMessageRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateMessage(dc: DataConnect, vars: UpdateMessageVariables): MutationPromise; + +interface UpdateMessageRef { + ... + (dc: DataConnect, vars: UpdateMessageVariables): MutationRef; +} +export const updateMessageRef: UpdateMessageRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateMessageRef: +```typescript +const name = updateMessageRef.operationName; +console.log(name); +``` + +### Variables +The `updateMessage` mutation requires an argument of type `UpdateMessageVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateMessageVariables { + id: UUIDString; + conversationId?: UUIDString | null; + senderId?: string | null; + content?: string | null; + isSystem?: boolean | null; +} +``` +### Return Type +Recall that executing the `updateMessage` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateMessageData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateMessageData { + message_update?: Message_Key | null; +} +``` +### Using `updateMessage`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateMessage, UpdateMessageVariables } from '@dataconnect/generated'; + +// The `updateMessage` mutation requires an argument of type `UpdateMessageVariables`: +const updateMessageVars: UpdateMessageVariables = { + id: ..., + conversationId: ..., // optional + senderId: ..., // optional + content: ..., // optional + isSystem: ..., // optional +}; + +// Call the `updateMessage()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateMessage(updateMessageVars); +// Variables can be defined inline as well. +const { data } = await updateMessage({ id: ..., conversationId: ..., senderId: ..., content: ..., isSystem: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateMessage(dataConnect, updateMessageVars); + +console.log(data.message_update); + +// Or, you can use the `Promise` API. +updateMessage(updateMessageVars).then((response) => { + const data = response.data; + console.log(data.message_update); +}); +``` + +### Using `updateMessage`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateMessageRef, UpdateMessageVariables } from '@dataconnect/generated'; + +// The `updateMessage` mutation requires an argument of type `UpdateMessageVariables`: +const updateMessageVars: UpdateMessageVariables = { + id: ..., + conversationId: ..., // optional + senderId: ..., // optional + content: ..., // optional + isSystem: ..., // optional +}; + +// Call the `updateMessageRef()` function to get a reference to the mutation. +const ref = updateMessageRef(updateMessageVars); +// Variables can be defined inline as well. +const ref = updateMessageRef({ id: ..., conversationId: ..., senderId: ..., content: ..., isSystem: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateMessageRef(dataConnect, updateMessageVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.message_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.message_update); +}); +``` + +## deleteMessage +You can execute the `deleteMessage` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteMessage(vars: DeleteMessageVariables): MutationPromise; + +interface DeleteMessageRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteMessageVariables): MutationRef; +} +export const deleteMessageRef: DeleteMessageRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteMessage(dc: DataConnect, vars: DeleteMessageVariables): MutationPromise; + +interface DeleteMessageRef { + ... + (dc: DataConnect, vars: DeleteMessageVariables): MutationRef; +} +export const deleteMessageRef: DeleteMessageRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteMessageRef: +```typescript +const name = deleteMessageRef.operationName; +console.log(name); +``` + +### Variables +The `deleteMessage` mutation requires an argument of type `DeleteMessageVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteMessageVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteMessage` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteMessageData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteMessageData { + message_delete?: Message_Key | null; +} +``` +### Using `deleteMessage`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteMessage, DeleteMessageVariables } from '@dataconnect/generated'; + +// The `deleteMessage` mutation requires an argument of type `DeleteMessageVariables`: +const deleteMessageVars: DeleteMessageVariables = { + id: ..., +}; + +// Call the `deleteMessage()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteMessage(deleteMessageVars); +// Variables can be defined inline as well. +const { data } = await deleteMessage({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteMessage(dataConnect, deleteMessageVars); + +console.log(data.message_delete); + +// Or, you can use the `Promise` API. +deleteMessage(deleteMessageVars).then((response) => { + const data = response.data; + console.log(data.message_delete); +}); +``` + +### Using `deleteMessage`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteMessageRef, DeleteMessageVariables } from '@dataconnect/generated'; + +// The `deleteMessage` mutation requires an argument of type `DeleteMessageVariables`: +const deleteMessageVars: DeleteMessageVariables = { + id: ..., +}; + +// Call the `deleteMessageRef()` function to get a reference to the mutation. +const ref = deleteMessageRef(deleteMessageVars); +// Variables can be defined inline as well. +const ref = deleteMessageRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteMessageRef(dataConnect, deleteMessageVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.message_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.message_delete); +}); +``` + +## createWorkforce +You can execute the `createWorkforce` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createWorkforce(vars: CreateWorkforceVariables): MutationPromise; + +interface CreateWorkforceRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateWorkforceVariables): MutationRef; +} +export const createWorkforceRef: CreateWorkforceRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createWorkforce(dc: DataConnect, vars: CreateWorkforceVariables): MutationPromise; + +interface CreateWorkforceRef { + ... + (dc: DataConnect, vars: CreateWorkforceVariables): MutationRef; +} +export const createWorkforceRef: CreateWorkforceRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createWorkforceRef: +```typescript +const name = createWorkforceRef.operationName; +console.log(name); +``` + +### Variables +The `createWorkforce` mutation requires an argument of type `CreateWorkforceVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateWorkforceVariables { + vendorId: UUIDString; + staffId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; +} +``` +### Return Type +Recall that executing the `createWorkforce` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateWorkforceData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateWorkforceData { + workforce_insert: Workforce_Key; +} +``` +### Using `createWorkforce`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createWorkforce, CreateWorkforceVariables } from '@dataconnect/generated'; + +// The `createWorkforce` mutation requires an argument of type `CreateWorkforceVariables`: +const createWorkforceVars: CreateWorkforceVariables = { + vendorId: ..., + staffId: ..., + workforceNumber: ..., + employmentType: ..., // optional +}; + +// Call the `createWorkforce()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createWorkforce(createWorkforceVars); +// Variables can be defined inline as well. +const { data } = await createWorkforce({ vendorId: ..., staffId: ..., workforceNumber: ..., employmentType: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createWorkforce(dataConnect, createWorkforceVars); + +console.log(data.workforce_insert); + +// Or, you can use the `Promise` API. +createWorkforce(createWorkforceVars).then((response) => { + const data = response.data; + console.log(data.workforce_insert); +}); +``` + +### Using `createWorkforce`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createWorkforceRef, CreateWorkforceVariables } from '@dataconnect/generated'; + +// The `createWorkforce` mutation requires an argument of type `CreateWorkforceVariables`: +const createWorkforceVars: CreateWorkforceVariables = { + vendorId: ..., + staffId: ..., + workforceNumber: ..., + employmentType: ..., // optional +}; + +// Call the `createWorkforceRef()` function to get a reference to the mutation. +const ref = createWorkforceRef(createWorkforceVars); +// Variables can be defined inline as well. +const ref = createWorkforceRef({ vendorId: ..., staffId: ..., workforceNumber: ..., employmentType: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createWorkforceRef(dataConnect, createWorkforceVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.workforce_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.workforce_insert); +}); +``` + +## updateWorkforce +You can execute the `updateWorkforce` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateWorkforce(vars: UpdateWorkforceVariables): MutationPromise; + +interface UpdateWorkforceRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateWorkforceVariables): MutationRef; +} +export const updateWorkforceRef: UpdateWorkforceRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateWorkforce(dc: DataConnect, vars: UpdateWorkforceVariables): MutationPromise; + +interface UpdateWorkforceRef { + ... + (dc: DataConnect, vars: UpdateWorkforceVariables): MutationRef; +} +export const updateWorkforceRef: UpdateWorkforceRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateWorkforceRef: +```typescript +const name = updateWorkforceRef.operationName; +console.log(name); +``` + +### Variables +The `updateWorkforce` mutation requires an argument of type `UpdateWorkforceVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateWorkforceVariables { + id: UUIDString; + workforceNumber?: string | null; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; +} +``` +### Return Type +Recall that executing the `updateWorkforce` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateWorkforceData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateWorkforceData { + workforce_update?: Workforce_Key | null; +} +``` +### Using `updateWorkforce`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateWorkforce, UpdateWorkforceVariables } from '@dataconnect/generated'; + +// The `updateWorkforce` mutation requires an argument of type `UpdateWorkforceVariables`: +const updateWorkforceVars: UpdateWorkforceVariables = { + id: ..., + workforceNumber: ..., // optional + employmentType: ..., // optional + status: ..., // optional +}; + +// Call the `updateWorkforce()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateWorkforce(updateWorkforceVars); +// Variables can be defined inline as well. +const { data } = await updateWorkforce({ id: ..., workforceNumber: ..., employmentType: ..., status: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateWorkforce(dataConnect, updateWorkforceVars); + +console.log(data.workforce_update); + +// Or, you can use the `Promise` API. +updateWorkforce(updateWorkforceVars).then((response) => { + const data = response.data; + console.log(data.workforce_update); +}); +``` + +### Using `updateWorkforce`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateWorkforceRef, UpdateWorkforceVariables } from '@dataconnect/generated'; + +// The `updateWorkforce` mutation requires an argument of type `UpdateWorkforceVariables`: +const updateWorkforceVars: UpdateWorkforceVariables = { + id: ..., + workforceNumber: ..., // optional + employmentType: ..., // optional + status: ..., // optional +}; + +// Call the `updateWorkforceRef()` function to get a reference to the mutation. +const ref = updateWorkforceRef(updateWorkforceVars); +// Variables can be defined inline as well. +const ref = updateWorkforceRef({ id: ..., workforceNumber: ..., employmentType: ..., status: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateWorkforceRef(dataConnect, updateWorkforceVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.workforce_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.workforce_update); +}); +``` + +## deactivateWorkforce +You can execute the `deactivateWorkforce` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deactivateWorkforce(vars: DeactivateWorkforceVariables): MutationPromise; + +interface DeactivateWorkforceRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeactivateWorkforceVariables): MutationRef; +} +export const deactivateWorkforceRef: DeactivateWorkforceRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deactivateWorkforce(dc: DataConnect, vars: DeactivateWorkforceVariables): MutationPromise; + +interface DeactivateWorkforceRef { + ... + (dc: DataConnect, vars: DeactivateWorkforceVariables): MutationRef; +} +export const deactivateWorkforceRef: DeactivateWorkforceRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deactivateWorkforceRef: +```typescript +const name = deactivateWorkforceRef.operationName; +console.log(name); +``` + +### Variables +The `deactivateWorkforce` mutation requires an argument of type `DeactivateWorkforceVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeactivateWorkforceVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deactivateWorkforce` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeactivateWorkforceData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeactivateWorkforceData { + workforce_update?: Workforce_Key | null; +} +``` +### Using `deactivateWorkforce`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deactivateWorkforce, DeactivateWorkforceVariables } from '@dataconnect/generated'; + +// The `deactivateWorkforce` mutation requires an argument of type `DeactivateWorkforceVariables`: +const deactivateWorkforceVars: DeactivateWorkforceVariables = { + id: ..., +}; + +// Call the `deactivateWorkforce()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deactivateWorkforce(deactivateWorkforceVars); +// Variables can be defined inline as well. +const { data } = await deactivateWorkforce({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deactivateWorkforce(dataConnect, deactivateWorkforceVars); + +console.log(data.workforce_update); + +// Or, you can use the `Promise` API. +deactivateWorkforce(deactivateWorkforceVars).then((response) => { + const data = response.data; + console.log(data.workforce_update); +}); +``` + +### Using `deactivateWorkforce`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deactivateWorkforceRef, DeactivateWorkforceVariables } from '@dataconnect/generated'; + +// The `deactivateWorkforce` mutation requires an argument of type `DeactivateWorkforceVariables`: +const deactivateWorkforceVars: DeactivateWorkforceVariables = { + id: ..., +}; + +// Call the `deactivateWorkforceRef()` function to get a reference to the mutation. +const ref = deactivateWorkforceRef(deactivateWorkforceVars); +// Variables can be defined inline as well. +const ref = deactivateWorkforceRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deactivateWorkforceRef(dataConnect, deactivateWorkforceVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.workforce_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.workforce_update); +}); +``` + +## createFaqData +You can execute the `createFaqData` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createFaqData(vars: CreateFaqDataVariables): MutationPromise; + +interface CreateFaqDataRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateFaqDataVariables): MutationRef; +} +export const createFaqDataRef: CreateFaqDataRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createFaqData(dc: DataConnect, vars: CreateFaqDataVariables): MutationPromise; + +interface CreateFaqDataRef { + ... + (dc: DataConnect, vars: CreateFaqDataVariables): MutationRef; +} +export const createFaqDataRef: CreateFaqDataRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createFaqDataRef: +```typescript +const name = createFaqDataRef.operationName; +console.log(name); +``` + +### Variables +The `createFaqData` mutation requires an argument of type `CreateFaqDataVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateFaqDataVariables { + category: string; + questions?: unknown[] | null; +} +``` +### Return Type +Recall that executing the `createFaqData` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateFaqDataData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateFaqDataData { + faqData_insert: FaqData_Key; +} +``` +### Using `createFaqData`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createFaqData, CreateFaqDataVariables } from '@dataconnect/generated'; + +// The `createFaqData` mutation requires an argument of type `CreateFaqDataVariables`: +const createFaqDataVars: CreateFaqDataVariables = { + category: ..., + questions: ..., // optional +}; + +// Call the `createFaqData()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createFaqData(createFaqDataVars); +// Variables can be defined inline as well. +const { data } = await createFaqData({ category: ..., questions: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createFaqData(dataConnect, createFaqDataVars); + +console.log(data.faqData_insert); + +// Or, you can use the `Promise` API. +createFaqData(createFaqDataVars).then((response) => { + const data = response.data; + console.log(data.faqData_insert); +}); +``` + +### Using `createFaqData`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createFaqDataRef, CreateFaqDataVariables } from '@dataconnect/generated'; + +// The `createFaqData` mutation requires an argument of type `CreateFaqDataVariables`: +const createFaqDataVars: CreateFaqDataVariables = { + category: ..., + questions: ..., // optional +}; + +// Call the `createFaqDataRef()` function to get a reference to the mutation. +const ref = createFaqDataRef(createFaqDataVars); +// Variables can be defined inline as well. +const ref = createFaqDataRef({ category: ..., questions: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createFaqDataRef(dataConnect, createFaqDataVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.faqData_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.faqData_insert); +}); +``` + +## updateFaqData +You can execute the `updateFaqData` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateFaqData(vars: UpdateFaqDataVariables): MutationPromise; + +interface UpdateFaqDataRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateFaqDataVariables): MutationRef; +} +export const updateFaqDataRef: UpdateFaqDataRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateFaqData(dc: DataConnect, vars: UpdateFaqDataVariables): MutationPromise; + +interface UpdateFaqDataRef { + ... + (dc: DataConnect, vars: UpdateFaqDataVariables): MutationRef; +} +export const updateFaqDataRef: UpdateFaqDataRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateFaqDataRef: +```typescript +const name = updateFaqDataRef.operationName; +console.log(name); +``` + +### Variables +The `updateFaqData` mutation requires an argument of type `UpdateFaqDataVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateFaqDataVariables { + id: UUIDString; + category?: string | null; + questions?: unknown[] | null; +} +``` +### Return Type +Recall that executing the `updateFaqData` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateFaqDataData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateFaqDataData { + faqData_update?: FaqData_Key | null; +} +``` +### Using `updateFaqData`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateFaqData, UpdateFaqDataVariables } from '@dataconnect/generated'; + +// The `updateFaqData` mutation requires an argument of type `UpdateFaqDataVariables`: +const updateFaqDataVars: UpdateFaqDataVariables = { + id: ..., + category: ..., // optional + questions: ..., // optional +}; + +// Call the `updateFaqData()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateFaqData(updateFaqDataVars); +// Variables can be defined inline as well. +const { data } = await updateFaqData({ id: ..., category: ..., questions: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateFaqData(dataConnect, updateFaqDataVars); + +console.log(data.faqData_update); + +// Or, you can use the `Promise` API. +updateFaqData(updateFaqDataVars).then((response) => { + const data = response.data; + console.log(data.faqData_update); +}); +``` + +### Using `updateFaqData`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateFaqDataRef, UpdateFaqDataVariables } from '@dataconnect/generated'; + +// The `updateFaqData` mutation requires an argument of type `UpdateFaqDataVariables`: +const updateFaqDataVars: UpdateFaqDataVariables = { + id: ..., + category: ..., // optional + questions: ..., // optional +}; + +// Call the `updateFaqDataRef()` function to get a reference to the mutation. +const ref = updateFaqDataRef(updateFaqDataVars); +// Variables can be defined inline as well. +const ref = updateFaqDataRef({ id: ..., category: ..., questions: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateFaqDataRef(dataConnect, updateFaqDataVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.faqData_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.faqData_update); +}); +``` + +## deleteFaqData +You can execute the `deleteFaqData` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteFaqData(vars: DeleteFaqDataVariables): MutationPromise; + +interface DeleteFaqDataRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteFaqDataVariables): MutationRef; +} +export const deleteFaqDataRef: DeleteFaqDataRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteFaqData(dc: DataConnect, vars: DeleteFaqDataVariables): MutationPromise; + +interface DeleteFaqDataRef { + ... + (dc: DataConnect, vars: DeleteFaqDataVariables): MutationRef; +} +export const deleteFaqDataRef: DeleteFaqDataRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteFaqDataRef: +```typescript +const name = deleteFaqDataRef.operationName; +console.log(name); +``` + +### Variables +The `deleteFaqData` mutation requires an argument of type `DeleteFaqDataVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteFaqDataVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteFaqData` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteFaqDataData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteFaqDataData { + faqData_delete?: FaqData_Key | null; +} +``` +### Using `deleteFaqData`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteFaqData, DeleteFaqDataVariables } from '@dataconnect/generated'; + +// The `deleteFaqData` mutation requires an argument of type `DeleteFaqDataVariables`: +const deleteFaqDataVars: DeleteFaqDataVariables = { + id: ..., +}; + +// Call the `deleteFaqData()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteFaqData(deleteFaqDataVars); +// Variables can be defined inline as well. +const { data } = await deleteFaqData({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteFaqData(dataConnect, deleteFaqDataVars); + +console.log(data.faqData_delete); + +// Or, you can use the `Promise` API. +deleteFaqData(deleteFaqDataVars).then((response) => { + const data = response.data; + console.log(data.faqData_delete); +}); +``` + +### Using `deleteFaqData`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteFaqDataRef, DeleteFaqDataVariables } from '@dataconnect/generated'; + +// The `deleteFaqData` mutation requires an argument of type `DeleteFaqDataVariables`: +const deleteFaqDataVars: DeleteFaqDataVariables = { + id: ..., +}; + +// Call the `deleteFaqDataRef()` function to get a reference to the mutation. +const ref = deleteFaqDataRef(deleteFaqDataVars); +// Variables can be defined inline as well. +const ref = deleteFaqDataRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteFaqDataRef(dataConnect, deleteFaqDataVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.faqData_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.faqData_delete); +}); +``` + +## createInvoice +You can execute the `createInvoice` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createInvoice(vars: CreateInvoiceVariables): MutationPromise; + +interface CreateInvoiceRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateInvoiceVariables): MutationRef; +} +export const createInvoiceRef: CreateInvoiceRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createInvoice(dc: DataConnect, vars: CreateInvoiceVariables): MutationPromise; + +interface CreateInvoiceRef { + ... + (dc: DataConnect, vars: CreateInvoiceVariables): MutationRef; +} +export const createInvoiceRef: CreateInvoiceRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createInvoiceRef: +```typescript +const name = createInvoiceRef.operationName; +console.log(name); +``` + +### Variables +The `createInvoice` mutation requires an argument of type `CreateInvoiceVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateInvoiceVariables { + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; +} +``` +### Return Type +Recall that executing the `createInvoice` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateInvoiceData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateInvoiceData { + invoice_insert: Invoice_Key; +} +``` +### Using `createInvoice`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createInvoice, CreateInvoiceVariables } from '@dataconnect/generated'; + +// The `createInvoice` mutation requires an argument of type `CreateInvoiceVariables`: +const createInvoiceVars: CreateInvoiceVariables = { + status: ..., + vendorId: ..., + businessId: ..., + orderId: ..., + paymentTerms: ..., // optional + invoiceNumber: ..., + issueDate: ..., + dueDate: ..., + hub: ..., // optional + managerName: ..., // optional + vendorNumber: ..., // optional + roles: ..., // optional + charges: ..., // optional + otherCharges: ..., // optional + subtotal: ..., // optional + amount: ..., + notes: ..., // optional + staffCount: ..., // optional + chargesCount: ..., // optional +}; + +// Call the `createInvoice()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createInvoice(createInvoiceVars); +// Variables can be defined inline as well. +const { data } = await createInvoice({ status: ..., vendorId: ..., businessId: ..., orderId: ..., paymentTerms: ..., invoiceNumber: ..., issueDate: ..., dueDate: ..., hub: ..., managerName: ..., vendorNumber: ..., roles: ..., charges: ..., otherCharges: ..., subtotal: ..., amount: ..., notes: ..., staffCount: ..., chargesCount: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createInvoice(dataConnect, createInvoiceVars); + +console.log(data.invoice_insert); + +// Or, you can use the `Promise` API. +createInvoice(createInvoiceVars).then((response) => { + const data = response.data; + console.log(data.invoice_insert); +}); +``` + +### Using `createInvoice`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createInvoiceRef, CreateInvoiceVariables } from '@dataconnect/generated'; + +// The `createInvoice` mutation requires an argument of type `CreateInvoiceVariables`: +const createInvoiceVars: CreateInvoiceVariables = { + status: ..., + vendorId: ..., + businessId: ..., + orderId: ..., + paymentTerms: ..., // optional + invoiceNumber: ..., + issueDate: ..., + dueDate: ..., + hub: ..., // optional + managerName: ..., // optional + vendorNumber: ..., // optional + roles: ..., // optional + charges: ..., // optional + otherCharges: ..., // optional + subtotal: ..., // optional + amount: ..., + notes: ..., // optional + staffCount: ..., // optional + chargesCount: ..., // optional +}; + +// Call the `createInvoiceRef()` function to get a reference to the mutation. +const ref = createInvoiceRef(createInvoiceVars); +// Variables can be defined inline as well. +const ref = createInvoiceRef({ status: ..., vendorId: ..., businessId: ..., orderId: ..., paymentTerms: ..., invoiceNumber: ..., issueDate: ..., dueDate: ..., hub: ..., managerName: ..., vendorNumber: ..., roles: ..., charges: ..., otherCharges: ..., subtotal: ..., amount: ..., notes: ..., staffCount: ..., chargesCount: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createInvoiceRef(dataConnect, createInvoiceVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.invoice_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.invoice_insert); +}); +``` + +## updateInvoice +You can execute the `updateInvoice` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateInvoice(vars: UpdateInvoiceVariables): MutationPromise; + +interface UpdateInvoiceRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateInvoiceVariables): MutationRef; +} +export const updateInvoiceRef: UpdateInvoiceRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateInvoice(dc: DataConnect, vars: UpdateInvoiceVariables): MutationPromise; + +interface UpdateInvoiceRef { + ... + (dc: DataConnect, vars: UpdateInvoiceVariables): MutationRef; +} +export const updateInvoiceRef: UpdateInvoiceRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateInvoiceRef: +```typescript +const name = updateInvoiceRef.operationName; +console.log(name); +``` + +### Variables +The `updateInvoice` mutation requires an argument of type `UpdateInvoiceVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateInvoiceVariables { + id: UUIDString; + status?: InvoiceStatus | null; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; +} +``` +### Return Type +Recall that executing the `updateInvoice` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateInvoiceData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateInvoiceData { + invoice_update?: Invoice_Key | null; +} +``` +### Using `updateInvoice`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateInvoice, UpdateInvoiceVariables } from '@dataconnect/generated'; + +// The `updateInvoice` mutation requires an argument of type `UpdateInvoiceVariables`: +const updateInvoiceVars: UpdateInvoiceVariables = { + id: ..., + status: ..., // optional + vendorId: ..., // optional + businessId: ..., // optional + orderId: ..., // optional + paymentTerms: ..., // optional + invoiceNumber: ..., // optional + issueDate: ..., // optional + dueDate: ..., // optional + hub: ..., // optional + managerName: ..., // optional + vendorNumber: ..., // optional + roles: ..., // optional + charges: ..., // optional + otherCharges: ..., // optional + subtotal: ..., // optional + amount: ..., // optional + notes: ..., // optional + staffCount: ..., // optional + chargesCount: ..., // optional + disputedItems: ..., // optional + disputeReason: ..., // optional + disputeDetails: ..., // optional +}; + +// Call the `updateInvoice()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateInvoice(updateInvoiceVars); +// Variables can be defined inline as well. +const { data } = await updateInvoice({ id: ..., status: ..., vendorId: ..., businessId: ..., orderId: ..., paymentTerms: ..., invoiceNumber: ..., issueDate: ..., dueDate: ..., hub: ..., managerName: ..., vendorNumber: ..., roles: ..., charges: ..., otherCharges: ..., subtotal: ..., amount: ..., notes: ..., staffCount: ..., chargesCount: ..., disputedItems: ..., disputeReason: ..., disputeDetails: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateInvoice(dataConnect, updateInvoiceVars); + +console.log(data.invoice_update); + +// Or, you can use the `Promise` API. +updateInvoice(updateInvoiceVars).then((response) => { + const data = response.data; + console.log(data.invoice_update); +}); +``` + +### Using `updateInvoice`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateInvoiceRef, UpdateInvoiceVariables } from '@dataconnect/generated'; + +// The `updateInvoice` mutation requires an argument of type `UpdateInvoiceVariables`: +const updateInvoiceVars: UpdateInvoiceVariables = { + id: ..., + status: ..., // optional + vendorId: ..., // optional + businessId: ..., // optional + orderId: ..., // optional + paymentTerms: ..., // optional + invoiceNumber: ..., // optional + issueDate: ..., // optional + dueDate: ..., // optional + hub: ..., // optional + managerName: ..., // optional + vendorNumber: ..., // optional + roles: ..., // optional + charges: ..., // optional + otherCharges: ..., // optional + subtotal: ..., // optional + amount: ..., // optional + notes: ..., // optional + staffCount: ..., // optional + chargesCount: ..., // optional + disputedItems: ..., // optional + disputeReason: ..., // optional + disputeDetails: ..., // optional +}; + +// Call the `updateInvoiceRef()` function to get a reference to the mutation. +const ref = updateInvoiceRef(updateInvoiceVars); +// Variables can be defined inline as well. +const ref = updateInvoiceRef({ id: ..., status: ..., vendorId: ..., businessId: ..., orderId: ..., paymentTerms: ..., invoiceNumber: ..., issueDate: ..., dueDate: ..., hub: ..., managerName: ..., vendorNumber: ..., roles: ..., charges: ..., otherCharges: ..., subtotal: ..., amount: ..., notes: ..., staffCount: ..., chargesCount: ..., disputedItems: ..., disputeReason: ..., disputeDetails: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateInvoiceRef(dataConnect, updateInvoiceVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.invoice_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.invoice_update); +}); +``` + +## deleteInvoice +You can execute the `deleteInvoice` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteInvoice(vars: DeleteInvoiceVariables): MutationPromise; + +interface DeleteInvoiceRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteInvoiceVariables): MutationRef; +} +export const deleteInvoiceRef: DeleteInvoiceRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteInvoice(dc: DataConnect, vars: DeleteInvoiceVariables): MutationPromise; + +interface DeleteInvoiceRef { + ... + (dc: DataConnect, vars: DeleteInvoiceVariables): MutationRef; +} +export const deleteInvoiceRef: DeleteInvoiceRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteInvoiceRef: +```typescript +const name = deleteInvoiceRef.operationName; +console.log(name); +``` + +### Variables +The `deleteInvoice` mutation requires an argument of type `DeleteInvoiceVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteInvoiceVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteInvoice` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteInvoiceData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteInvoiceData { + invoice_delete?: Invoice_Key | null; +} +``` +### Using `deleteInvoice`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteInvoice, DeleteInvoiceVariables } from '@dataconnect/generated'; + +// The `deleteInvoice` mutation requires an argument of type `DeleteInvoiceVariables`: +const deleteInvoiceVars: DeleteInvoiceVariables = { + id: ..., +}; + +// Call the `deleteInvoice()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteInvoice(deleteInvoiceVars); +// Variables can be defined inline as well. +const { data } = await deleteInvoice({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteInvoice(dataConnect, deleteInvoiceVars); + +console.log(data.invoice_delete); + +// Or, you can use the `Promise` API. +deleteInvoice(deleteInvoiceVars).then((response) => { + const data = response.data; + console.log(data.invoice_delete); +}); +``` + +### Using `deleteInvoice`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteInvoiceRef, DeleteInvoiceVariables } from '@dataconnect/generated'; + +// The `deleteInvoice` mutation requires an argument of type `DeleteInvoiceVariables`: +const deleteInvoiceVars: DeleteInvoiceVariables = { + id: ..., +}; + +// Call the `deleteInvoiceRef()` function to get a reference to the mutation. +const ref = deleteInvoiceRef(deleteInvoiceVars); +// Variables can be defined inline as well. +const ref = deleteInvoiceRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteInvoiceRef(dataConnect, deleteInvoiceVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.invoice_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.invoice_delete); +}); +``` + +## createTeamHub +You can execute the `createTeamHub` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createTeamHub(vars: CreateTeamHubVariables): MutationPromise; + +interface CreateTeamHubRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTeamHubVariables): MutationRef; +} +export const createTeamHubRef: CreateTeamHubRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createTeamHub(dc: DataConnect, vars: CreateTeamHubVariables): MutationPromise; + +interface CreateTeamHubRef { + ... + (dc: DataConnect, vars: CreateTeamHubVariables): MutationRef; +} +export const createTeamHubRef: CreateTeamHubRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createTeamHubRef: +```typescript +const name = createTeamHubRef.operationName; +console.log(name); +``` + +### Variables +The `createTeamHub` mutation requires an argument of type `CreateTeamHubVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateTeamHubVariables { + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive?: boolean | null; + departments?: unknown | null; +} +``` +### Return Type +Recall that executing the `createTeamHub` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateTeamHubData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateTeamHubData { + teamHub_insert: TeamHub_Key; +} +``` +### Using `createTeamHub`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createTeamHub, CreateTeamHubVariables } from '@dataconnect/generated'; + +// The `createTeamHub` mutation requires an argument of type `CreateTeamHubVariables`: +const createTeamHubVars: CreateTeamHubVariables = { + teamId: ..., + hubName: ..., + address: ..., + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + managerName: ..., // optional + isActive: ..., // optional + departments: ..., // optional +}; + +// Call the `createTeamHub()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createTeamHub(createTeamHubVars); +// Variables can be defined inline as well. +const { data } = await createTeamHub({ teamId: ..., hubName: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., state: ..., street: ..., country: ..., zipCode: ..., managerName: ..., isActive: ..., departments: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createTeamHub(dataConnect, createTeamHubVars); + +console.log(data.teamHub_insert); + +// Or, you can use the `Promise` API. +createTeamHub(createTeamHubVars).then((response) => { + const data = response.data; + console.log(data.teamHub_insert); +}); +``` + +### Using `createTeamHub`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createTeamHubRef, CreateTeamHubVariables } from '@dataconnect/generated'; + +// The `createTeamHub` mutation requires an argument of type `CreateTeamHubVariables`: +const createTeamHubVars: CreateTeamHubVariables = { + teamId: ..., + hubName: ..., + address: ..., + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + managerName: ..., // optional + isActive: ..., // optional + departments: ..., // optional +}; + +// Call the `createTeamHubRef()` function to get a reference to the mutation. +const ref = createTeamHubRef(createTeamHubVars); +// Variables can be defined inline as well. +const ref = createTeamHubRef({ teamId: ..., hubName: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., state: ..., street: ..., country: ..., zipCode: ..., managerName: ..., isActive: ..., departments: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createTeamHubRef(dataConnect, createTeamHubVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.teamHub_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.teamHub_insert); +}); +``` + +## updateTeamHub +You can execute the `updateTeamHub` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateTeamHub(vars: UpdateTeamHubVariables): MutationPromise; + +interface UpdateTeamHubRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTeamHubVariables): MutationRef; +} +export const updateTeamHubRef: UpdateTeamHubRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateTeamHub(dc: DataConnect, vars: UpdateTeamHubVariables): MutationPromise; + +interface UpdateTeamHubRef { + ... + (dc: DataConnect, vars: UpdateTeamHubVariables): MutationRef; +} +export const updateTeamHubRef: UpdateTeamHubRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateTeamHubRef: +```typescript +const name = updateTeamHubRef.operationName; +console.log(name); +``` + +### Variables +The `updateTeamHub` mutation requires an argument of type `UpdateTeamHubVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateTeamHubVariables { + id: UUIDString; + teamId?: UUIDString | null; + hubName?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive?: boolean | null; + departments?: unknown | null; +} +``` +### Return Type +Recall that executing the `updateTeamHub` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateTeamHubData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateTeamHubData { + teamHub_update?: TeamHub_Key | null; +} +``` +### Using `updateTeamHub`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateTeamHub, UpdateTeamHubVariables } from '@dataconnect/generated'; + +// The `updateTeamHub` mutation requires an argument of type `UpdateTeamHubVariables`: +const updateTeamHubVars: UpdateTeamHubVariables = { + id: ..., + teamId: ..., // optional + hubName: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + managerName: ..., // optional + isActive: ..., // optional + departments: ..., // optional +}; + +// Call the `updateTeamHub()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateTeamHub(updateTeamHubVars); +// Variables can be defined inline as well. +const { data } = await updateTeamHub({ id: ..., teamId: ..., hubName: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., state: ..., street: ..., country: ..., zipCode: ..., managerName: ..., isActive: ..., departments: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateTeamHub(dataConnect, updateTeamHubVars); + +console.log(data.teamHub_update); + +// Or, you can use the `Promise` API. +updateTeamHub(updateTeamHubVars).then((response) => { + const data = response.data; + console.log(data.teamHub_update); +}); +``` + +### Using `updateTeamHub`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateTeamHubRef, UpdateTeamHubVariables } from '@dataconnect/generated'; + +// The `updateTeamHub` mutation requires an argument of type `UpdateTeamHubVariables`: +const updateTeamHubVars: UpdateTeamHubVariables = { + id: ..., + teamId: ..., // optional + hubName: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + managerName: ..., // optional + isActive: ..., // optional + departments: ..., // optional +}; + +// Call the `updateTeamHubRef()` function to get a reference to the mutation. +const ref = updateTeamHubRef(updateTeamHubVars); +// Variables can be defined inline as well. +const ref = updateTeamHubRef({ id: ..., teamId: ..., hubName: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., state: ..., street: ..., country: ..., zipCode: ..., managerName: ..., isActive: ..., departments: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateTeamHubRef(dataConnect, updateTeamHubVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.teamHub_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.teamHub_update); +}); +``` + +## deleteTeamHub +You can execute the `deleteTeamHub` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteTeamHub(vars: DeleteTeamHubVariables): MutationPromise; + +interface DeleteTeamHubRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTeamHubVariables): MutationRef; +} +export const deleteTeamHubRef: DeleteTeamHubRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteTeamHub(dc: DataConnect, vars: DeleteTeamHubVariables): MutationPromise; + +interface DeleteTeamHubRef { + ... + (dc: DataConnect, vars: DeleteTeamHubVariables): MutationRef; +} +export const deleteTeamHubRef: DeleteTeamHubRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteTeamHubRef: +```typescript +const name = deleteTeamHubRef.operationName; +console.log(name); +``` + +### Variables +The `deleteTeamHub` mutation requires an argument of type `DeleteTeamHubVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteTeamHubVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteTeamHub` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteTeamHubData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteTeamHubData { + teamHub_delete?: TeamHub_Key | null; +} +``` +### Using `deleteTeamHub`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteTeamHub, DeleteTeamHubVariables } from '@dataconnect/generated'; + +// The `deleteTeamHub` mutation requires an argument of type `DeleteTeamHubVariables`: +const deleteTeamHubVars: DeleteTeamHubVariables = { + id: ..., +}; + +// Call the `deleteTeamHub()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteTeamHub(deleteTeamHubVars); +// Variables can be defined inline as well. +const { data } = await deleteTeamHub({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteTeamHub(dataConnect, deleteTeamHubVars); + +console.log(data.teamHub_delete); + +// Or, you can use the `Promise` API. +deleteTeamHub(deleteTeamHubVars).then((response) => { + const data = response.data; + console.log(data.teamHub_delete); +}); +``` + +### Using `deleteTeamHub`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteTeamHubRef, DeleteTeamHubVariables } from '@dataconnect/generated'; + +// The `deleteTeamHub` mutation requires an argument of type `DeleteTeamHubVariables`: +const deleteTeamHubVars: DeleteTeamHubVariables = { + id: ..., +}; + +// Call the `deleteTeamHubRef()` function to get a reference to the mutation. +const ref = deleteTeamHubRef(deleteTeamHubVars); +// Variables can be defined inline as well. +const ref = deleteTeamHubRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteTeamHubRef(dataConnect, deleteTeamHubVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.teamHub_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.teamHub_delete); +}); +``` + +## createHub +You can execute the `createHub` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createHub(vars: CreateHubVariables): MutationPromise; + +interface CreateHubRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateHubVariables): MutationRef; +} +export const createHubRef: CreateHubRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createHub(dc: DataConnect, vars: CreateHubVariables): MutationPromise; + +interface CreateHubRef { + ... + (dc: DataConnect, vars: CreateHubVariables): MutationRef; +} +export const createHubRef: CreateHubRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createHubRef: +```typescript +const name = createHubRef.operationName; +console.log(name); +``` + +### Variables +The `createHub` mutation requires an argument of type `CreateHubVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateHubVariables { + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; +} +``` +### Return Type +Recall that executing the `createHub` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateHubData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateHubData { + hub_insert: Hub_Key; +} +``` +### Using `createHub`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createHub, CreateHubVariables } from '@dataconnect/generated'; + +// The `createHub` mutation requires an argument of type `CreateHubVariables`: +const createHubVars: CreateHubVariables = { + name: ..., + locationName: ..., // optional + address: ..., // optional + nfcTagId: ..., // optional + ownerId: ..., +}; + +// Call the `createHub()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createHub(createHubVars); +// Variables can be defined inline as well. +const { data } = await createHub({ name: ..., locationName: ..., address: ..., nfcTagId: ..., ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createHub(dataConnect, createHubVars); + +console.log(data.hub_insert); + +// Or, you can use the `Promise` API. +createHub(createHubVars).then((response) => { + const data = response.data; + console.log(data.hub_insert); +}); +``` + +### Using `createHub`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createHubRef, CreateHubVariables } from '@dataconnect/generated'; + +// The `createHub` mutation requires an argument of type `CreateHubVariables`: +const createHubVars: CreateHubVariables = { + name: ..., + locationName: ..., // optional + address: ..., // optional + nfcTagId: ..., // optional + ownerId: ..., +}; + +// Call the `createHubRef()` function to get a reference to the mutation. +const ref = createHubRef(createHubVars); +// Variables can be defined inline as well. +const ref = createHubRef({ name: ..., locationName: ..., address: ..., nfcTagId: ..., ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createHubRef(dataConnect, createHubVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.hub_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.hub_insert); +}); +``` + +## updateHub +You can execute the `updateHub` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateHub(vars: UpdateHubVariables): MutationPromise; + +interface UpdateHubRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateHubVariables): MutationRef; +} +export const updateHubRef: UpdateHubRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateHub(dc: DataConnect, vars: UpdateHubVariables): MutationPromise; + +interface UpdateHubRef { + ... + (dc: DataConnect, vars: UpdateHubVariables): MutationRef; +} +export const updateHubRef: UpdateHubRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateHubRef: +```typescript +const name = updateHubRef.operationName; +console.log(name); +``` + +### Variables +The `updateHub` mutation requires an argument of type `UpdateHubVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateHubVariables { + id: UUIDString; + name?: string | null; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId?: UUIDString | null; +} +``` +### Return Type +Recall that executing the `updateHub` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateHubData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateHubData { + hub_update?: Hub_Key | null; +} +``` +### Using `updateHub`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateHub, UpdateHubVariables } from '@dataconnect/generated'; + +// The `updateHub` mutation requires an argument of type `UpdateHubVariables`: +const updateHubVars: UpdateHubVariables = { + id: ..., + name: ..., // optional + locationName: ..., // optional + address: ..., // optional + nfcTagId: ..., // optional + ownerId: ..., // optional +}; + +// Call the `updateHub()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateHub(updateHubVars); +// Variables can be defined inline as well. +const { data } = await updateHub({ id: ..., name: ..., locationName: ..., address: ..., nfcTagId: ..., ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateHub(dataConnect, updateHubVars); + +console.log(data.hub_update); + +// Or, you can use the `Promise` API. +updateHub(updateHubVars).then((response) => { + const data = response.data; + console.log(data.hub_update); +}); +``` + +### Using `updateHub`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateHubRef, UpdateHubVariables } from '@dataconnect/generated'; + +// The `updateHub` mutation requires an argument of type `UpdateHubVariables`: +const updateHubVars: UpdateHubVariables = { + id: ..., + name: ..., // optional + locationName: ..., // optional + address: ..., // optional + nfcTagId: ..., // optional + ownerId: ..., // optional +}; + +// Call the `updateHubRef()` function to get a reference to the mutation. +const ref = updateHubRef(updateHubVars); +// Variables can be defined inline as well. +const ref = updateHubRef({ id: ..., name: ..., locationName: ..., address: ..., nfcTagId: ..., ownerId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateHubRef(dataConnect, updateHubVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.hub_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.hub_update); +}); +``` + +## deleteHub +You can execute the `deleteHub` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteHub(vars: DeleteHubVariables): MutationPromise; + +interface DeleteHubRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteHubVariables): MutationRef; +} +export const deleteHubRef: DeleteHubRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteHub(dc: DataConnect, vars: DeleteHubVariables): MutationPromise; + +interface DeleteHubRef { + ... + (dc: DataConnect, vars: DeleteHubVariables): MutationRef; +} +export const deleteHubRef: DeleteHubRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteHubRef: +```typescript +const name = deleteHubRef.operationName; +console.log(name); +``` + +### Variables +The `deleteHub` mutation requires an argument of type `DeleteHubVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteHubVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteHub` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteHubData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteHubData { + hub_delete?: Hub_Key | null; +} +``` +### Using `deleteHub`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteHub, DeleteHubVariables } from '@dataconnect/generated'; + +// The `deleteHub` mutation requires an argument of type `DeleteHubVariables`: +const deleteHubVars: DeleteHubVariables = { + id: ..., +}; + +// Call the `deleteHub()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteHub(deleteHubVars); +// Variables can be defined inline as well. +const { data } = await deleteHub({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteHub(dataConnect, deleteHubVars); + +console.log(data.hub_delete); + +// Or, you can use the `Promise` API. +deleteHub(deleteHubVars).then((response) => { + const data = response.data; + console.log(data.hub_delete); +}); +``` + +### Using `deleteHub`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteHubRef, DeleteHubVariables } from '@dataconnect/generated'; + +// The `deleteHub` mutation requires an argument of type `DeleteHubVariables`: +const deleteHubVars: DeleteHubVariables = { + id: ..., +}; + +// Call the `deleteHubRef()` function to get a reference to the mutation. +const ref = deleteHubRef(deleteHubVars); +// Variables can be defined inline as well. +const ref = deleteHubRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteHubRef(dataConnect, deleteHubVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.hub_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.hub_delete); +}); +``` + +## createRoleCategory +You can execute the `createRoleCategory` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createRoleCategory(vars: CreateRoleCategoryVariables): MutationPromise; + +interface CreateRoleCategoryRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateRoleCategoryVariables): MutationRef; +} +export const createRoleCategoryRef: CreateRoleCategoryRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createRoleCategory(dc: DataConnect, vars: CreateRoleCategoryVariables): MutationPromise; + +interface CreateRoleCategoryRef { + ... + (dc: DataConnect, vars: CreateRoleCategoryVariables): MutationRef; +} +export const createRoleCategoryRef: CreateRoleCategoryRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createRoleCategoryRef: +```typescript +const name = createRoleCategoryRef.operationName; +console.log(name); +``` + +### Variables +The `createRoleCategory` mutation requires an argument of type `CreateRoleCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateRoleCategoryVariables { + roleName: string; + category: RoleCategoryType; +} +``` +### Return Type +Recall that executing the `createRoleCategory` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateRoleCategoryData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateRoleCategoryData { + roleCategory_insert: RoleCategory_Key; +} +``` +### Using `createRoleCategory`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createRoleCategory, CreateRoleCategoryVariables } from '@dataconnect/generated'; + +// The `createRoleCategory` mutation requires an argument of type `CreateRoleCategoryVariables`: +const createRoleCategoryVars: CreateRoleCategoryVariables = { + roleName: ..., + category: ..., +}; + +// Call the `createRoleCategory()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createRoleCategory(createRoleCategoryVars); +// Variables can be defined inline as well. +const { data } = await createRoleCategory({ roleName: ..., category: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createRoleCategory(dataConnect, createRoleCategoryVars); + +console.log(data.roleCategory_insert); + +// Or, you can use the `Promise` API. +createRoleCategory(createRoleCategoryVars).then((response) => { + const data = response.data; + console.log(data.roleCategory_insert); +}); +``` + +### Using `createRoleCategory`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createRoleCategoryRef, CreateRoleCategoryVariables } from '@dataconnect/generated'; + +// The `createRoleCategory` mutation requires an argument of type `CreateRoleCategoryVariables`: +const createRoleCategoryVars: CreateRoleCategoryVariables = { + roleName: ..., + category: ..., +}; + +// Call the `createRoleCategoryRef()` function to get a reference to the mutation. +const ref = createRoleCategoryRef(createRoleCategoryVars); +// Variables can be defined inline as well. +const ref = createRoleCategoryRef({ roleName: ..., category: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createRoleCategoryRef(dataConnect, createRoleCategoryVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.roleCategory_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.roleCategory_insert); +}); +``` + +## updateRoleCategory +You can execute the `updateRoleCategory` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateRoleCategory(vars: UpdateRoleCategoryVariables): MutationPromise; + +interface UpdateRoleCategoryRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateRoleCategoryVariables): MutationRef; +} +export const updateRoleCategoryRef: UpdateRoleCategoryRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateRoleCategory(dc: DataConnect, vars: UpdateRoleCategoryVariables): MutationPromise; + +interface UpdateRoleCategoryRef { + ... + (dc: DataConnect, vars: UpdateRoleCategoryVariables): MutationRef; +} +export const updateRoleCategoryRef: UpdateRoleCategoryRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateRoleCategoryRef: +```typescript +const name = updateRoleCategoryRef.operationName; +console.log(name); +``` + +### Variables +The `updateRoleCategory` mutation requires an argument of type `UpdateRoleCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateRoleCategoryVariables { + id: UUIDString; + roleName?: string | null; + category?: RoleCategoryType | null; +} +``` +### Return Type +Recall that executing the `updateRoleCategory` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateRoleCategoryData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateRoleCategoryData { + roleCategory_update?: RoleCategory_Key | null; +} +``` +### Using `updateRoleCategory`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateRoleCategory, UpdateRoleCategoryVariables } from '@dataconnect/generated'; + +// The `updateRoleCategory` mutation requires an argument of type `UpdateRoleCategoryVariables`: +const updateRoleCategoryVars: UpdateRoleCategoryVariables = { + id: ..., + roleName: ..., // optional + category: ..., // optional +}; + +// Call the `updateRoleCategory()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateRoleCategory(updateRoleCategoryVars); +// Variables can be defined inline as well. +const { data } = await updateRoleCategory({ id: ..., roleName: ..., category: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateRoleCategory(dataConnect, updateRoleCategoryVars); + +console.log(data.roleCategory_update); + +// Or, you can use the `Promise` API. +updateRoleCategory(updateRoleCategoryVars).then((response) => { + const data = response.data; + console.log(data.roleCategory_update); +}); +``` + +### Using `updateRoleCategory`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateRoleCategoryRef, UpdateRoleCategoryVariables } from '@dataconnect/generated'; + +// The `updateRoleCategory` mutation requires an argument of type `UpdateRoleCategoryVariables`: +const updateRoleCategoryVars: UpdateRoleCategoryVariables = { + id: ..., + roleName: ..., // optional + category: ..., // optional +}; + +// Call the `updateRoleCategoryRef()` function to get a reference to the mutation. +const ref = updateRoleCategoryRef(updateRoleCategoryVars); +// Variables can be defined inline as well. +const ref = updateRoleCategoryRef({ id: ..., roleName: ..., category: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateRoleCategoryRef(dataConnect, updateRoleCategoryVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.roleCategory_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.roleCategory_update); +}); +``` + +## deleteRoleCategory +You can execute the `deleteRoleCategory` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteRoleCategory(vars: DeleteRoleCategoryVariables): MutationPromise; + +interface DeleteRoleCategoryRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteRoleCategoryVariables): MutationRef; +} +export const deleteRoleCategoryRef: DeleteRoleCategoryRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteRoleCategory(dc: DataConnect, vars: DeleteRoleCategoryVariables): MutationPromise; + +interface DeleteRoleCategoryRef { + ... + (dc: DataConnect, vars: DeleteRoleCategoryVariables): MutationRef; +} +export const deleteRoleCategoryRef: DeleteRoleCategoryRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteRoleCategoryRef: +```typescript +const name = deleteRoleCategoryRef.operationName; +console.log(name); +``` + +### Variables +The `deleteRoleCategory` mutation requires an argument of type `DeleteRoleCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteRoleCategoryVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteRoleCategory` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteRoleCategoryData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteRoleCategoryData { + roleCategory_delete?: RoleCategory_Key | null; +} +``` +### Using `deleteRoleCategory`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteRoleCategory, DeleteRoleCategoryVariables } from '@dataconnect/generated'; + +// The `deleteRoleCategory` mutation requires an argument of type `DeleteRoleCategoryVariables`: +const deleteRoleCategoryVars: DeleteRoleCategoryVariables = { + id: ..., +}; + +// Call the `deleteRoleCategory()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteRoleCategory(deleteRoleCategoryVars); +// Variables can be defined inline as well. +const { data } = await deleteRoleCategory({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteRoleCategory(dataConnect, deleteRoleCategoryVars); + +console.log(data.roleCategory_delete); + +// Or, you can use the `Promise` API. +deleteRoleCategory(deleteRoleCategoryVars).then((response) => { + const data = response.data; + console.log(data.roleCategory_delete); +}); +``` + +### Using `deleteRoleCategory`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteRoleCategoryRef, DeleteRoleCategoryVariables } from '@dataconnect/generated'; + +// The `deleteRoleCategory` mutation requires an argument of type `DeleteRoleCategoryVariables`: +const deleteRoleCategoryVars: DeleteRoleCategoryVariables = { + id: ..., +}; + +// Call the `deleteRoleCategoryRef()` function to get a reference to the mutation. +const ref = deleteRoleCategoryRef(deleteRoleCategoryVars); +// Variables can be defined inline as well. +const ref = deleteRoleCategoryRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteRoleCategoryRef(dataConnect, deleteRoleCategoryVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.roleCategory_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.roleCategory_delete); +}); +``` + +## createStaffAvailabilityStats +You can execute the `createStaffAvailabilityStats` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createStaffAvailabilityStats(vars: CreateStaffAvailabilityStatsVariables): MutationPromise; + +interface CreateStaffAvailabilityStatsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateStaffAvailabilityStatsVariables): MutationRef; +} +export const createStaffAvailabilityStatsRef: CreateStaffAvailabilityStatsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createStaffAvailabilityStats(dc: DataConnect, vars: CreateStaffAvailabilityStatsVariables): MutationPromise; + +interface CreateStaffAvailabilityStatsRef { + ... + (dc: DataConnect, vars: CreateStaffAvailabilityStatsVariables): MutationRef; +} +export const createStaffAvailabilityStatsRef: CreateStaffAvailabilityStatsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createStaffAvailabilityStatsRef: +```typescript +const name = createStaffAvailabilityStatsRef.operationName; +console.log(name); +``` + +### Variables +The `createStaffAvailabilityStats` mutation requires an argument of type `CreateStaffAvailabilityStatsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateStaffAvailabilityStatsVariables { + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; +} +``` +### Return Type +Recall that executing the `createStaffAvailabilityStats` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateStaffAvailabilityStatsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateStaffAvailabilityStatsData { + staffAvailabilityStats_insert: StaffAvailabilityStats_Key; +} +``` +### Using `createStaffAvailabilityStats`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createStaffAvailabilityStats, CreateStaffAvailabilityStatsVariables } from '@dataconnect/generated'; + +// The `createStaffAvailabilityStats` mutation requires an argument of type `CreateStaffAvailabilityStatsVariables`: +const createStaffAvailabilityStatsVars: CreateStaffAvailabilityStatsVariables = { + staffId: ..., + needWorkIndex: ..., // optional + utilizationPercentage: ..., // optional + predictedAvailabilityScore: ..., // optional + scheduledHoursThisPeriod: ..., // optional + desiredHoursThisPeriod: ..., // optional + lastShiftDate: ..., // optional + acceptanceRate: ..., // optional +}; + +// Call the `createStaffAvailabilityStats()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createStaffAvailabilityStats(createStaffAvailabilityStatsVars); +// Variables can be defined inline as well. +const { data } = await createStaffAvailabilityStats({ staffId: ..., needWorkIndex: ..., utilizationPercentage: ..., predictedAvailabilityScore: ..., scheduledHoursThisPeriod: ..., desiredHoursThisPeriod: ..., lastShiftDate: ..., acceptanceRate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createStaffAvailabilityStats(dataConnect, createStaffAvailabilityStatsVars); + +console.log(data.staffAvailabilityStats_insert); + +// Or, you can use the `Promise` API. +createStaffAvailabilityStats(createStaffAvailabilityStatsVars).then((response) => { + const data = response.data; + console.log(data.staffAvailabilityStats_insert); +}); +``` + +### Using `createStaffAvailabilityStats`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createStaffAvailabilityStatsRef, CreateStaffAvailabilityStatsVariables } from '@dataconnect/generated'; + +// The `createStaffAvailabilityStats` mutation requires an argument of type `CreateStaffAvailabilityStatsVariables`: +const createStaffAvailabilityStatsVars: CreateStaffAvailabilityStatsVariables = { + staffId: ..., + needWorkIndex: ..., // optional + utilizationPercentage: ..., // optional + predictedAvailabilityScore: ..., // optional + scheduledHoursThisPeriod: ..., // optional + desiredHoursThisPeriod: ..., // optional + lastShiftDate: ..., // optional + acceptanceRate: ..., // optional +}; + +// Call the `createStaffAvailabilityStatsRef()` function to get a reference to the mutation. +const ref = createStaffAvailabilityStatsRef(createStaffAvailabilityStatsVars); +// Variables can be defined inline as well. +const ref = createStaffAvailabilityStatsRef({ staffId: ..., needWorkIndex: ..., utilizationPercentage: ..., predictedAvailabilityScore: ..., scheduledHoursThisPeriod: ..., desiredHoursThisPeriod: ..., lastShiftDate: ..., acceptanceRate: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createStaffAvailabilityStatsRef(dataConnect, createStaffAvailabilityStatsVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffAvailabilityStats_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffAvailabilityStats_insert); +}); +``` + +## updateStaffAvailabilityStats +You can execute the `updateStaffAvailabilityStats` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateStaffAvailabilityStats(vars: UpdateStaffAvailabilityStatsVariables): MutationPromise; + +interface UpdateStaffAvailabilityStatsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateStaffAvailabilityStatsVariables): MutationRef; +} +export const updateStaffAvailabilityStatsRef: UpdateStaffAvailabilityStatsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateStaffAvailabilityStats(dc: DataConnect, vars: UpdateStaffAvailabilityStatsVariables): MutationPromise; + +interface UpdateStaffAvailabilityStatsRef { + ... + (dc: DataConnect, vars: UpdateStaffAvailabilityStatsVariables): MutationRef; +} +export const updateStaffAvailabilityStatsRef: UpdateStaffAvailabilityStatsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateStaffAvailabilityStatsRef: +```typescript +const name = updateStaffAvailabilityStatsRef.operationName; +console.log(name); +``` + +### Variables +The `updateStaffAvailabilityStats` mutation requires an argument of type `UpdateStaffAvailabilityStatsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateStaffAvailabilityStatsVariables { + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; +} +``` +### Return Type +Recall that executing the `updateStaffAvailabilityStats` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateStaffAvailabilityStatsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateStaffAvailabilityStatsData { + staffAvailabilityStats_update?: StaffAvailabilityStats_Key | null; +} +``` +### Using `updateStaffAvailabilityStats`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateStaffAvailabilityStats, UpdateStaffAvailabilityStatsVariables } from '@dataconnect/generated'; + +// The `updateStaffAvailabilityStats` mutation requires an argument of type `UpdateStaffAvailabilityStatsVariables`: +const updateStaffAvailabilityStatsVars: UpdateStaffAvailabilityStatsVariables = { + staffId: ..., + needWorkIndex: ..., // optional + utilizationPercentage: ..., // optional + predictedAvailabilityScore: ..., // optional + scheduledHoursThisPeriod: ..., // optional + desiredHoursThisPeriod: ..., // optional + lastShiftDate: ..., // optional + acceptanceRate: ..., // optional +}; + +// Call the `updateStaffAvailabilityStats()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateStaffAvailabilityStats(updateStaffAvailabilityStatsVars); +// Variables can be defined inline as well. +const { data } = await updateStaffAvailabilityStats({ staffId: ..., needWorkIndex: ..., utilizationPercentage: ..., predictedAvailabilityScore: ..., scheduledHoursThisPeriod: ..., desiredHoursThisPeriod: ..., lastShiftDate: ..., acceptanceRate: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateStaffAvailabilityStats(dataConnect, updateStaffAvailabilityStatsVars); + +console.log(data.staffAvailabilityStats_update); + +// Or, you can use the `Promise` API. +updateStaffAvailabilityStats(updateStaffAvailabilityStatsVars).then((response) => { + const data = response.data; + console.log(data.staffAvailabilityStats_update); +}); +``` + +### Using `updateStaffAvailabilityStats`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateStaffAvailabilityStatsRef, UpdateStaffAvailabilityStatsVariables } from '@dataconnect/generated'; + +// The `updateStaffAvailabilityStats` mutation requires an argument of type `UpdateStaffAvailabilityStatsVariables`: +const updateStaffAvailabilityStatsVars: UpdateStaffAvailabilityStatsVariables = { + staffId: ..., + needWorkIndex: ..., // optional + utilizationPercentage: ..., // optional + predictedAvailabilityScore: ..., // optional + scheduledHoursThisPeriod: ..., // optional + desiredHoursThisPeriod: ..., // optional + lastShiftDate: ..., // optional + acceptanceRate: ..., // optional +}; + +// Call the `updateStaffAvailabilityStatsRef()` function to get a reference to the mutation. +const ref = updateStaffAvailabilityStatsRef(updateStaffAvailabilityStatsVars); +// Variables can be defined inline as well. +const ref = updateStaffAvailabilityStatsRef({ staffId: ..., needWorkIndex: ..., utilizationPercentage: ..., predictedAvailabilityScore: ..., scheduledHoursThisPeriod: ..., desiredHoursThisPeriod: ..., lastShiftDate: ..., acceptanceRate: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateStaffAvailabilityStatsRef(dataConnect, updateStaffAvailabilityStatsVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffAvailabilityStats_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffAvailabilityStats_update); +}); +``` + +## deleteStaffAvailabilityStats +You can execute the `deleteStaffAvailabilityStats` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteStaffAvailabilityStats(vars: DeleteStaffAvailabilityStatsVariables): MutationPromise; + +interface DeleteStaffAvailabilityStatsRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteStaffAvailabilityStatsVariables): MutationRef; +} +export const deleteStaffAvailabilityStatsRef: DeleteStaffAvailabilityStatsRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteStaffAvailabilityStats(dc: DataConnect, vars: DeleteStaffAvailabilityStatsVariables): MutationPromise; + +interface DeleteStaffAvailabilityStatsRef { + ... + (dc: DataConnect, vars: DeleteStaffAvailabilityStatsVariables): MutationRef; +} +export const deleteStaffAvailabilityStatsRef: DeleteStaffAvailabilityStatsRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteStaffAvailabilityStatsRef: +```typescript +const name = deleteStaffAvailabilityStatsRef.operationName; +console.log(name); +``` + +### Variables +The `deleteStaffAvailabilityStats` mutation requires an argument of type `DeleteStaffAvailabilityStatsVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteStaffAvailabilityStatsVariables { + staffId: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteStaffAvailabilityStats` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteStaffAvailabilityStatsData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteStaffAvailabilityStatsData { + staffAvailabilityStats_delete?: StaffAvailabilityStats_Key | null; +} +``` +### Using `deleteStaffAvailabilityStats`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteStaffAvailabilityStats, DeleteStaffAvailabilityStatsVariables } from '@dataconnect/generated'; + +// The `deleteStaffAvailabilityStats` mutation requires an argument of type `DeleteStaffAvailabilityStatsVariables`: +const deleteStaffAvailabilityStatsVars: DeleteStaffAvailabilityStatsVariables = { + staffId: ..., +}; + +// Call the `deleteStaffAvailabilityStats()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteStaffAvailabilityStats(deleteStaffAvailabilityStatsVars); +// Variables can be defined inline as well. +const { data } = await deleteStaffAvailabilityStats({ staffId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteStaffAvailabilityStats(dataConnect, deleteStaffAvailabilityStatsVars); + +console.log(data.staffAvailabilityStats_delete); + +// Or, you can use the `Promise` API. +deleteStaffAvailabilityStats(deleteStaffAvailabilityStatsVars).then((response) => { + const data = response.data; + console.log(data.staffAvailabilityStats_delete); +}); +``` + +### Using `deleteStaffAvailabilityStats`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteStaffAvailabilityStatsRef, DeleteStaffAvailabilityStatsVariables } from '@dataconnect/generated'; + +// The `deleteStaffAvailabilityStats` mutation requires an argument of type `DeleteStaffAvailabilityStatsVariables`: +const deleteStaffAvailabilityStatsVars: DeleteStaffAvailabilityStatsVariables = { + staffId: ..., +}; + +// Call the `deleteStaffAvailabilityStatsRef()` function to get a reference to the mutation. +const ref = deleteStaffAvailabilityStatsRef(deleteStaffAvailabilityStatsVars); +// Variables can be defined inline as well. +const ref = deleteStaffAvailabilityStatsRef({ staffId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteStaffAvailabilityStatsRef(dataConnect, deleteStaffAvailabilityStatsVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffAvailabilityStats_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffAvailabilityStats_delete); +}); +``` + +## createShiftRole +You can execute the `createShiftRole` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createShiftRole(vars: CreateShiftRoleVariables): MutationPromise; + +interface CreateShiftRoleRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateShiftRoleVariables): MutationRef; +} +export const createShiftRoleRef: CreateShiftRoleRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createShiftRole(dc: DataConnect, vars: CreateShiftRoleVariables): MutationPromise; + +interface CreateShiftRoleRef { + ... + (dc: DataConnect, vars: CreateShiftRoleVariables): MutationRef; +} +export const createShiftRoleRef: CreateShiftRoleRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createShiftRoleRef: +```typescript +const name = createShiftRoleRef.operationName; +console.log(name); +``` + +### Variables +The `createShiftRole` mutation requires an argument of type `CreateShiftRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateShiftRoleVariables { + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; +} +``` +### Return Type +Recall that executing the `createShiftRole` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateShiftRoleData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateShiftRoleData { + shiftRole_insert: ShiftRole_Key; +} +``` +### Using `createShiftRole`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createShiftRole, CreateShiftRoleVariables } from '@dataconnect/generated'; + +// The `createShiftRole` mutation requires an argument of type `CreateShiftRoleVariables`: +const createShiftRoleVars: CreateShiftRoleVariables = { + shiftId: ..., + roleId: ..., + count: ..., + assigned: ..., // optional + startTime: ..., // optional + endTime: ..., // optional + hours: ..., // optional + department: ..., // optional + uniform: ..., // optional + breakType: ..., // optional + totalValue: ..., // optional +}; + +// Call the `createShiftRole()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createShiftRole(createShiftRoleVars); +// Variables can be defined inline as well. +const { data } = await createShiftRole({ shiftId: ..., roleId: ..., count: ..., assigned: ..., startTime: ..., endTime: ..., hours: ..., department: ..., uniform: ..., breakType: ..., totalValue: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createShiftRole(dataConnect, createShiftRoleVars); + +console.log(data.shiftRole_insert); + +// Or, you can use the `Promise` API. +createShiftRole(createShiftRoleVars).then((response) => { + const data = response.data; + console.log(data.shiftRole_insert); +}); +``` + +### Using `createShiftRole`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createShiftRoleRef, CreateShiftRoleVariables } from '@dataconnect/generated'; + +// The `createShiftRole` mutation requires an argument of type `CreateShiftRoleVariables`: +const createShiftRoleVars: CreateShiftRoleVariables = { + shiftId: ..., + roleId: ..., + count: ..., + assigned: ..., // optional + startTime: ..., // optional + endTime: ..., // optional + hours: ..., // optional + department: ..., // optional + uniform: ..., // optional + breakType: ..., // optional + totalValue: ..., // optional +}; + +// Call the `createShiftRoleRef()` function to get a reference to the mutation. +const ref = createShiftRoleRef(createShiftRoleVars); +// Variables can be defined inline as well. +const ref = createShiftRoleRef({ shiftId: ..., roleId: ..., count: ..., assigned: ..., startTime: ..., endTime: ..., hours: ..., department: ..., uniform: ..., breakType: ..., totalValue: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createShiftRoleRef(dataConnect, createShiftRoleVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.shiftRole_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.shiftRole_insert); +}); +``` + +## updateShiftRole +You can execute the `updateShiftRole` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateShiftRole(vars: UpdateShiftRoleVariables): MutationPromise; + +interface UpdateShiftRoleRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateShiftRoleVariables): MutationRef; +} +export const updateShiftRoleRef: UpdateShiftRoleRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateShiftRole(dc: DataConnect, vars: UpdateShiftRoleVariables): MutationPromise; + +interface UpdateShiftRoleRef { + ... + (dc: DataConnect, vars: UpdateShiftRoleVariables): MutationRef; +} +export const updateShiftRoleRef: UpdateShiftRoleRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateShiftRoleRef: +```typescript +const name = updateShiftRoleRef.operationName; +console.log(name); +``` + +### Variables +The `updateShiftRole` mutation requires an argument of type `UpdateShiftRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateShiftRoleVariables { + shiftId: UUIDString; + roleId: UUIDString; + count?: number | null; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; +} +``` +### Return Type +Recall that executing the `updateShiftRole` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateShiftRoleData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateShiftRoleData { + shiftRole_update?: ShiftRole_Key | null; +} +``` +### Using `updateShiftRole`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateShiftRole, UpdateShiftRoleVariables } from '@dataconnect/generated'; + +// The `updateShiftRole` mutation requires an argument of type `UpdateShiftRoleVariables`: +const updateShiftRoleVars: UpdateShiftRoleVariables = { + shiftId: ..., + roleId: ..., + count: ..., // optional + assigned: ..., // optional + startTime: ..., // optional + endTime: ..., // optional + hours: ..., // optional + department: ..., // optional + uniform: ..., // optional + breakType: ..., // optional + totalValue: ..., // optional +}; + +// Call the `updateShiftRole()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateShiftRole(updateShiftRoleVars); +// Variables can be defined inline as well. +const { data } = await updateShiftRole({ shiftId: ..., roleId: ..., count: ..., assigned: ..., startTime: ..., endTime: ..., hours: ..., department: ..., uniform: ..., breakType: ..., totalValue: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateShiftRole(dataConnect, updateShiftRoleVars); + +console.log(data.shiftRole_update); + +// Or, you can use the `Promise` API. +updateShiftRole(updateShiftRoleVars).then((response) => { + const data = response.data; + console.log(data.shiftRole_update); +}); +``` + +### Using `updateShiftRole`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateShiftRoleRef, UpdateShiftRoleVariables } from '@dataconnect/generated'; + +// The `updateShiftRole` mutation requires an argument of type `UpdateShiftRoleVariables`: +const updateShiftRoleVars: UpdateShiftRoleVariables = { + shiftId: ..., + roleId: ..., + count: ..., // optional + assigned: ..., // optional + startTime: ..., // optional + endTime: ..., // optional + hours: ..., // optional + department: ..., // optional + uniform: ..., // optional + breakType: ..., // optional + totalValue: ..., // optional +}; + +// Call the `updateShiftRoleRef()` function to get a reference to the mutation. +const ref = updateShiftRoleRef(updateShiftRoleVars); +// Variables can be defined inline as well. +const ref = updateShiftRoleRef({ shiftId: ..., roleId: ..., count: ..., assigned: ..., startTime: ..., endTime: ..., hours: ..., department: ..., uniform: ..., breakType: ..., totalValue: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateShiftRoleRef(dataConnect, updateShiftRoleVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.shiftRole_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.shiftRole_update); +}); +``` + +## deleteShiftRole +You can execute the `deleteShiftRole` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteShiftRole(vars: DeleteShiftRoleVariables): MutationPromise; + +interface DeleteShiftRoleRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteShiftRoleVariables): MutationRef; +} +export const deleteShiftRoleRef: DeleteShiftRoleRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteShiftRole(dc: DataConnect, vars: DeleteShiftRoleVariables): MutationPromise; + +interface DeleteShiftRoleRef { + ... + (dc: DataConnect, vars: DeleteShiftRoleVariables): MutationRef; +} +export const deleteShiftRoleRef: DeleteShiftRoleRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteShiftRoleRef: +```typescript +const name = deleteShiftRoleRef.operationName; +console.log(name); +``` + +### Variables +The `deleteShiftRole` mutation requires an argument of type `DeleteShiftRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteShiftRoleVariables { + shiftId: UUIDString; + roleId: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteShiftRole` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteShiftRoleData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteShiftRoleData { + shiftRole_delete?: ShiftRole_Key | null; +} +``` +### Using `deleteShiftRole`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteShiftRole, DeleteShiftRoleVariables } from '@dataconnect/generated'; + +// The `deleteShiftRole` mutation requires an argument of type `DeleteShiftRoleVariables`: +const deleteShiftRoleVars: DeleteShiftRoleVariables = { + shiftId: ..., + roleId: ..., +}; + +// Call the `deleteShiftRole()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteShiftRole(deleteShiftRoleVars); +// Variables can be defined inline as well. +const { data } = await deleteShiftRole({ shiftId: ..., roleId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteShiftRole(dataConnect, deleteShiftRoleVars); + +console.log(data.shiftRole_delete); + +// Or, you can use the `Promise` API. +deleteShiftRole(deleteShiftRoleVars).then((response) => { + const data = response.data; + console.log(data.shiftRole_delete); +}); +``` + +### Using `deleteShiftRole`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteShiftRoleRef, DeleteShiftRoleVariables } from '@dataconnect/generated'; + +// The `deleteShiftRole` mutation requires an argument of type `DeleteShiftRoleVariables`: +const deleteShiftRoleVars: DeleteShiftRoleVariables = { + shiftId: ..., + roleId: ..., +}; + +// Call the `deleteShiftRoleRef()` function to get a reference to the mutation. +const ref = deleteShiftRoleRef(deleteShiftRoleVars); +// Variables can be defined inline as well. +const ref = deleteShiftRoleRef({ shiftId: ..., roleId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteShiftRoleRef(dataConnect, deleteShiftRoleVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.shiftRole_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.shiftRole_delete); +}); +``` + +## createStaffRole +You can execute the `createStaffRole` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createStaffRole(vars: CreateStaffRoleVariables): MutationPromise; + +interface CreateStaffRoleRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateStaffRoleVariables): MutationRef; +} +export const createStaffRoleRef: CreateStaffRoleRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createStaffRole(dc: DataConnect, vars: CreateStaffRoleVariables): MutationPromise; + +interface CreateStaffRoleRef { + ... + (dc: DataConnect, vars: CreateStaffRoleVariables): MutationRef; +} +export const createStaffRoleRef: CreateStaffRoleRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createStaffRoleRef: +```typescript +const name = createStaffRoleRef.operationName; +console.log(name); +``` + +### Variables +The `createStaffRole` mutation requires an argument of type `CreateStaffRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateStaffRoleVariables { + staffId: UUIDString; + roleId: UUIDString; + roleType?: RoleType | null; +} +``` +### Return Type +Recall that executing the `createStaffRole` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateStaffRoleData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateStaffRoleData { + staffRole_insert: StaffRole_Key; +} +``` +### Using `createStaffRole`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createStaffRole, CreateStaffRoleVariables } from '@dataconnect/generated'; + +// The `createStaffRole` mutation requires an argument of type `CreateStaffRoleVariables`: +const createStaffRoleVars: CreateStaffRoleVariables = { + staffId: ..., + roleId: ..., + roleType: ..., // optional +}; + +// Call the `createStaffRole()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createStaffRole(createStaffRoleVars); +// Variables can be defined inline as well. +const { data } = await createStaffRole({ staffId: ..., roleId: ..., roleType: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createStaffRole(dataConnect, createStaffRoleVars); + +console.log(data.staffRole_insert); + +// Or, you can use the `Promise` API. +createStaffRole(createStaffRoleVars).then((response) => { + const data = response.data; + console.log(data.staffRole_insert); +}); +``` + +### Using `createStaffRole`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createStaffRoleRef, CreateStaffRoleVariables } from '@dataconnect/generated'; + +// The `createStaffRole` mutation requires an argument of type `CreateStaffRoleVariables`: +const createStaffRoleVars: CreateStaffRoleVariables = { + staffId: ..., + roleId: ..., + roleType: ..., // optional +}; + +// Call the `createStaffRoleRef()` function to get a reference to the mutation. +const ref = createStaffRoleRef(createStaffRoleVars); +// Variables can be defined inline as well. +const ref = createStaffRoleRef({ staffId: ..., roleId: ..., roleType: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createStaffRoleRef(dataConnect, createStaffRoleVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffRole_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffRole_insert); +}); +``` + +## deleteStaffRole +You can execute the `deleteStaffRole` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteStaffRole(vars: DeleteStaffRoleVariables): MutationPromise; + +interface DeleteStaffRoleRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteStaffRoleVariables): MutationRef; +} +export const deleteStaffRoleRef: DeleteStaffRoleRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteStaffRole(dc: DataConnect, vars: DeleteStaffRoleVariables): MutationPromise; + +interface DeleteStaffRoleRef { + ... + (dc: DataConnect, vars: DeleteStaffRoleVariables): MutationRef; +} +export const deleteStaffRoleRef: DeleteStaffRoleRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteStaffRoleRef: +```typescript +const name = deleteStaffRoleRef.operationName; +console.log(name); +``` + +### Variables +The `deleteStaffRole` mutation requires an argument of type `DeleteStaffRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteStaffRoleVariables { + staffId: UUIDString; + roleId: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteStaffRole` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteStaffRoleData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteStaffRoleData { + staffRole_delete?: StaffRole_Key | null; +} +``` +### Using `deleteStaffRole`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteStaffRole, DeleteStaffRoleVariables } from '@dataconnect/generated'; + +// The `deleteStaffRole` mutation requires an argument of type `DeleteStaffRoleVariables`: +const deleteStaffRoleVars: DeleteStaffRoleVariables = { + staffId: ..., + roleId: ..., +}; + +// Call the `deleteStaffRole()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteStaffRole(deleteStaffRoleVars); +// Variables can be defined inline as well. +const { data } = await deleteStaffRole({ staffId: ..., roleId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteStaffRole(dataConnect, deleteStaffRoleVars); + +console.log(data.staffRole_delete); + +// Or, you can use the `Promise` API. +deleteStaffRole(deleteStaffRoleVars).then((response) => { + const data = response.data; + console.log(data.staffRole_delete); +}); +``` + +### Using `deleteStaffRole`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteStaffRoleRef, DeleteStaffRoleVariables } from '@dataconnect/generated'; + +// The `deleteStaffRole` mutation requires an argument of type `DeleteStaffRoleVariables`: +const deleteStaffRoleVars: DeleteStaffRoleVariables = { + staffId: ..., + roleId: ..., +}; + +// Call the `deleteStaffRoleRef()` function to get a reference to the mutation. +const ref = deleteStaffRoleRef(deleteStaffRoleVars); +// Variables can be defined inline as well. +const ref = deleteStaffRoleRef({ staffId: ..., roleId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteStaffRoleRef(dataConnect, deleteStaffRoleVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffRole_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffRole_delete); +}); +``` + +## createAccount +You can execute the `createAccount` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createAccount(vars: CreateAccountVariables): MutationPromise; + +interface CreateAccountRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateAccountVariables): MutationRef; +} +export const createAccountRef: CreateAccountRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createAccount(dc: DataConnect, vars: CreateAccountVariables): MutationPromise; + +interface CreateAccountRef { + ... + (dc: DataConnect, vars: CreateAccountVariables): MutationRef; +} +export const createAccountRef: CreateAccountRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createAccountRef: +```typescript +const name = createAccountRef.operationName; +console.log(name); +``` + +### Variables +The `createAccount` mutation requires an argument of type `CreateAccountVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateAccountVariables { + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `createAccount` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateAccountData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateAccountData { + account_insert: Account_Key; +} +``` +### Using `createAccount`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createAccount, CreateAccountVariables } from '@dataconnect/generated'; + +// The `createAccount` mutation requires an argument of type `CreateAccountVariables`: +const createAccountVars: CreateAccountVariables = { + bank: ..., + type: ..., + last4: ..., + isPrimary: ..., // optional + ownerId: ..., + accountNumber: ..., // optional + routeNumber: ..., // optional + expiryTime: ..., // optional +}; + +// Call the `createAccount()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createAccount(createAccountVars); +// Variables can be defined inline as well. +const { data } = await createAccount({ bank: ..., type: ..., last4: ..., isPrimary: ..., ownerId: ..., accountNumber: ..., routeNumber: ..., expiryTime: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createAccount(dataConnect, createAccountVars); + +console.log(data.account_insert); + +// Or, you can use the `Promise` API. +createAccount(createAccountVars).then((response) => { + const data = response.data; + console.log(data.account_insert); +}); +``` + +### Using `createAccount`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createAccountRef, CreateAccountVariables } from '@dataconnect/generated'; + +// The `createAccount` mutation requires an argument of type `CreateAccountVariables`: +const createAccountVars: CreateAccountVariables = { + bank: ..., + type: ..., + last4: ..., + isPrimary: ..., // optional + ownerId: ..., + accountNumber: ..., // optional + routeNumber: ..., // optional + expiryTime: ..., // optional +}; + +// Call the `createAccountRef()` function to get a reference to the mutation. +const ref = createAccountRef(createAccountVars); +// Variables can be defined inline as well. +const ref = createAccountRef({ bank: ..., type: ..., last4: ..., isPrimary: ..., ownerId: ..., accountNumber: ..., routeNumber: ..., expiryTime: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createAccountRef(dataConnect, createAccountVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.account_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.account_insert); +}); +``` + +## updateAccount +You can execute the `updateAccount` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateAccount(vars: UpdateAccountVariables): MutationPromise; + +interface UpdateAccountRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateAccountVariables): MutationRef; +} +export const updateAccountRef: UpdateAccountRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateAccount(dc: DataConnect, vars: UpdateAccountVariables): MutationPromise; + +interface UpdateAccountRef { + ... + (dc: DataConnect, vars: UpdateAccountVariables): MutationRef; +} +export const updateAccountRef: UpdateAccountRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateAccountRef: +```typescript +const name = updateAccountRef.operationName; +console.log(name); +``` + +### Variables +The `updateAccount` mutation requires an argument of type `UpdateAccountVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateAccountVariables { + id: UUIDString; + bank?: string | null; + type?: AccountType | null; + last4?: string | null; + isPrimary?: boolean | null; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; +} +``` +### Return Type +Recall that executing the `updateAccount` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateAccountData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateAccountData { + account_update?: Account_Key | null; +} +``` +### Using `updateAccount`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateAccount, UpdateAccountVariables } from '@dataconnect/generated'; + +// The `updateAccount` mutation requires an argument of type `UpdateAccountVariables`: +const updateAccountVars: UpdateAccountVariables = { + id: ..., + bank: ..., // optional + type: ..., // optional + last4: ..., // optional + isPrimary: ..., // optional + accountNumber: ..., // optional + routeNumber: ..., // optional + expiryTime: ..., // optional +}; + +// Call the `updateAccount()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateAccount(updateAccountVars); +// Variables can be defined inline as well. +const { data } = await updateAccount({ id: ..., bank: ..., type: ..., last4: ..., isPrimary: ..., accountNumber: ..., routeNumber: ..., expiryTime: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateAccount(dataConnect, updateAccountVars); + +console.log(data.account_update); + +// Or, you can use the `Promise` API. +updateAccount(updateAccountVars).then((response) => { + const data = response.data; + console.log(data.account_update); +}); +``` + +### Using `updateAccount`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateAccountRef, UpdateAccountVariables } from '@dataconnect/generated'; + +// The `updateAccount` mutation requires an argument of type `UpdateAccountVariables`: +const updateAccountVars: UpdateAccountVariables = { + id: ..., + bank: ..., // optional + type: ..., // optional + last4: ..., // optional + isPrimary: ..., // optional + accountNumber: ..., // optional + routeNumber: ..., // optional + expiryTime: ..., // optional +}; + +// Call the `updateAccountRef()` function to get a reference to the mutation. +const ref = updateAccountRef(updateAccountVars); +// Variables can be defined inline as well. +const ref = updateAccountRef({ id: ..., bank: ..., type: ..., last4: ..., isPrimary: ..., accountNumber: ..., routeNumber: ..., expiryTime: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateAccountRef(dataConnect, updateAccountVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.account_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.account_update); +}); +``` + +## deleteAccount +You can execute the `deleteAccount` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteAccount(vars: DeleteAccountVariables): MutationPromise; + +interface DeleteAccountRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteAccountVariables): MutationRef; +} +export const deleteAccountRef: DeleteAccountRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteAccount(dc: DataConnect, vars: DeleteAccountVariables): MutationPromise; + +interface DeleteAccountRef { + ... + (dc: DataConnect, vars: DeleteAccountVariables): MutationRef; +} +export const deleteAccountRef: DeleteAccountRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteAccountRef: +```typescript +const name = deleteAccountRef.operationName; +console.log(name); +``` + +### Variables +The `deleteAccount` mutation requires an argument of type `DeleteAccountVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteAccountVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteAccount` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteAccountData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteAccountData { + account_delete?: Account_Key | null; +} +``` +### Using `deleteAccount`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteAccount, DeleteAccountVariables } from '@dataconnect/generated'; + +// The `deleteAccount` mutation requires an argument of type `DeleteAccountVariables`: +const deleteAccountVars: DeleteAccountVariables = { + id: ..., +}; + +// Call the `deleteAccount()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteAccount(deleteAccountVars); +// Variables can be defined inline as well. +const { data } = await deleteAccount({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteAccount(dataConnect, deleteAccountVars); + +console.log(data.account_delete); + +// Or, you can use the `Promise` API. +deleteAccount(deleteAccountVars).then((response) => { + const data = response.data; + console.log(data.account_delete); +}); +``` + +### Using `deleteAccount`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteAccountRef, DeleteAccountVariables } from '@dataconnect/generated'; + +// The `deleteAccount` mutation requires an argument of type `DeleteAccountVariables`: +const deleteAccountVars: DeleteAccountVariables = { + id: ..., +}; + +// Call the `deleteAccountRef()` function to get a reference to the mutation. +const ref = deleteAccountRef(deleteAccountVars); +// Variables can be defined inline as well. +const ref = deleteAccountRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteAccountRef(dataConnect, deleteAccountVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.account_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.account_delete); +}); +``` + +## createApplication +You can execute the `createApplication` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createApplication(vars: CreateApplicationVariables): MutationPromise; + +interface CreateApplicationRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateApplicationVariables): MutationRef; +} +export const createApplicationRef: CreateApplicationRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createApplication(dc: DataConnect, vars: CreateApplicationVariables): MutationPromise; + +interface CreateApplicationRef { + ... + (dc: DataConnect, vars: CreateApplicationVariables): MutationRef; +} +export const createApplicationRef: CreateApplicationRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createApplicationRef: +```typescript +const name = createApplicationRef.operationName; +console.log(name); +``` + +### Variables +The `createApplication` mutation requires an argument of type `CreateApplicationVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateApplicationVariables { + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + roleId: UUIDString; +} +``` +### Return Type +Recall that executing the `createApplication` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateApplicationData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateApplicationData { + application_insert: Application_Key; +} +``` +### Using `createApplication`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createApplication, CreateApplicationVariables } from '@dataconnect/generated'; + +// The `createApplication` mutation requires an argument of type `CreateApplicationVariables`: +const createApplicationVars: CreateApplicationVariables = { + shiftId: ..., + staffId: ..., + status: ..., + checkInTime: ..., // optional + checkOutTime: ..., // optional + origin: ..., + roleId: ..., +}; + +// Call the `createApplication()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createApplication(createApplicationVars); +// Variables can be defined inline as well. +const { data } = await createApplication({ shiftId: ..., staffId: ..., status: ..., checkInTime: ..., checkOutTime: ..., origin: ..., roleId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createApplication(dataConnect, createApplicationVars); + +console.log(data.application_insert); + +// Or, you can use the `Promise` API. +createApplication(createApplicationVars).then((response) => { + const data = response.data; + console.log(data.application_insert); +}); +``` + +### Using `createApplication`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createApplicationRef, CreateApplicationVariables } from '@dataconnect/generated'; + +// The `createApplication` mutation requires an argument of type `CreateApplicationVariables`: +const createApplicationVars: CreateApplicationVariables = { + shiftId: ..., + staffId: ..., + status: ..., + checkInTime: ..., // optional + checkOutTime: ..., // optional + origin: ..., + roleId: ..., +}; + +// Call the `createApplicationRef()` function to get a reference to the mutation. +const ref = createApplicationRef(createApplicationVars); +// Variables can be defined inline as well. +const ref = createApplicationRef({ shiftId: ..., staffId: ..., status: ..., checkInTime: ..., checkOutTime: ..., origin: ..., roleId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createApplicationRef(dataConnect, createApplicationVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.application_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.application_insert); +}); +``` + +## updateApplicationStatus +You can execute the `updateApplicationStatus` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateApplicationStatus(vars: UpdateApplicationStatusVariables): MutationPromise; + +interface UpdateApplicationStatusRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateApplicationStatusVariables): MutationRef; +} +export const updateApplicationStatusRef: UpdateApplicationStatusRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateApplicationStatus(dc: DataConnect, vars: UpdateApplicationStatusVariables): MutationPromise; + +interface UpdateApplicationStatusRef { + ... + (dc: DataConnect, vars: UpdateApplicationStatusVariables): MutationRef; +} +export const updateApplicationStatusRef: UpdateApplicationStatusRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateApplicationStatusRef: +```typescript +const name = updateApplicationStatusRef.operationName; +console.log(name); +``` + +### Variables +The `updateApplicationStatus` mutation requires an argument of type `UpdateApplicationStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateApplicationStatusVariables { + id: UUIDString; + shiftId?: UUIDString | null; + staffId?: UUIDString | null; + status?: ApplicationStatus | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + roleId?: UUIDString | null; +} +``` +### Return Type +Recall that executing the `updateApplicationStatus` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateApplicationStatusData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateApplicationStatusData { + application_update?: Application_Key | null; +} +``` +### Using `updateApplicationStatus`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateApplicationStatus, UpdateApplicationStatusVariables } from '@dataconnect/generated'; + +// The `updateApplicationStatus` mutation requires an argument of type `UpdateApplicationStatusVariables`: +const updateApplicationStatusVars: UpdateApplicationStatusVariables = { + id: ..., + shiftId: ..., // optional + staffId: ..., // optional + status: ..., // optional + checkInTime: ..., // optional + checkOutTime: ..., // optional + roleId: ..., // optional +}; + +// Call the `updateApplicationStatus()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateApplicationStatus(updateApplicationStatusVars); +// Variables can be defined inline as well. +const { data } = await updateApplicationStatus({ id: ..., shiftId: ..., staffId: ..., status: ..., checkInTime: ..., checkOutTime: ..., roleId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateApplicationStatus(dataConnect, updateApplicationStatusVars); + +console.log(data.application_update); + +// Or, you can use the `Promise` API. +updateApplicationStatus(updateApplicationStatusVars).then((response) => { + const data = response.data; + console.log(data.application_update); +}); +``` + +### Using `updateApplicationStatus`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateApplicationStatusRef, UpdateApplicationStatusVariables } from '@dataconnect/generated'; + +// The `updateApplicationStatus` mutation requires an argument of type `UpdateApplicationStatusVariables`: +const updateApplicationStatusVars: UpdateApplicationStatusVariables = { + id: ..., + shiftId: ..., // optional + staffId: ..., // optional + status: ..., // optional + checkInTime: ..., // optional + checkOutTime: ..., // optional + roleId: ..., // optional +}; + +// Call the `updateApplicationStatusRef()` function to get a reference to the mutation. +const ref = updateApplicationStatusRef(updateApplicationStatusVars); +// Variables can be defined inline as well. +const ref = updateApplicationStatusRef({ id: ..., shiftId: ..., staffId: ..., status: ..., checkInTime: ..., checkOutTime: ..., roleId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateApplicationStatusRef(dataConnect, updateApplicationStatusVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.application_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.application_update); +}); +``` + +## deleteApplication +You can execute the `deleteApplication` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteApplication(vars: DeleteApplicationVariables): MutationPromise; + +interface DeleteApplicationRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteApplicationVariables): MutationRef; +} +export const deleteApplicationRef: DeleteApplicationRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteApplication(dc: DataConnect, vars: DeleteApplicationVariables): MutationPromise; + +interface DeleteApplicationRef { + ... + (dc: DataConnect, vars: DeleteApplicationVariables): MutationRef; +} +export const deleteApplicationRef: DeleteApplicationRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteApplicationRef: +```typescript +const name = deleteApplicationRef.operationName; +console.log(name); +``` + +### Variables +The `deleteApplication` mutation requires an argument of type `DeleteApplicationVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteApplicationVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteApplication` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteApplicationData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteApplicationData { + application_delete?: Application_Key | null; +} +``` +### Using `deleteApplication`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteApplication, DeleteApplicationVariables } from '@dataconnect/generated'; + +// The `deleteApplication` mutation requires an argument of type `DeleteApplicationVariables`: +const deleteApplicationVars: DeleteApplicationVariables = { + id: ..., +}; + +// Call the `deleteApplication()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteApplication(deleteApplicationVars); +// Variables can be defined inline as well. +const { data } = await deleteApplication({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteApplication(dataConnect, deleteApplicationVars); + +console.log(data.application_delete); + +// Or, you can use the `Promise` API. +deleteApplication(deleteApplicationVars).then((response) => { + const data = response.data; + console.log(data.application_delete); +}); +``` + +### Using `deleteApplication`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteApplicationRef, DeleteApplicationVariables } from '@dataconnect/generated'; + +// The `deleteApplication` mutation requires an argument of type `DeleteApplicationVariables`: +const deleteApplicationVars: DeleteApplicationVariables = { + id: ..., +}; + +// Call the `deleteApplicationRef()` function to get a reference to the mutation. +const ref = deleteApplicationRef(deleteApplicationVars); +// Variables can be defined inline as well. +const ref = deleteApplicationRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteApplicationRef(dataConnect, deleteApplicationVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.application_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.application_delete); +}); +``` + +## CreateAssignment +You can execute the `CreateAssignment` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createAssignment(vars: CreateAssignmentVariables): MutationPromise; + +interface CreateAssignmentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateAssignmentVariables): MutationRef; +} +export const createAssignmentRef: CreateAssignmentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createAssignment(dc: DataConnect, vars: CreateAssignmentVariables): MutationPromise; + +interface CreateAssignmentRef { + ... + (dc: DataConnect, vars: CreateAssignmentVariables): MutationRef; +} +export const createAssignmentRef: CreateAssignmentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createAssignmentRef: +```typescript +const name = createAssignmentRef.operationName; +console.log(name); +``` + +### Variables +The `CreateAssignment` mutation requires an argument of type `CreateAssignmentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateAssignmentVariables { + workforceId: UUIDString; + title?: string | null; + description?: string | null; + instructions?: string | null; + status?: AssignmentStatus | null; + tipsAvailable?: boolean | null; + travelTime?: boolean | null; + mealProvided?: boolean | null; + parkingAvailable?: boolean | null; + gasCompensation?: boolean | null; + managers?: unknown[] | null; + roleId: UUIDString; + shiftId: UUIDString; +} +``` +### Return Type +Recall that executing the `CreateAssignment` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateAssignmentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateAssignmentData { + assignment_insert: Assignment_Key; +} +``` +### Using `CreateAssignment`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createAssignment, CreateAssignmentVariables } from '@dataconnect/generated'; + +// The `CreateAssignment` mutation requires an argument of type `CreateAssignmentVariables`: +const createAssignmentVars: CreateAssignmentVariables = { + workforceId: ..., + title: ..., // optional + description: ..., // optional + instructions: ..., // optional + status: ..., // optional + tipsAvailable: ..., // optional + travelTime: ..., // optional + mealProvided: ..., // optional + parkingAvailable: ..., // optional + gasCompensation: ..., // optional + managers: ..., // optional + roleId: ..., + shiftId: ..., +}; + +// Call the `createAssignment()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createAssignment(createAssignmentVars); +// Variables can be defined inline as well. +const { data } = await createAssignment({ workforceId: ..., title: ..., description: ..., instructions: ..., status: ..., tipsAvailable: ..., travelTime: ..., mealProvided: ..., parkingAvailable: ..., gasCompensation: ..., managers: ..., roleId: ..., shiftId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createAssignment(dataConnect, createAssignmentVars); + +console.log(data.assignment_insert); + +// Or, you can use the `Promise` API. +createAssignment(createAssignmentVars).then((response) => { + const data = response.data; + console.log(data.assignment_insert); +}); +``` + +### Using `CreateAssignment`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createAssignmentRef, CreateAssignmentVariables } from '@dataconnect/generated'; + +// The `CreateAssignment` mutation requires an argument of type `CreateAssignmentVariables`: +const createAssignmentVars: CreateAssignmentVariables = { + workforceId: ..., + title: ..., // optional + description: ..., // optional + instructions: ..., // optional + status: ..., // optional + tipsAvailable: ..., // optional + travelTime: ..., // optional + mealProvided: ..., // optional + parkingAvailable: ..., // optional + gasCompensation: ..., // optional + managers: ..., // optional + roleId: ..., + shiftId: ..., +}; + +// Call the `createAssignmentRef()` function to get a reference to the mutation. +const ref = createAssignmentRef(createAssignmentVars); +// Variables can be defined inline as well. +const ref = createAssignmentRef({ workforceId: ..., title: ..., description: ..., instructions: ..., status: ..., tipsAvailable: ..., travelTime: ..., mealProvided: ..., parkingAvailable: ..., gasCompensation: ..., managers: ..., roleId: ..., shiftId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createAssignmentRef(dataConnect, createAssignmentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.assignment_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.assignment_insert); +}); +``` + +## UpdateAssignment +You can execute the `UpdateAssignment` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateAssignment(vars: UpdateAssignmentVariables): MutationPromise; + +interface UpdateAssignmentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateAssignmentVariables): MutationRef; +} +export const updateAssignmentRef: UpdateAssignmentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateAssignment(dc: DataConnect, vars: UpdateAssignmentVariables): MutationPromise; + +interface UpdateAssignmentRef { + ... + (dc: DataConnect, vars: UpdateAssignmentVariables): MutationRef; +} +export const updateAssignmentRef: UpdateAssignmentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateAssignmentRef: +```typescript +const name = updateAssignmentRef.operationName; +console.log(name); +``` + +### Variables +The `UpdateAssignment` mutation requires an argument of type `UpdateAssignmentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateAssignmentVariables { + id: UUIDString; + title?: string | null; + description?: string | null; + instructions?: string | null; + status?: AssignmentStatus | null; + tipsAvailable?: boolean | null; + travelTime?: boolean | null; + mealProvided?: boolean | null; + parkingAvailable?: boolean | null; + gasCompensation?: boolean | null; + managers?: unknown[] | null; + roleId: UUIDString; + shiftId: UUIDString; +} +``` +### Return Type +Recall that executing the `UpdateAssignment` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateAssignmentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateAssignmentData { + assignment_update?: Assignment_Key | null; +} +``` +### Using `UpdateAssignment`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateAssignment, UpdateAssignmentVariables } from '@dataconnect/generated'; + +// The `UpdateAssignment` mutation requires an argument of type `UpdateAssignmentVariables`: +const updateAssignmentVars: UpdateAssignmentVariables = { + id: ..., + title: ..., // optional + description: ..., // optional + instructions: ..., // optional + status: ..., // optional + tipsAvailable: ..., // optional + travelTime: ..., // optional + mealProvided: ..., // optional + parkingAvailable: ..., // optional + gasCompensation: ..., // optional + managers: ..., // optional + roleId: ..., + shiftId: ..., +}; + +// Call the `updateAssignment()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateAssignment(updateAssignmentVars); +// Variables can be defined inline as well. +const { data } = await updateAssignment({ id: ..., title: ..., description: ..., instructions: ..., status: ..., tipsAvailable: ..., travelTime: ..., mealProvided: ..., parkingAvailable: ..., gasCompensation: ..., managers: ..., roleId: ..., shiftId: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateAssignment(dataConnect, updateAssignmentVars); + +console.log(data.assignment_update); + +// Or, you can use the `Promise` API. +updateAssignment(updateAssignmentVars).then((response) => { + const data = response.data; + console.log(data.assignment_update); +}); +``` + +### Using `UpdateAssignment`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateAssignmentRef, UpdateAssignmentVariables } from '@dataconnect/generated'; + +// The `UpdateAssignment` mutation requires an argument of type `UpdateAssignmentVariables`: +const updateAssignmentVars: UpdateAssignmentVariables = { + id: ..., + title: ..., // optional + description: ..., // optional + instructions: ..., // optional + status: ..., // optional + tipsAvailable: ..., // optional + travelTime: ..., // optional + mealProvided: ..., // optional + parkingAvailable: ..., // optional + gasCompensation: ..., // optional + managers: ..., // optional + roleId: ..., + shiftId: ..., +}; + +// Call the `updateAssignmentRef()` function to get a reference to the mutation. +const ref = updateAssignmentRef(updateAssignmentVars); +// Variables can be defined inline as well. +const ref = updateAssignmentRef({ id: ..., title: ..., description: ..., instructions: ..., status: ..., tipsAvailable: ..., travelTime: ..., mealProvided: ..., parkingAvailable: ..., gasCompensation: ..., managers: ..., roleId: ..., shiftId: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateAssignmentRef(dataConnect, updateAssignmentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.assignment_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.assignment_update); +}); +``` + +## DeleteAssignment +You can execute the `DeleteAssignment` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteAssignment(vars: DeleteAssignmentVariables): MutationPromise; + +interface DeleteAssignmentRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteAssignmentVariables): MutationRef; +} +export const deleteAssignmentRef: DeleteAssignmentRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteAssignment(dc: DataConnect, vars: DeleteAssignmentVariables): MutationPromise; + +interface DeleteAssignmentRef { + ... + (dc: DataConnect, vars: DeleteAssignmentVariables): MutationRef; +} +export const deleteAssignmentRef: DeleteAssignmentRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteAssignmentRef: +```typescript +const name = deleteAssignmentRef.operationName; +console.log(name); +``` + +### Variables +The `DeleteAssignment` mutation requires an argument of type `DeleteAssignmentVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteAssignmentVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `DeleteAssignment` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteAssignmentData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteAssignmentData { + assignment_delete?: Assignment_Key | null; +} +``` +### Using `DeleteAssignment`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteAssignment, DeleteAssignmentVariables } from '@dataconnect/generated'; + +// The `DeleteAssignment` mutation requires an argument of type `DeleteAssignmentVariables`: +const deleteAssignmentVars: DeleteAssignmentVariables = { + id: ..., +}; + +// Call the `deleteAssignment()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteAssignment(deleteAssignmentVars); +// Variables can be defined inline as well. +const { data } = await deleteAssignment({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteAssignment(dataConnect, deleteAssignmentVars); + +console.log(data.assignment_delete); + +// Or, you can use the `Promise` API. +deleteAssignment(deleteAssignmentVars).then((response) => { + const data = response.data; + console.log(data.assignment_delete); +}); +``` + +### Using `DeleteAssignment`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteAssignmentRef, DeleteAssignmentVariables } from '@dataconnect/generated'; + +// The `DeleteAssignment` mutation requires an argument of type `DeleteAssignmentVariables`: +const deleteAssignmentVars: DeleteAssignmentVariables = { + id: ..., +}; + +// Call the `deleteAssignmentRef()` function to get a reference to the mutation. +const ref = deleteAssignmentRef(deleteAssignmentVars); +// Variables can be defined inline as well. +const ref = deleteAssignmentRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteAssignmentRef(dataConnect, deleteAssignmentVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.assignment_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.assignment_delete); +}); +``` + +## createInvoiceTemplate +You can execute the `createInvoiceTemplate` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createInvoiceTemplate(vars: CreateInvoiceTemplateVariables): MutationPromise; + +interface CreateInvoiceTemplateRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateInvoiceTemplateVariables): MutationRef; +} +export const createInvoiceTemplateRef: CreateInvoiceTemplateRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createInvoiceTemplate(dc: DataConnect, vars: CreateInvoiceTemplateVariables): MutationPromise; + +interface CreateInvoiceTemplateRef { + ... + (dc: DataConnect, vars: CreateInvoiceTemplateVariables): MutationRef; +} +export const createInvoiceTemplateRef: CreateInvoiceTemplateRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createInvoiceTemplateRef: +```typescript +const name = createInvoiceTemplateRef.operationName; +console.log(name); +``` + +### Variables +The `createInvoiceTemplate` mutation requires an argument of type `CreateInvoiceTemplateVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateInvoiceTemplateVariables { + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; +} +``` +### Return Type +Recall that executing the `createInvoiceTemplate` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateInvoiceTemplateData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateInvoiceTemplateData { + invoiceTemplate_insert: InvoiceTemplate_Key; +} +``` +### Using `createInvoiceTemplate`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createInvoiceTemplate, CreateInvoiceTemplateVariables } from '@dataconnect/generated'; + +// The `createInvoiceTemplate` mutation requires an argument of type `CreateInvoiceTemplateVariables`: +const createInvoiceTemplateVars: CreateInvoiceTemplateVariables = { + name: ..., + ownerId: ..., + vendorId: ..., // optional + businessId: ..., // optional + orderId: ..., // optional + paymentTerms: ..., // optional + invoiceNumber: ..., // optional + issueDate: ..., // optional + dueDate: ..., // optional + hub: ..., // optional + managerName: ..., // optional + vendorNumber: ..., // optional + roles: ..., // optional + charges: ..., // optional + otherCharges: ..., // optional + subtotal: ..., // optional + amount: ..., // optional + notes: ..., // optional + staffCount: ..., // optional + chargesCount: ..., // optional +}; + +// Call the `createInvoiceTemplate()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createInvoiceTemplate(createInvoiceTemplateVars); +// Variables can be defined inline as well. +const { data } = await createInvoiceTemplate({ name: ..., ownerId: ..., vendorId: ..., businessId: ..., orderId: ..., paymentTerms: ..., invoiceNumber: ..., issueDate: ..., dueDate: ..., hub: ..., managerName: ..., vendorNumber: ..., roles: ..., charges: ..., otherCharges: ..., subtotal: ..., amount: ..., notes: ..., staffCount: ..., chargesCount: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createInvoiceTemplate(dataConnect, createInvoiceTemplateVars); + +console.log(data.invoiceTemplate_insert); + +// Or, you can use the `Promise` API. +createInvoiceTemplate(createInvoiceTemplateVars).then((response) => { + const data = response.data; + console.log(data.invoiceTemplate_insert); +}); +``` + +### Using `createInvoiceTemplate`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createInvoiceTemplateRef, CreateInvoiceTemplateVariables } from '@dataconnect/generated'; + +// The `createInvoiceTemplate` mutation requires an argument of type `CreateInvoiceTemplateVariables`: +const createInvoiceTemplateVars: CreateInvoiceTemplateVariables = { + name: ..., + ownerId: ..., + vendorId: ..., // optional + businessId: ..., // optional + orderId: ..., // optional + paymentTerms: ..., // optional + invoiceNumber: ..., // optional + issueDate: ..., // optional + dueDate: ..., // optional + hub: ..., // optional + managerName: ..., // optional + vendorNumber: ..., // optional + roles: ..., // optional + charges: ..., // optional + otherCharges: ..., // optional + subtotal: ..., // optional + amount: ..., // optional + notes: ..., // optional + staffCount: ..., // optional + chargesCount: ..., // optional +}; + +// Call the `createInvoiceTemplateRef()` function to get a reference to the mutation. +const ref = createInvoiceTemplateRef(createInvoiceTemplateVars); +// Variables can be defined inline as well. +const ref = createInvoiceTemplateRef({ name: ..., ownerId: ..., vendorId: ..., businessId: ..., orderId: ..., paymentTerms: ..., invoiceNumber: ..., issueDate: ..., dueDate: ..., hub: ..., managerName: ..., vendorNumber: ..., roles: ..., charges: ..., otherCharges: ..., subtotal: ..., amount: ..., notes: ..., staffCount: ..., chargesCount: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createInvoiceTemplateRef(dataConnect, createInvoiceTemplateVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.invoiceTemplate_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.invoiceTemplate_insert); +}); +``` + +## updateInvoiceTemplate +You can execute the `updateInvoiceTemplate` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateInvoiceTemplate(vars: UpdateInvoiceTemplateVariables): MutationPromise; + +interface UpdateInvoiceTemplateRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateInvoiceTemplateVariables): MutationRef; +} +export const updateInvoiceTemplateRef: UpdateInvoiceTemplateRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateInvoiceTemplate(dc: DataConnect, vars: UpdateInvoiceTemplateVariables): MutationPromise; + +interface UpdateInvoiceTemplateRef { + ... + (dc: DataConnect, vars: UpdateInvoiceTemplateVariables): MutationRef; +} +export const updateInvoiceTemplateRef: UpdateInvoiceTemplateRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateInvoiceTemplateRef: +```typescript +const name = updateInvoiceTemplateRef.operationName; +console.log(name); +``` + +### Variables +The `updateInvoiceTemplate` mutation requires an argument of type `UpdateInvoiceTemplateVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateInvoiceTemplateVariables { + id: UUIDString; + name?: string | null; + ownerId?: UUIDString | null; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; +} +``` +### Return Type +Recall that executing the `updateInvoiceTemplate` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateInvoiceTemplateData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateInvoiceTemplateData { + invoiceTemplate_update?: InvoiceTemplate_Key | null; +} +``` +### Using `updateInvoiceTemplate`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateInvoiceTemplate, UpdateInvoiceTemplateVariables } from '@dataconnect/generated'; + +// The `updateInvoiceTemplate` mutation requires an argument of type `UpdateInvoiceTemplateVariables`: +const updateInvoiceTemplateVars: UpdateInvoiceTemplateVariables = { + id: ..., + name: ..., // optional + ownerId: ..., // optional + vendorId: ..., // optional + businessId: ..., // optional + orderId: ..., // optional + paymentTerms: ..., // optional + invoiceNumber: ..., // optional + issueDate: ..., // optional + dueDate: ..., // optional + hub: ..., // optional + managerName: ..., // optional + vendorNumber: ..., // optional + roles: ..., // optional + charges: ..., // optional + otherCharges: ..., // optional + subtotal: ..., // optional + amount: ..., // optional + notes: ..., // optional + staffCount: ..., // optional + chargesCount: ..., // optional +}; + +// Call the `updateInvoiceTemplate()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateInvoiceTemplate(updateInvoiceTemplateVars); +// Variables can be defined inline as well. +const { data } = await updateInvoiceTemplate({ id: ..., name: ..., ownerId: ..., vendorId: ..., businessId: ..., orderId: ..., paymentTerms: ..., invoiceNumber: ..., issueDate: ..., dueDate: ..., hub: ..., managerName: ..., vendorNumber: ..., roles: ..., charges: ..., otherCharges: ..., subtotal: ..., amount: ..., notes: ..., staffCount: ..., chargesCount: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateInvoiceTemplate(dataConnect, updateInvoiceTemplateVars); + +console.log(data.invoiceTemplate_update); + +// Or, you can use the `Promise` API. +updateInvoiceTemplate(updateInvoiceTemplateVars).then((response) => { + const data = response.data; + console.log(data.invoiceTemplate_update); +}); +``` + +### Using `updateInvoiceTemplate`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateInvoiceTemplateRef, UpdateInvoiceTemplateVariables } from '@dataconnect/generated'; + +// The `updateInvoiceTemplate` mutation requires an argument of type `UpdateInvoiceTemplateVariables`: +const updateInvoiceTemplateVars: UpdateInvoiceTemplateVariables = { + id: ..., + name: ..., // optional + ownerId: ..., // optional + vendorId: ..., // optional + businessId: ..., // optional + orderId: ..., // optional + paymentTerms: ..., // optional + invoiceNumber: ..., // optional + issueDate: ..., // optional + dueDate: ..., // optional + hub: ..., // optional + managerName: ..., // optional + vendorNumber: ..., // optional + roles: ..., // optional + charges: ..., // optional + otherCharges: ..., // optional + subtotal: ..., // optional + amount: ..., // optional + notes: ..., // optional + staffCount: ..., // optional + chargesCount: ..., // optional +}; + +// Call the `updateInvoiceTemplateRef()` function to get a reference to the mutation. +const ref = updateInvoiceTemplateRef(updateInvoiceTemplateVars); +// Variables can be defined inline as well. +const ref = updateInvoiceTemplateRef({ id: ..., name: ..., ownerId: ..., vendorId: ..., businessId: ..., orderId: ..., paymentTerms: ..., invoiceNumber: ..., issueDate: ..., dueDate: ..., hub: ..., managerName: ..., vendorNumber: ..., roles: ..., charges: ..., otherCharges: ..., subtotal: ..., amount: ..., notes: ..., staffCount: ..., chargesCount: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateInvoiceTemplateRef(dataConnect, updateInvoiceTemplateVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.invoiceTemplate_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.invoiceTemplate_update); +}); +``` + +## deleteInvoiceTemplate +You can execute the `deleteInvoiceTemplate` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteInvoiceTemplate(vars: DeleteInvoiceTemplateVariables): MutationPromise; + +interface DeleteInvoiceTemplateRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteInvoiceTemplateVariables): MutationRef; +} +export const deleteInvoiceTemplateRef: DeleteInvoiceTemplateRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteInvoiceTemplate(dc: DataConnect, vars: DeleteInvoiceTemplateVariables): MutationPromise; + +interface DeleteInvoiceTemplateRef { + ... + (dc: DataConnect, vars: DeleteInvoiceTemplateVariables): MutationRef; +} +export const deleteInvoiceTemplateRef: DeleteInvoiceTemplateRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteInvoiceTemplateRef: +```typescript +const name = deleteInvoiceTemplateRef.operationName; +console.log(name); +``` + +### Variables +The `deleteInvoiceTemplate` mutation requires an argument of type `DeleteInvoiceTemplateVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteInvoiceTemplateVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteInvoiceTemplate` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteInvoiceTemplateData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteInvoiceTemplateData { + invoiceTemplate_delete?: InvoiceTemplate_Key | null; +} +``` +### Using `deleteInvoiceTemplate`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteInvoiceTemplate, DeleteInvoiceTemplateVariables } from '@dataconnect/generated'; + +// The `deleteInvoiceTemplate` mutation requires an argument of type `DeleteInvoiceTemplateVariables`: +const deleteInvoiceTemplateVars: DeleteInvoiceTemplateVariables = { + id: ..., +}; + +// Call the `deleteInvoiceTemplate()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteInvoiceTemplate(deleteInvoiceTemplateVars); +// Variables can be defined inline as well. +const { data } = await deleteInvoiceTemplate({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteInvoiceTemplate(dataConnect, deleteInvoiceTemplateVars); + +console.log(data.invoiceTemplate_delete); + +// Or, you can use the `Promise` API. +deleteInvoiceTemplate(deleteInvoiceTemplateVars).then((response) => { + const data = response.data; + console.log(data.invoiceTemplate_delete); +}); +``` + +### Using `deleteInvoiceTemplate`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteInvoiceTemplateRef, DeleteInvoiceTemplateVariables } from '@dataconnect/generated'; + +// The `deleteInvoiceTemplate` mutation requires an argument of type `DeleteInvoiceTemplateVariables`: +const deleteInvoiceTemplateVars: DeleteInvoiceTemplateVariables = { + id: ..., +}; + +// Call the `deleteInvoiceTemplateRef()` function to get a reference to the mutation. +const ref = deleteInvoiceTemplateRef(deleteInvoiceTemplateVars); +// Variables can be defined inline as well. +const ref = deleteInvoiceTemplateRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteInvoiceTemplateRef(dataConnect, deleteInvoiceTemplateVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.invoiceTemplate_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.invoiceTemplate_delete); +}); +``` + +## createStaffAvailability +You can execute the `createStaffAvailability` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createStaffAvailability(vars: CreateStaffAvailabilityVariables): MutationPromise; + +interface CreateStaffAvailabilityRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateStaffAvailabilityVariables): MutationRef; +} +export const createStaffAvailabilityRef: CreateStaffAvailabilityRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createStaffAvailability(dc: DataConnect, vars: CreateStaffAvailabilityVariables): MutationPromise; + +interface CreateStaffAvailabilityRef { + ... + (dc: DataConnect, vars: CreateStaffAvailabilityVariables): MutationRef; +} +export const createStaffAvailabilityRef: CreateStaffAvailabilityRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createStaffAvailabilityRef: +```typescript +const name = createStaffAvailabilityRef.operationName; +console.log(name); +``` + +### Variables +The `createStaffAvailability` mutation requires an argument of type `CreateStaffAvailabilityVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateStaffAvailabilityVariables { + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status?: AvailabilityStatus | null; + notes?: string | null; +} +``` +### Return Type +Recall that executing the `createStaffAvailability` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateStaffAvailabilityData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateStaffAvailabilityData { + staffAvailability_insert: StaffAvailability_Key; +} +``` +### Using `createStaffAvailability`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createStaffAvailability, CreateStaffAvailabilityVariables } from '@dataconnect/generated'; + +// The `createStaffAvailability` mutation requires an argument of type `CreateStaffAvailabilityVariables`: +const createStaffAvailabilityVars: CreateStaffAvailabilityVariables = { + staffId: ..., + day: ..., + slot: ..., + status: ..., // optional + notes: ..., // optional +}; + +// Call the `createStaffAvailability()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createStaffAvailability(createStaffAvailabilityVars); +// Variables can be defined inline as well. +const { data } = await createStaffAvailability({ staffId: ..., day: ..., slot: ..., status: ..., notes: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createStaffAvailability(dataConnect, createStaffAvailabilityVars); + +console.log(data.staffAvailability_insert); + +// Or, you can use the `Promise` API. +createStaffAvailability(createStaffAvailabilityVars).then((response) => { + const data = response.data; + console.log(data.staffAvailability_insert); +}); +``` + +### Using `createStaffAvailability`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createStaffAvailabilityRef, CreateStaffAvailabilityVariables } from '@dataconnect/generated'; + +// The `createStaffAvailability` mutation requires an argument of type `CreateStaffAvailabilityVariables`: +const createStaffAvailabilityVars: CreateStaffAvailabilityVariables = { + staffId: ..., + day: ..., + slot: ..., + status: ..., // optional + notes: ..., // optional +}; + +// Call the `createStaffAvailabilityRef()` function to get a reference to the mutation. +const ref = createStaffAvailabilityRef(createStaffAvailabilityVars); +// Variables can be defined inline as well. +const ref = createStaffAvailabilityRef({ staffId: ..., day: ..., slot: ..., status: ..., notes: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createStaffAvailabilityRef(dataConnect, createStaffAvailabilityVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffAvailability_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffAvailability_insert); +}); +``` + +## updateStaffAvailability +You can execute the `updateStaffAvailability` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateStaffAvailability(vars: UpdateStaffAvailabilityVariables): MutationPromise; + +interface UpdateStaffAvailabilityRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateStaffAvailabilityVariables): MutationRef; +} +export const updateStaffAvailabilityRef: UpdateStaffAvailabilityRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateStaffAvailability(dc: DataConnect, vars: UpdateStaffAvailabilityVariables): MutationPromise; + +interface UpdateStaffAvailabilityRef { + ... + (dc: DataConnect, vars: UpdateStaffAvailabilityVariables): MutationRef; +} +export const updateStaffAvailabilityRef: UpdateStaffAvailabilityRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateStaffAvailabilityRef: +```typescript +const name = updateStaffAvailabilityRef.operationName; +console.log(name); +``` + +### Variables +The `updateStaffAvailability` mutation requires an argument of type `UpdateStaffAvailabilityVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateStaffAvailabilityVariables { + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status?: AvailabilityStatus | null; + notes?: string | null; +} +``` +### Return Type +Recall that executing the `updateStaffAvailability` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateStaffAvailabilityData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateStaffAvailabilityData { + staffAvailability_update?: StaffAvailability_Key | null; +} +``` +### Using `updateStaffAvailability`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateStaffAvailability, UpdateStaffAvailabilityVariables } from '@dataconnect/generated'; + +// The `updateStaffAvailability` mutation requires an argument of type `UpdateStaffAvailabilityVariables`: +const updateStaffAvailabilityVars: UpdateStaffAvailabilityVariables = { + staffId: ..., + day: ..., + slot: ..., + status: ..., // optional + notes: ..., // optional +}; + +// Call the `updateStaffAvailability()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateStaffAvailability(updateStaffAvailabilityVars); +// Variables can be defined inline as well. +const { data } = await updateStaffAvailability({ staffId: ..., day: ..., slot: ..., status: ..., notes: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateStaffAvailability(dataConnect, updateStaffAvailabilityVars); + +console.log(data.staffAvailability_update); + +// Or, you can use the `Promise` API. +updateStaffAvailability(updateStaffAvailabilityVars).then((response) => { + const data = response.data; + console.log(data.staffAvailability_update); +}); +``` + +### Using `updateStaffAvailability`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateStaffAvailabilityRef, UpdateStaffAvailabilityVariables } from '@dataconnect/generated'; + +// The `updateStaffAvailability` mutation requires an argument of type `UpdateStaffAvailabilityVariables`: +const updateStaffAvailabilityVars: UpdateStaffAvailabilityVariables = { + staffId: ..., + day: ..., + slot: ..., + status: ..., // optional + notes: ..., // optional +}; + +// Call the `updateStaffAvailabilityRef()` function to get a reference to the mutation. +const ref = updateStaffAvailabilityRef(updateStaffAvailabilityVars); +// Variables can be defined inline as well. +const ref = updateStaffAvailabilityRef({ staffId: ..., day: ..., slot: ..., status: ..., notes: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateStaffAvailabilityRef(dataConnect, updateStaffAvailabilityVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffAvailability_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffAvailability_update); +}); +``` + +## deleteStaffAvailability +You can execute the `deleteStaffAvailability` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteStaffAvailability(vars: DeleteStaffAvailabilityVariables): MutationPromise; + +interface DeleteStaffAvailabilityRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteStaffAvailabilityVariables): MutationRef; +} +export const deleteStaffAvailabilityRef: DeleteStaffAvailabilityRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteStaffAvailability(dc: DataConnect, vars: DeleteStaffAvailabilityVariables): MutationPromise; + +interface DeleteStaffAvailabilityRef { + ... + (dc: DataConnect, vars: DeleteStaffAvailabilityVariables): MutationRef; +} +export const deleteStaffAvailabilityRef: DeleteStaffAvailabilityRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteStaffAvailabilityRef: +```typescript +const name = deleteStaffAvailabilityRef.operationName; +console.log(name); +``` + +### Variables +The `deleteStaffAvailability` mutation requires an argument of type `DeleteStaffAvailabilityVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteStaffAvailabilityVariables { + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; +} +``` +### Return Type +Recall that executing the `deleteStaffAvailability` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteStaffAvailabilityData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteStaffAvailabilityData { + staffAvailability_delete?: StaffAvailability_Key | null; +} +``` +### Using `deleteStaffAvailability`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteStaffAvailability, DeleteStaffAvailabilityVariables } from '@dataconnect/generated'; + +// The `deleteStaffAvailability` mutation requires an argument of type `DeleteStaffAvailabilityVariables`: +const deleteStaffAvailabilityVars: DeleteStaffAvailabilityVariables = { + staffId: ..., + day: ..., + slot: ..., +}; + +// Call the `deleteStaffAvailability()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteStaffAvailability(deleteStaffAvailabilityVars); +// Variables can be defined inline as well. +const { data } = await deleteStaffAvailability({ staffId: ..., day: ..., slot: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteStaffAvailability(dataConnect, deleteStaffAvailabilityVars); + +console.log(data.staffAvailability_delete); + +// Or, you can use the `Promise` API. +deleteStaffAvailability(deleteStaffAvailabilityVars).then((response) => { + const data = response.data; + console.log(data.staffAvailability_delete); +}); +``` + +### Using `deleteStaffAvailability`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteStaffAvailabilityRef, DeleteStaffAvailabilityVariables } from '@dataconnect/generated'; + +// The `deleteStaffAvailability` mutation requires an argument of type `DeleteStaffAvailabilityVariables`: +const deleteStaffAvailabilityVars: DeleteStaffAvailabilityVariables = { + staffId: ..., + day: ..., + slot: ..., +}; + +// Call the `deleteStaffAvailabilityRef()` function to get a reference to the mutation. +const ref = deleteStaffAvailabilityRef(deleteStaffAvailabilityVars); +// Variables can be defined inline as well. +const ref = deleteStaffAvailabilityRef({ staffId: ..., day: ..., slot: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteStaffAvailabilityRef(dataConnect, deleteStaffAvailabilityVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staffAvailability_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staffAvailability_delete); +}); +``` + +## createTeamMember +You can execute the `createTeamMember` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createTeamMember(vars: CreateTeamMemberVariables): MutationPromise; + +interface CreateTeamMemberRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTeamMemberVariables): MutationRef; +} +export const createTeamMemberRef: CreateTeamMemberRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createTeamMember(dc: DataConnect, vars: CreateTeamMemberVariables): MutationPromise; + +interface CreateTeamMemberRef { + ... + (dc: DataConnect, vars: CreateTeamMemberVariables): MutationRef; +} +export const createTeamMemberRef: CreateTeamMemberRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createTeamMemberRef: +```typescript +const name = createTeamMemberRef.operationName; +console.log(name); +``` + +### Variables +The `createTeamMember` mutation requires an argument of type `CreateTeamMemberVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateTeamMemberVariables { + teamId: UUIDString; + role: TeamMemberRole; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + userId: string; + inviteStatus?: TeamMemberInviteStatus | null; +} +``` +### Return Type +Recall that executing the `createTeamMember` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateTeamMemberData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateTeamMemberData { + teamMember_insert: TeamMember_Key; +} +``` +### Using `createTeamMember`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createTeamMember, CreateTeamMemberVariables } from '@dataconnect/generated'; + +// The `createTeamMember` mutation requires an argument of type `CreateTeamMemberVariables`: +const createTeamMemberVars: CreateTeamMemberVariables = { + teamId: ..., + role: ..., + title: ..., // optional + department: ..., // optional + teamHubId: ..., // optional + isActive: ..., // optional + userId: ..., + inviteStatus: ..., // optional +}; + +// Call the `createTeamMember()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createTeamMember(createTeamMemberVars); +// Variables can be defined inline as well. +const { data } = await createTeamMember({ teamId: ..., role: ..., title: ..., department: ..., teamHubId: ..., isActive: ..., userId: ..., inviteStatus: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createTeamMember(dataConnect, createTeamMemberVars); + +console.log(data.teamMember_insert); + +// Or, you can use the `Promise` API. +createTeamMember(createTeamMemberVars).then((response) => { + const data = response.data; + console.log(data.teamMember_insert); +}); +``` + +### Using `createTeamMember`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createTeamMemberRef, CreateTeamMemberVariables } from '@dataconnect/generated'; + +// The `createTeamMember` mutation requires an argument of type `CreateTeamMemberVariables`: +const createTeamMemberVars: CreateTeamMemberVariables = { + teamId: ..., + role: ..., + title: ..., // optional + department: ..., // optional + teamHubId: ..., // optional + isActive: ..., // optional + userId: ..., + inviteStatus: ..., // optional +}; + +// Call the `createTeamMemberRef()` function to get a reference to the mutation. +const ref = createTeamMemberRef(createTeamMemberVars); +// Variables can be defined inline as well. +const ref = createTeamMemberRef({ teamId: ..., role: ..., title: ..., department: ..., teamHubId: ..., isActive: ..., userId: ..., inviteStatus: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createTeamMemberRef(dataConnect, createTeamMemberVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.teamMember_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.teamMember_insert); +}); +``` + +## updateTeamMember +You can execute the `updateTeamMember` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateTeamMember(vars: UpdateTeamMemberVariables): MutationPromise; + +interface UpdateTeamMemberRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTeamMemberVariables): MutationRef; +} +export const updateTeamMemberRef: UpdateTeamMemberRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateTeamMember(dc: DataConnect, vars: UpdateTeamMemberVariables): MutationPromise; + +interface UpdateTeamMemberRef { + ... + (dc: DataConnect, vars: UpdateTeamMemberVariables): MutationRef; +} +export const updateTeamMemberRef: UpdateTeamMemberRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateTeamMemberRef: +```typescript +const name = updateTeamMemberRef.operationName; +console.log(name); +``` + +### Variables +The `updateTeamMember` mutation requires an argument of type `UpdateTeamMemberVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateTeamMemberVariables { + id: UUIDString; + role?: TeamMemberRole | null; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + inviteStatus?: TeamMemberInviteStatus | null; +} +``` +### Return Type +Recall that executing the `updateTeamMember` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateTeamMemberData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateTeamMemberData { + teamMember_update?: TeamMember_Key | null; +} +``` +### Using `updateTeamMember`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateTeamMember, UpdateTeamMemberVariables } from '@dataconnect/generated'; + +// The `updateTeamMember` mutation requires an argument of type `UpdateTeamMemberVariables`: +const updateTeamMemberVars: UpdateTeamMemberVariables = { + id: ..., + role: ..., // optional + title: ..., // optional + department: ..., // optional + teamHubId: ..., // optional + isActive: ..., // optional + inviteStatus: ..., // optional +}; + +// Call the `updateTeamMember()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateTeamMember(updateTeamMemberVars); +// Variables can be defined inline as well. +const { data } = await updateTeamMember({ id: ..., role: ..., title: ..., department: ..., teamHubId: ..., isActive: ..., inviteStatus: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateTeamMember(dataConnect, updateTeamMemberVars); + +console.log(data.teamMember_update); + +// Or, you can use the `Promise` API. +updateTeamMember(updateTeamMemberVars).then((response) => { + const data = response.data; + console.log(data.teamMember_update); +}); +``` + +### Using `updateTeamMember`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateTeamMemberRef, UpdateTeamMemberVariables } from '@dataconnect/generated'; + +// The `updateTeamMember` mutation requires an argument of type `UpdateTeamMemberVariables`: +const updateTeamMemberVars: UpdateTeamMemberVariables = { + id: ..., + role: ..., // optional + title: ..., // optional + department: ..., // optional + teamHubId: ..., // optional + isActive: ..., // optional + inviteStatus: ..., // optional +}; + +// Call the `updateTeamMemberRef()` function to get a reference to the mutation. +const ref = updateTeamMemberRef(updateTeamMemberVars); +// Variables can be defined inline as well. +const ref = updateTeamMemberRef({ id: ..., role: ..., title: ..., department: ..., teamHubId: ..., isActive: ..., inviteStatus: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateTeamMemberRef(dataConnect, updateTeamMemberVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.teamMember_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.teamMember_update); +}); +``` + +## updateTeamMemberInviteStatus +You can execute the `updateTeamMemberInviteStatus` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateTeamMemberInviteStatus(vars: UpdateTeamMemberInviteStatusVariables): MutationPromise; + +interface UpdateTeamMemberInviteStatusRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTeamMemberInviteStatusVariables): MutationRef; +} +export const updateTeamMemberInviteStatusRef: UpdateTeamMemberInviteStatusRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateTeamMemberInviteStatus(dc: DataConnect, vars: UpdateTeamMemberInviteStatusVariables): MutationPromise; + +interface UpdateTeamMemberInviteStatusRef { + ... + (dc: DataConnect, vars: UpdateTeamMemberInviteStatusVariables): MutationRef; +} +export const updateTeamMemberInviteStatusRef: UpdateTeamMemberInviteStatusRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateTeamMemberInviteStatusRef: +```typescript +const name = updateTeamMemberInviteStatusRef.operationName; +console.log(name); +``` + +### Variables +The `updateTeamMemberInviteStatus` mutation requires an argument of type `UpdateTeamMemberInviteStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateTeamMemberInviteStatusVariables { + id: UUIDString; + inviteStatus: TeamMemberInviteStatus; +} +``` +### Return Type +Recall that executing the `updateTeamMemberInviteStatus` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateTeamMemberInviteStatusData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateTeamMemberInviteStatusData { + teamMember_update?: TeamMember_Key | null; +} +``` +### Using `updateTeamMemberInviteStatus`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateTeamMemberInviteStatus, UpdateTeamMemberInviteStatusVariables } from '@dataconnect/generated'; + +// The `updateTeamMemberInviteStatus` mutation requires an argument of type `UpdateTeamMemberInviteStatusVariables`: +const updateTeamMemberInviteStatusVars: UpdateTeamMemberInviteStatusVariables = { + id: ..., + inviteStatus: ..., +}; + +// Call the `updateTeamMemberInviteStatus()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateTeamMemberInviteStatus(updateTeamMemberInviteStatusVars); +// Variables can be defined inline as well. +const { data } = await updateTeamMemberInviteStatus({ id: ..., inviteStatus: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateTeamMemberInviteStatus(dataConnect, updateTeamMemberInviteStatusVars); + +console.log(data.teamMember_update); + +// Or, you can use the `Promise` API. +updateTeamMemberInviteStatus(updateTeamMemberInviteStatusVars).then((response) => { + const data = response.data; + console.log(data.teamMember_update); +}); +``` + +### Using `updateTeamMemberInviteStatus`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateTeamMemberInviteStatusRef, UpdateTeamMemberInviteStatusVariables } from '@dataconnect/generated'; + +// The `updateTeamMemberInviteStatus` mutation requires an argument of type `UpdateTeamMemberInviteStatusVariables`: +const updateTeamMemberInviteStatusVars: UpdateTeamMemberInviteStatusVariables = { + id: ..., + inviteStatus: ..., +}; + +// Call the `updateTeamMemberInviteStatusRef()` function to get a reference to the mutation. +const ref = updateTeamMemberInviteStatusRef(updateTeamMemberInviteStatusVars); +// Variables can be defined inline as well. +const ref = updateTeamMemberInviteStatusRef({ id: ..., inviteStatus: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateTeamMemberInviteStatusRef(dataConnect, updateTeamMemberInviteStatusVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.teamMember_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.teamMember_update); +}); +``` + +## acceptInviteByCode +You can execute the `acceptInviteByCode` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +acceptInviteByCode(vars: AcceptInviteByCodeVariables): MutationPromise; + +interface AcceptInviteByCodeRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: AcceptInviteByCodeVariables): MutationRef; +} +export const acceptInviteByCodeRef: AcceptInviteByCodeRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +acceptInviteByCode(dc: DataConnect, vars: AcceptInviteByCodeVariables): MutationPromise; + +interface AcceptInviteByCodeRef { + ... + (dc: DataConnect, vars: AcceptInviteByCodeVariables): MutationRef; +} +export const acceptInviteByCodeRef: AcceptInviteByCodeRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the acceptInviteByCodeRef: +```typescript +const name = acceptInviteByCodeRef.operationName; +console.log(name); +``` + +### Variables +The `acceptInviteByCode` mutation requires an argument of type `AcceptInviteByCodeVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface AcceptInviteByCodeVariables { + inviteCode: UUIDString; +} +``` +### Return Type +Recall that executing the `acceptInviteByCode` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `AcceptInviteByCodeData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface AcceptInviteByCodeData { + teamMember_updateMany: number; +} +``` +### Using `acceptInviteByCode`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, acceptInviteByCode, AcceptInviteByCodeVariables } from '@dataconnect/generated'; + +// The `acceptInviteByCode` mutation requires an argument of type `AcceptInviteByCodeVariables`: +const acceptInviteByCodeVars: AcceptInviteByCodeVariables = { + inviteCode: ..., +}; + +// Call the `acceptInviteByCode()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await acceptInviteByCode(acceptInviteByCodeVars); +// Variables can be defined inline as well. +const { data } = await acceptInviteByCode({ inviteCode: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await acceptInviteByCode(dataConnect, acceptInviteByCodeVars); + +console.log(data.teamMember_updateMany); + +// Or, you can use the `Promise` API. +acceptInviteByCode(acceptInviteByCodeVars).then((response) => { + const data = response.data; + console.log(data.teamMember_updateMany); +}); +``` + +### Using `acceptInviteByCode`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, acceptInviteByCodeRef, AcceptInviteByCodeVariables } from '@dataconnect/generated'; + +// The `acceptInviteByCode` mutation requires an argument of type `AcceptInviteByCodeVariables`: +const acceptInviteByCodeVars: AcceptInviteByCodeVariables = { + inviteCode: ..., +}; + +// Call the `acceptInviteByCodeRef()` function to get a reference to the mutation. +const ref = acceptInviteByCodeRef(acceptInviteByCodeVars); +// Variables can be defined inline as well. +const ref = acceptInviteByCodeRef({ inviteCode: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = acceptInviteByCodeRef(dataConnect, acceptInviteByCodeVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.teamMember_updateMany); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.teamMember_updateMany); +}); +``` + +## cancelInviteByCode +You can execute the `cancelInviteByCode` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +cancelInviteByCode(vars: CancelInviteByCodeVariables): MutationPromise; + +interface CancelInviteByCodeRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CancelInviteByCodeVariables): MutationRef; +} +export const cancelInviteByCodeRef: CancelInviteByCodeRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +cancelInviteByCode(dc: DataConnect, vars: CancelInviteByCodeVariables): MutationPromise; + +interface CancelInviteByCodeRef { + ... + (dc: DataConnect, vars: CancelInviteByCodeVariables): MutationRef; +} +export const cancelInviteByCodeRef: CancelInviteByCodeRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the cancelInviteByCodeRef: +```typescript +const name = cancelInviteByCodeRef.operationName; +console.log(name); +``` + +### Variables +The `cancelInviteByCode` mutation requires an argument of type `CancelInviteByCodeVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CancelInviteByCodeVariables { + inviteCode: UUIDString; +} +``` +### Return Type +Recall that executing the `cancelInviteByCode` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CancelInviteByCodeData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CancelInviteByCodeData { + teamMember_updateMany: number; +} +``` +### Using `cancelInviteByCode`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, cancelInviteByCode, CancelInviteByCodeVariables } from '@dataconnect/generated'; + +// The `cancelInviteByCode` mutation requires an argument of type `CancelInviteByCodeVariables`: +const cancelInviteByCodeVars: CancelInviteByCodeVariables = { + inviteCode: ..., +}; + +// Call the `cancelInviteByCode()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await cancelInviteByCode(cancelInviteByCodeVars); +// Variables can be defined inline as well. +const { data } = await cancelInviteByCode({ inviteCode: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await cancelInviteByCode(dataConnect, cancelInviteByCodeVars); + +console.log(data.teamMember_updateMany); + +// Or, you can use the `Promise` API. +cancelInviteByCode(cancelInviteByCodeVars).then((response) => { + const data = response.data; + console.log(data.teamMember_updateMany); +}); +``` + +### Using `cancelInviteByCode`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, cancelInviteByCodeRef, CancelInviteByCodeVariables } from '@dataconnect/generated'; + +// The `cancelInviteByCode` mutation requires an argument of type `CancelInviteByCodeVariables`: +const cancelInviteByCodeVars: CancelInviteByCodeVariables = { + inviteCode: ..., +}; + +// Call the `cancelInviteByCodeRef()` function to get a reference to the mutation. +const ref = cancelInviteByCodeRef(cancelInviteByCodeVars); +// Variables can be defined inline as well. +const ref = cancelInviteByCodeRef({ inviteCode: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = cancelInviteByCodeRef(dataConnect, cancelInviteByCodeVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.teamMember_updateMany); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.teamMember_updateMany); +}); +``` + +## deleteTeamMember +You can execute the `deleteTeamMember` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteTeamMember(vars: DeleteTeamMemberVariables): MutationPromise; + +interface DeleteTeamMemberRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTeamMemberVariables): MutationRef; +} +export const deleteTeamMemberRef: DeleteTeamMemberRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteTeamMember(dc: DataConnect, vars: DeleteTeamMemberVariables): MutationPromise; + +interface DeleteTeamMemberRef { + ... + (dc: DataConnect, vars: DeleteTeamMemberVariables): MutationRef; +} +export const deleteTeamMemberRef: DeleteTeamMemberRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteTeamMemberRef: +```typescript +const name = deleteTeamMemberRef.operationName; +console.log(name); +``` + +### Variables +The `deleteTeamMember` mutation requires an argument of type `DeleteTeamMemberVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteTeamMemberVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteTeamMember` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteTeamMemberData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteTeamMemberData { + teamMember_delete?: TeamMember_Key | null; +} +``` +### Using `deleteTeamMember`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteTeamMember, DeleteTeamMemberVariables } from '@dataconnect/generated'; + +// The `deleteTeamMember` mutation requires an argument of type `DeleteTeamMemberVariables`: +const deleteTeamMemberVars: DeleteTeamMemberVariables = { + id: ..., +}; + +// Call the `deleteTeamMember()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteTeamMember(deleteTeamMemberVars); +// Variables can be defined inline as well. +const { data } = await deleteTeamMember({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteTeamMember(dataConnect, deleteTeamMemberVars); + +console.log(data.teamMember_delete); + +// Or, you can use the `Promise` API. +deleteTeamMember(deleteTeamMemberVars).then((response) => { + const data = response.data; + console.log(data.teamMember_delete); +}); +``` + +### Using `deleteTeamMember`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteTeamMemberRef, DeleteTeamMemberVariables } from '@dataconnect/generated'; + +// The `deleteTeamMember` mutation requires an argument of type `DeleteTeamMemberVariables`: +const deleteTeamMemberVars: DeleteTeamMemberVariables = { + id: ..., +}; + +// Call the `deleteTeamMemberRef()` function to get a reference to the mutation. +const ref = deleteTeamMemberRef(deleteTeamMemberVars); +// Variables can be defined inline as well. +const ref = deleteTeamMemberRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteTeamMemberRef(dataConnect, deleteTeamMemberVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.teamMember_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.teamMember_delete); +}); +``` + +## createLevel +You can execute the `createLevel` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createLevel(vars: CreateLevelVariables): MutationPromise; + +interface CreateLevelRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateLevelVariables): MutationRef; +} +export const createLevelRef: CreateLevelRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createLevel(dc: DataConnect, vars: CreateLevelVariables): MutationPromise; + +interface CreateLevelRef { + ... + (dc: DataConnect, vars: CreateLevelVariables): MutationRef; +} +export const createLevelRef: CreateLevelRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createLevelRef: +```typescript +const name = createLevelRef.operationName; +console.log(name); +``` + +### Variables +The `createLevel` mutation requires an argument of type `CreateLevelVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateLevelVariables { + name: string; + xpRequired: number; + icon?: string | null; + colors?: unknown | null; +} +``` +### Return Type +Recall that executing the `createLevel` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateLevelData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateLevelData { + level_insert: Level_Key; +} +``` +### Using `createLevel`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createLevel, CreateLevelVariables } from '@dataconnect/generated'; + +// The `createLevel` mutation requires an argument of type `CreateLevelVariables`: +const createLevelVars: CreateLevelVariables = { + name: ..., + xpRequired: ..., + icon: ..., // optional + colors: ..., // optional +}; + +// Call the `createLevel()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createLevel(createLevelVars); +// Variables can be defined inline as well. +const { data } = await createLevel({ name: ..., xpRequired: ..., icon: ..., colors: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createLevel(dataConnect, createLevelVars); + +console.log(data.level_insert); + +// Or, you can use the `Promise` API. +createLevel(createLevelVars).then((response) => { + const data = response.data; + console.log(data.level_insert); +}); +``` + +### Using `createLevel`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createLevelRef, CreateLevelVariables } from '@dataconnect/generated'; + +// The `createLevel` mutation requires an argument of type `CreateLevelVariables`: +const createLevelVars: CreateLevelVariables = { + name: ..., + xpRequired: ..., + icon: ..., // optional + colors: ..., // optional +}; + +// Call the `createLevelRef()` function to get a reference to the mutation. +const ref = createLevelRef(createLevelVars); +// Variables can be defined inline as well. +const ref = createLevelRef({ name: ..., xpRequired: ..., icon: ..., colors: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createLevelRef(dataConnect, createLevelVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.level_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.level_insert); +}); +``` + +## updateLevel +You can execute the `updateLevel` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateLevel(vars: UpdateLevelVariables): MutationPromise; + +interface UpdateLevelRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateLevelVariables): MutationRef; +} +export const updateLevelRef: UpdateLevelRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateLevel(dc: DataConnect, vars: UpdateLevelVariables): MutationPromise; + +interface UpdateLevelRef { + ... + (dc: DataConnect, vars: UpdateLevelVariables): MutationRef; +} +export const updateLevelRef: UpdateLevelRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateLevelRef: +```typescript +const name = updateLevelRef.operationName; +console.log(name); +``` + +### Variables +The `updateLevel` mutation requires an argument of type `UpdateLevelVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateLevelVariables { + id: UUIDString; + name?: string | null; + xpRequired?: number | null; + icon?: string | null; + colors?: unknown | null; +} +``` +### Return Type +Recall that executing the `updateLevel` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateLevelData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateLevelData { + level_update?: Level_Key | null; +} +``` +### Using `updateLevel`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateLevel, UpdateLevelVariables } from '@dataconnect/generated'; + +// The `updateLevel` mutation requires an argument of type `UpdateLevelVariables`: +const updateLevelVars: UpdateLevelVariables = { + id: ..., + name: ..., // optional + xpRequired: ..., // optional + icon: ..., // optional + colors: ..., // optional +}; + +// Call the `updateLevel()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateLevel(updateLevelVars); +// Variables can be defined inline as well. +const { data } = await updateLevel({ id: ..., name: ..., xpRequired: ..., icon: ..., colors: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateLevel(dataConnect, updateLevelVars); + +console.log(data.level_update); + +// Or, you can use the `Promise` API. +updateLevel(updateLevelVars).then((response) => { + const data = response.data; + console.log(data.level_update); +}); +``` + +### Using `updateLevel`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateLevelRef, UpdateLevelVariables } from '@dataconnect/generated'; + +// The `updateLevel` mutation requires an argument of type `UpdateLevelVariables`: +const updateLevelVars: UpdateLevelVariables = { + id: ..., + name: ..., // optional + xpRequired: ..., // optional + icon: ..., // optional + colors: ..., // optional +}; + +// Call the `updateLevelRef()` function to get a reference to the mutation. +const ref = updateLevelRef(updateLevelVars); +// Variables can be defined inline as well. +const ref = updateLevelRef({ id: ..., name: ..., xpRequired: ..., icon: ..., colors: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateLevelRef(dataConnect, updateLevelVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.level_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.level_update); +}); +``` + +## deleteLevel +You can execute the `deleteLevel` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteLevel(vars: DeleteLevelVariables): MutationPromise; + +interface DeleteLevelRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteLevelVariables): MutationRef; +} +export const deleteLevelRef: DeleteLevelRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteLevel(dc: DataConnect, vars: DeleteLevelVariables): MutationPromise; + +interface DeleteLevelRef { + ... + (dc: DataConnect, vars: DeleteLevelVariables): MutationRef; +} +export const deleteLevelRef: DeleteLevelRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteLevelRef: +```typescript +const name = deleteLevelRef.operationName; +console.log(name); +``` + +### Variables +The `deleteLevel` mutation requires an argument of type `DeleteLevelVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteLevelVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteLevel` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteLevelData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteLevelData { + level_delete?: Level_Key | null; +} +``` +### Using `deleteLevel`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteLevel, DeleteLevelVariables } from '@dataconnect/generated'; + +// The `deleteLevel` mutation requires an argument of type `DeleteLevelVariables`: +const deleteLevelVars: DeleteLevelVariables = { + id: ..., +}; + +// Call the `deleteLevel()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteLevel(deleteLevelVars); +// Variables can be defined inline as well. +const { data } = await deleteLevel({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteLevel(dataConnect, deleteLevelVars); + +console.log(data.level_delete); + +// Or, you can use the `Promise` API. +deleteLevel(deleteLevelVars).then((response) => { + const data = response.data; + console.log(data.level_delete); +}); +``` + +### Using `deleteLevel`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteLevelRef, DeleteLevelVariables } from '@dataconnect/generated'; + +// The `deleteLevel` mutation requires an argument of type `DeleteLevelVariables`: +const deleteLevelVars: DeleteLevelVariables = { + id: ..., +}; + +// Call the `deleteLevelRef()` function to get a reference to the mutation. +const ref = deleteLevelRef(deleteLevelVars); +// Variables can be defined inline as well. +const ref = deleteLevelRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteLevelRef(dataConnect, deleteLevelVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.level_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.level_delete); +}); +``` + +## createOrder +You can execute the `createOrder` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createOrder(vars: CreateOrderVariables): MutationPromise; + +interface CreateOrderRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateOrderVariables): MutationRef; +} +export const createOrderRef: CreateOrderRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createOrder(dc: DataConnect, vars: CreateOrderVariables): MutationPromise; + +interface CreateOrderRef { + ... + (dc: DataConnect, vars: CreateOrderVariables): MutationRef; +} +export const createOrderRef: CreateOrderRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createOrderRef: +```typescript +const name = createOrderRef.operationName; +console.log(name); +``` + +### Variables +The `createOrder` mutation requires an argument of type `CreateOrderVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateOrderVariables { + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status?: OrderStatus | null; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + eventName?: string | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + teamHubId: UUIDString; + recurringDays?: unknown | null; + permanentStartDate?: TimestampString | null; + permanentDays?: unknown | null; + notes?: string | null; + detectedConflicts?: unknown | null; + poReference?: string | null; +} +``` +### Return Type +Recall that executing the `createOrder` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateOrderData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateOrderData { + order_insert: Order_Key; +} +``` +### Using `createOrder`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createOrder, CreateOrderVariables } from '@dataconnect/generated'; + +// The `createOrder` mutation requires an argument of type `CreateOrderVariables`: +const createOrderVars: CreateOrderVariables = { + vendorId: ..., // optional + businessId: ..., + orderType: ..., + status: ..., // optional + date: ..., // optional + startDate: ..., // optional + endDate: ..., // optional + duration: ..., // optional + lunchBreak: ..., // optional + total: ..., // optional + eventName: ..., // optional + assignedStaff: ..., // optional + shifts: ..., // optional + requested: ..., // optional + teamHubId: ..., + recurringDays: ..., // optional + permanentStartDate: ..., // optional + permanentDays: ..., // optional + notes: ..., // optional + detectedConflicts: ..., // optional + poReference: ..., // optional +}; + +// Call the `createOrder()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createOrder(createOrderVars); +// Variables can be defined inline as well. +const { data } = await createOrder({ vendorId: ..., businessId: ..., orderType: ..., status: ..., date: ..., startDate: ..., endDate: ..., duration: ..., lunchBreak: ..., total: ..., eventName: ..., assignedStaff: ..., shifts: ..., requested: ..., teamHubId: ..., recurringDays: ..., permanentStartDate: ..., permanentDays: ..., notes: ..., detectedConflicts: ..., poReference: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createOrder(dataConnect, createOrderVars); + +console.log(data.order_insert); + +// Or, you can use the `Promise` API. +createOrder(createOrderVars).then((response) => { + const data = response.data; + console.log(data.order_insert); +}); +``` + +### Using `createOrder`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createOrderRef, CreateOrderVariables } from '@dataconnect/generated'; + +// The `createOrder` mutation requires an argument of type `CreateOrderVariables`: +const createOrderVars: CreateOrderVariables = { + vendorId: ..., // optional + businessId: ..., + orderType: ..., + status: ..., // optional + date: ..., // optional + startDate: ..., // optional + endDate: ..., // optional + duration: ..., // optional + lunchBreak: ..., // optional + total: ..., // optional + eventName: ..., // optional + assignedStaff: ..., // optional + shifts: ..., // optional + requested: ..., // optional + teamHubId: ..., + recurringDays: ..., // optional + permanentStartDate: ..., // optional + permanentDays: ..., // optional + notes: ..., // optional + detectedConflicts: ..., // optional + poReference: ..., // optional +}; + +// Call the `createOrderRef()` function to get a reference to the mutation. +const ref = createOrderRef(createOrderVars); +// Variables can be defined inline as well. +const ref = createOrderRef({ vendorId: ..., businessId: ..., orderType: ..., status: ..., date: ..., startDate: ..., endDate: ..., duration: ..., lunchBreak: ..., total: ..., eventName: ..., assignedStaff: ..., shifts: ..., requested: ..., teamHubId: ..., recurringDays: ..., permanentStartDate: ..., permanentDays: ..., notes: ..., detectedConflicts: ..., poReference: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createOrderRef(dataConnect, createOrderVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.order_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.order_insert); +}); +``` + +## updateOrder +You can execute the `updateOrder` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateOrder(vars: UpdateOrderVariables): MutationPromise; + +interface UpdateOrderRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateOrderVariables): MutationRef; +} +export const updateOrderRef: UpdateOrderRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateOrder(dc: DataConnect, vars: UpdateOrderVariables): MutationPromise; + +interface UpdateOrderRef { + ... + (dc: DataConnect, vars: UpdateOrderVariables): MutationRef; +} +export const updateOrderRef: UpdateOrderRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateOrderRef: +```typescript +const name = updateOrderRef.operationName; +console.log(name); +``` + +### Variables +The `updateOrder` mutation requires an argument of type `UpdateOrderVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateOrderVariables { + id: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + status?: OrderStatus | null; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + total?: number | null; + eventName?: string | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + teamHubId: UUIDString; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + detectedConflicts?: unknown | null; + poReference?: string | null; +} +``` +### Return Type +Recall that executing the `updateOrder` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateOrderData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateOrderData { + order_update?: Order_Key | null; +} +``` +### Using `updateOrder`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateOrder, UpdateOrderVariables } from '@dataconnect/generated'; + +// The `updateOrder` mutation requires an argument of type `UpdateOrderVariables`: +const updateOrderVars: UpdateOrderVariables = { + id: ..., + vendorId: ..., // optional + businessId: ..., // optional + status: ..., // optional + date: ..., // optional + startDate: ..., // optional + endDate: ..., // optional + total: ..., // optional + eventName: ..., // optional + assignedStaff: ..., // optional + shifts: ..., // optional + requested: ..., // optional + teamHubId: ..., + recurringDays: ..., // optional + permanentDays: ..., // optional + notes: ..., // optional + detectedConflicts: ..., // optional + poReference: ..., // optional +}; + +// Call the `updateOrder()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateOrder(updateOrderVars); +// Variables can be defined inline as well. +const { data } = await updateOrder({ id: ..., vendorId: ..., businessId: ..., status: ..., date: ..., startDate: ..., endDate: ..., total: ..., eventName: ..., assignedStaff: ..., shifts: ..., requested: ..., teamHubId: ..., recurringDays: ..., permanentDays: ..., notes: ..., detectedConflicts: ..., poReference: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateOrder(dataConnect, updateOrderVars); + +console.log(data.order_update); + +// Or, you can use the `Promise` API. +updateOrder(updateOrderVars).then((response) => { + const data = response.data; + console.log(data.order_update); +}); +``` + +### Using `updateOrder`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateOrderRef, UpdateOrderVariables } from '@dataconnect/generated'; + +// The `updateOrder` mutation requires an argument of type `UpdateOrderVariables`: +const updateOrderVars: UpdateOrderVariables = { + id: ..., + vendorId: ..., // optional + businessId: ..., // optional + status: ..., // optional + date: ..., // optional + startDate: ..., // optional + endDate: ..., // optional + total: ..., // optional + eventName: ..., // optional + assignedStaff: ..., // optional + shifts: ..., // optional + requested: ..., // optional + teamHubId: ..., + recurringDays: ..., // optional + permanentDays: ..., // optional + notes: ..., // optional + detectedConflicts: ..., // optional + poReference: ..., // optional +}; + +// Call the `updateOrderRef()` function to get a reference to the mutation. +const ref = updateOrderRef(updateOrderVars); +// Variables can be defined inline as well. +const ref = updateOrderRef({ id: ..., vendorId: ..., businessId: ..., status: ..., date: ..., startDate: ..., endDate: ..., total: ..., eventName: ..., assignedStaff: ..., shifts: ..., requested: ..., teamHubId: ..., recurringDays: ..., permanentDays: ..., notes: ..., detectedConflicts: ..., poReference: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateOrderRef(dataConnect, updateOrderVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.order_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.order_update); +}); +``` + +## deleteOrder +You can execute the `deleteOrder` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteOrder(vars: DeleteOrderVariables): MutationPromise; + +interface DeleteOrderRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteOrderVariables): MutationRef; +} +export const deleteOrderRef: DeleteOrderRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteOrder(dc: DataConnect, vars: DeleteOrderVariables): MutationPromise; + +interface DeleteOrderRef { + ... + (dc: DataConnect, vars: DeleteOrderVariables): MutationRef; +} +export const deleteOrderRef: DeleteOrderRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteOrderRef: +```typescript +const name = deleteOrderRef.operationName; +console.log(name); +``` + +### Variables +The `deleteOrder` mutation requires an argument of type `DeleteOrderVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteOrderVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteOrder` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteOrderData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteOrderData { + order_delete?: Order_Key | null; +} +``` +### Using `deleteOrder`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteOrder, DeleteOrderVariables } from '@dataconnect/generated'; + +// The `deleteOrder` mutation requires an argument of type `DeleteOrderVariables`: +const deleteOrderVars: DeleteOrderVariables = { + id: ..., +}; + +// Call the `deleteOrder()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteOrder(deleteOrderVars); +// Variables can be defined inline as well. +const { data } = await deleteOrder({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteOrder(dataConnect, deleteOrderVars); + +console.log(data.order_delete); + +// Or, you can use the `Promise` API. +deleteOrder(deleteOrderVars).then((response) => { + const data = response.data; + console.log(data.order_delete); +}); +``` + +### Using `deleteOrder`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteOrderRef, DeleteOrderVariables } from '@dataconnect/generated'; + +// The `deleteOrder` mutation requires an argument of type `DeleteOrderVariables`: +const deleteOrderVars: DeleteOrderVariables = { + id: ..., +}; + +// Call the `deleteOrderRef()` function to get a reference to the mutation. +const ref = deleteOrderRef(deleteOrderVars); +// Variables can be defined inline as well. +const ref = deleteOrderRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteOrderRef(dataConnect, deleteOrderVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.order_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.order_delete); +}); +``` + +## createCategory +You can execute the `createCategory` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createCategory(vars: CreateCategoryVariables): MutationPromise; + +interface CreateCategoryRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateCategoryVariables): MutationRef; +} +export const createCategoryRef: CreateCategoryRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createCategory(dc: DataConnect, vars: CreateCategoryVariables): MutationPromise; + +interface CreateCategoryRef { + ... + (dc: DataConnect, vars: CreateCategoryVariables): MutationRef; +} +export const createCategoryRef: CreateCategoryRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createCategoryRef: +```typescript +const name = createCategoryRef.operationName; +console.log(name); +``` + +### Variables +The `createCategory` mutation requires an argument of type `CreateCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateCategoryVariables { + categoryId: string; + label: string; + icon?: string | null; +} +``` +### Return Type +Recall that executing the `createCategory` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateCategoryData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateCategoryData { + category_insert: Category_Key; +} +``` +### Using `createCategory`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createCategory, CreateCategoryVariables } from '@dataconnect/generated'; + +// The `createCategory` mutation requires an argument of type `CreateCategoryVariables`: +const createCategoryVars: CreateCategoryVariables = { + categoryId: ..., + label: ..., + icon: ..., // optional +}; + +// Call the `createCategory()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createCategory(createCategoryVars); +// Variables can be defined inline as well. +const { data } = await createCategory({ categoryId: ..., label: ..., icon: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createCategory(dataConnect, createCategoryVars); + +console.log(data.category_insert); + +// Or, you can use the `Promise` API. +createCategory(createCategoryVars).then((response) => { + const data = response.data; + console.log(data.category_insert); +}); +``` + +### Using `createCategory`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createCategoryRef, CreateCategoryVariables } from '@dataconnect/generated'; + +// The `createCategory` mutation requires an argument of type `CreateCategoryVariables`: +const createCategoryVars: CreateCategoryVariables = { + categoryId: ..., + label: ..., + icon: ..., // optional +}; + +// Call the `createCategoryRef()` function to get a reference to the mutation. +const ref = createCategoryRef(createCategoryVars); +// Variables can be defined inline as well. +const ref = createCategoryRef({ categoryId: ..., label: ..., icon: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createCategoryRef(dataConnect, createCategoryVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.category_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.category_insert); +}); +``` + +## updateCategory +You can execute the `updateCategory` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateCategory(vars: UpdateCategoryVariables): MutationPromise; + +interface UpdateCategoryRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateCategoryVariables): MutationRef; +} +export const updateCategoryRef: UpdateCategoryRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateCategory(dc: DataConnect, vars: UpdateCategoryVariables): MutationPromise; + +interface UpdateCategoryRef { + ... + (dc: DataConnect, vars: UpdateCategoryVariables): MutationRef; +} +export const updateCategoryRef: UpdateCategoryRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateCategoryRef: +```typescript +const name = updateCategoryRef.operationName; +console.log(name); +``` + +### Variables +The `updateCategory` mutation requires an argument of type `UpdateCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateCategoryVariables { + id: UUIDString; + categoryId?: string | null; + label?: string | null; + icon?: string | null; +} +``` +### Return Type +Recall that executing the `updateCategory` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateCategoryData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateCategoryData { + category_update?: Category_Key | null; +} +``` +### Using `updateCategory`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateCategory, UpdateCategoryVariables } from '@dataconnect/generated'; + +// The `updateCategory` mutation requires an argument of type `UpdateCategoryVariables`: +const updateCategoryVars: UpdateCategoryVariables = { + id: ..., + categoryId: ..., // optional + label: ..., // optional + icon: ..., // optional +}; + +// Call the `updateCategory()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateCategory(updateCategoryVars); +// Variables can be defined inline as well. +const { data } = await updateCategory({ id: ..., categoryId: ..., label: ..., icon: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateCategory(dataConnect, updateCategoryVars); + +console.log(data.category_update); + +// Or, you can use the `Promise` API. +updateCategory(updateCategoryVars).then((response) => { + const data = response.data; + console.log(data.category_update); +}); +``` + +### Using `updateCategory`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateCategoryRef, UpdateCategoryVariables } from '@dataconnect/generated'; + +// The `updateCategory` mutation requires an argument of type `UpdateCategoryVariables`: +const updateCategoryVars: UpdateCategoryVariables = { + id: ..., + categoryId: ..., // optional + label: ..., // optional + icon: ..., // optional +}; + +// Call the `updateCategoryRef()` function to get a reference to the mutation. +const ref = updateCategoryRef(updateCategoryVars); +// Variables can be defined inline as well. +const ref = updateCategoryRef({ id: ..., categoryId: ..., label: ..., icon: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateCategoryRef(dataConnect, updateCategoryVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.category_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.category_update); +}); +``` + +## deleteCategory +You can execute the `deleteCategory` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteCategory(vars: DeleteCategoryVariables): MutationPromise; + +interface DeleteCategoryRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteCategoryVariables): MutationRef; +} +export const deleteCategoryRef: DeleteCategoryRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteCategory(dc: DataConnect, vars: DeleteCategoryVariables): MutationPromise; + +interface DeleteCategoryRef { + ... + (dc: DataConnect, vars: DeleteCategoryVariables): MutationRef; +} +export const deleteCategoryRef: DeleteCategoryRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteCategoryRef: +```typescript +const name = deleteCategoryRef.operationName; +console.log(name); +``` + +### Variables +The `deleteCategory` mutation requires an argument of type `DeleteCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteCategoryVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteCategory` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteCategoryData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteCategoryData { + category_delete?: Category_Key | null; +} +``` +### Using `deleteCategory`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteCategory, DeleteCategoryVariables } from '@dataconnect/generated'; + +// The `deleteCategory` mutation requires an argument of type `DeleteCategoryVariables`: +const deleteCategoryVars: DeleteCategoryVariables = { + id: ..., +}; + +// Call the `deleteCategory()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteCategory(deleteCategoryVars); +// Variables can be defined inline as well. +const { data } = await deleteCategory({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteCategory(dataConnect, deleteCategoryVars); + +console.log(data.category_delete); + +// Or, you can use the `Promise` API. +deleteCategory(deleteCategoryVars).then((response) => { + const data = response.data; + console.log(data.category_delete); +}); +``` + +### Using `deleteCategory`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteCategoryRef, DeleteCategoryVariables } from '@dataconnect/generated'; + +// The `deleteCategory` mutation requires an argument of type `DeleteCategoryVariables`: +const deleteCategoryVars: DeleteCategoryVariables = { + id: ..., +}; + +// Call the `deleteCategoryRef()` function to get a reference to the mutation. +const ref = deleteCategoryRef(deleteCategoryVars); +// Variables can be defined inline as well. +const ref = deleteCategoryRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteCategoryRef(dataConnect, deleteCategoryVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.category_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.category_delete); +}); +``` + +## createTaxForm +You can execute the `createTaxForm` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createTaxForm(vars: CreateTaxFormVariables): MutationPromise; + +interface CreateTaxFormRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTaxFormVariables): MutationRef; +} +export const createTaxFormRef: CreateTaxFormRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createTaxForm(dc: DataConnect, vars: CreateTaxFormVariables): MutationPromise; + +interface CreateTaxFormRef { + ... + (dc: DataConnect, vars: CreateTaxFormVariables): MutationRef; +} +export const createTaxFormRef: CreateTaxFormRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createTaxFormRef: +```typescript +const name = createTaxFormRef.operationName; +console.log(name); +``` + +### Variables +The `createTaxForm` mutation requires an argument of type `CreateTaxFormVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateTaxFormVariables { + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + apt?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdBy?: string | null; +} +``` +### Return Type +Recall that executing the `createTaxForm` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateTaxFormData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateTaxFormData { + taxForm_insert: TaxForm_Key; +} +``` +### Using `createTaxForm`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createTaxForm, CreateTaxFormVariables } from '@dataconnect/generated'; + +// The `createTaxForm` mutation requires an argument of type `CreateTaxFormVariables`: +const createTaxFormVars: CreateTaxFormVariables = { + formType: ..., + firstName: ..., + lastName: ..., + mInitial: ..., // optional + oLastName: ..., // optional + dob: ..., // optional + socialSN: ..., + email: ..., // optional + phone: ..., // optional + address: ..., + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + apt: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + marital: ..., // optional + multipleJob: ..., // optional + childrens: ..., // optional + otherDeps: ..., // optional + totalCredits: ..., // optional + otherInconme: ..., // optional + deductions: ..., // optional + extraWithholding: ..., // optional + citizen: ..., // optional + uscis: ..., // optional + passportNumber: ..., // optional + countryIssue: ..., // optional + prepartorOrTranslator: ..., // optional + signature: ..., // optional + date: ..., // optional + status: ..., + staffId: ..., + createdBy: ..., // optional +}; + +// Call the `createTaxForm()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createTaxForm(createTaxFormVars); +// Variables can be defined inline as well. +const { data } = await createTaxForm({ formType: ..., firstName: ..., lastName: ..., mInitial: ..., oLastName: ..., dob: ..., socialSN: ..., email: ..., phone: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., apt: ..., state: ..., street: ..., country: ..., zipCode: ..., marital: ..., multipleJob: ..., childrens: ..., otherDeps: ..., totalCredits: ..., otherInconme: ..., deductions: ..., extraWithholding: ..., citizen: ..., uscis: ..., passportNumber: ..., countryIssue: ..., prepartorOrTranslator: ..., signature: ..., date: ..., status: ..., staffId: ..., createdBy: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createTaxForm(dataConnect, createTaxFormVars); + +console.log(data.taxForm_insert); + +// Or, you can use the `Promise` API. +createTaxForm(createTaxFormVars).then((response) => { + const data = response.data; + console.log(data.taxForm_insert); +}); +``` + +### Using `createTaxForm`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createTaxFormRef, CreateTaxFormVariables } from '@dataconnect/generated'; + +// The `createTaxForm` mutation requires an argument of type `CreateTaxFormVariables`: +const createTaxFormVars: CreateTaxFormVariables = { + formType: ..., + firstName: ..., + lastName: ..., + mInitial: ..., // optional + oLastName: ..., // optional + dob: ..., // optional + socialSN: ..., + email: ..., // optional + phone: ..., // optional + address: ..., + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + apt: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + marital: ..., // optional + multipleJob: ..., // optional + childrens: ..., // optional + otherDeps: ..., // optional + totalCredits: ..., // optional + otherInconme: ..., // optional + deductions: ..., // optional + extraWithholding: ..., // optional + citizen: ..., // optional + uscis: ..., // optional + passportNumber: ..., // optional + countryIssue: ..., // optional + prepartorOrTranslator: ..., // optional + signature: ..., // optional + date: ..., // optional + status: ..., + staffId: ..., + createdBy: ..., // optional +}; + +// Call the `createTaxFormRef()` function to get a reference to the mutation. +const ref = createTaxFormRef(createTaxFormVars); +// Variables can be defined inline as well. +const ref = createTaxFormRef({ formType: ..., firstName: ..., lastName: ..., mInitial: ..., oLastName: ..., dob: ..., socialSN: ..., email: ..., phone: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., apt: ..., state: ..., street: ..., country: ..., zipCode: ..., marital: ..., multipleJob: ..., childrens: ..., otherDeps: ..., totalCredits: ..., otherInconme: ..., deductions: ..., extraWithholding: ..., citizen: ..., uscis: ..., passportNumber: ..., countryIssue: ..., prepartorOrTranslator: ..., signature: ..., date: ..., status: ..., staffId: ..., createdBy: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createTaxFormRef(dataConnect, createTaxFormVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.taxForm_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.taxForm_insert); +}); +``` + +## updateTaxForm +You can execute the `updateTaxForm` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateTaxForm(vars: UpdateTaxFormVariables): MutationPromise; + +interface UpdateTaxFormRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTaxFormVariables): MutationRef; +} +export const updateTaxFormRef: UpdateTaxFormRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateTaxForm(dc: DataConnect, vars: UpdateTaxFormVariables): MutationPromise; + +interface UpdateTaxFormRef { + ... + (dc: DataConnect, vars: UpdateTaxFormVariables): MutationRef; +} +export const updateTaxFormRef: UpdateTaxFormRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateTaxFormRef: +```typescript +const name = updateTaxFormRef.operationName; +console.log(name); +``` + +### Variables +The `updateTaxForm` mutation requires an argument of type `UpdateTaxFormVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateTaxFormVariables { + id: UUIDString; + formType?: TaxFormType | null; + firstName?: string | null; + lastName?: string | null; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN?: number | null; + email?: string | null; + phone?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + apt?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status?: TaxFormStatus | null; +} +``` +### Return Type +Recall that executing the `updateTaxForm` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateTaxFormData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateTaxFormData { + taxForm_update?: TaxForm_Key | null; +} +``` +### Using `updateTaxForm`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateTaxForm, UpdateTaxFormVariables } from '@dataconnect/generated'; + +// The `updateTaxForm` mutation requires an argument of type `UpdateTaxFormVariables`: +const updateTaxFormVars: UpdateTaxFormVariables = { + id: ..., + formType: ..., // optional + firstName: ..., // optional + lastName: ..., // optional + mInitial: ..., // optional + oLastName: ..., // optional + dob: ..., // optional + socialSN: ..., // optional + email: ..., // optional + phone: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + apt: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + marital: ..., // optional + multipleJob: ..., // optional + childrens: ..., // optional + otherDeps: ..., // optional + totalCredits: ..., // optional + otherInconme: ..., // optional + deductions: ..., // optional + extraWithholding: ..., // optional + citizen: ..., // optional + uscis: ..., // optional + passportNumber: ..., // optional + countryIssue: ..., // optional + prepartorOrTranslator: ..., // optional + signature: ..., // optional + date: ..., // optional + status: ..., // optional +}; + +// Call the `updateTaxForm()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateTaxForm(updateTaxFormVars); +// Variables can be defined inline as well. +const { data } = await updateTaxForm({ id: ..., formType: ..., firstName: ..., lastName: ..., mInitial: ..., oLastName: ..., dob: ..., socialSN: ..., email: ..., phone: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., apt: ..., state: ..., street: ..., country: ..., zipCode: ..., marital: ..., multipleJob: ..., childrens: ..., otherDeps: ..., totalCredits: ..., otherInconme: ..., deductions: ..., extraWithholding: ..., citizen: ..., uscis: ..., passportNumber: ..., countryIssue: ..., prepartorOrTranslator: ..., signature: ..., date: ..., status: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateTaxForm(dataConnect, updateTaxFormVars); + +console.log(data.taxForm_update); + +// Or, you can use the `Promise` API. +updateTaxForm(updateTaxFormVars).then((response) => { + const data = response.data; + console.log(data.taxForm_update); +}); +``` + +### Using `updateTaxForm`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateTaxFormRef, UpdateTaxFormVariables } from '@dataconnect/generated'; + +// The `updateTaxForm` mutation requires an argument of type `UpdateTaxFormVariables`: +const updateTaxFormVars: UpdateTaxFormVariables = { + id: ..., + formType: ..., // optional + firstName: ..., // optional + lastName: ..., // optional + mInitial: ..., // optional + oLastName: ..., // optional + dob: ..., // optional + socialSN: ..., // optional + email: ..., // optional + phone: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + apt: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + marital: ..., // optional + multipleJob: ..., // optional + childrens: ..., // optional + otherDeps: ..., // optional + totalCredits: ..., // optional + otherInconme: ..., // optional + deductions: ..., // optional + extraWithholding: ..., // optional + citizen: ..., // optional + uscis: ..., // optional + passportNumber: ..., // optional + countryIssue: ..., // optional + prepartorOrTranslator: ..., // optional + signature: ..., // optional + date: ..., // optional + status: ..., // optional +}; + +// Call the `updateTaxFormRef()` function to get a reference to the mutation. +const ref = updateTaxFormRef(updateTaxFormVars); +// Variables can be defined inline as well. +const ref = updateTaxFormRef({ id: ..., formType: ..., firstName: ..., lastName: ..., mInitial: ..., oLastName: ..., dob: ..., socialSN: ..., email: ..., phone: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., apt: ..., state: ..., street: ..., country: ..., zipCode: ..., marital: ..., multipleJob: ..., childrens: ..., otherDeps: ..., totalCredits: ..., otherInconme: ..., deductions: ..., extraWithholding: ..., citizen: ..., uscis: ..., passportNumber: ..., countryIssue: ..., prepartorOrTranslator: ..., signature: ..., date: ..., status: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateTaxFormRef(dataConnect, updateTaxFormVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.taxForm_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.taxForm_update); +}); +``` + +## deleteTaxForm +You can execute the `deleteTaxForm` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteTaxForm(vars: DeleteTaxFormVariables): MutationPromise; + +interface DeleteTaxFormRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTaxFormVariables): MutationRef; +} +export const deleteTaxFormRef: DeleteTaxFormRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteTaxForm(dc: DataConnect, vars: DeleteTaxFormVariables): MutationPromise; + +interface DeleteTaxFormRef { + ... + (dc: DataConnect, vars: DeleteTaxFormVariables): MutationRef; +} +export const deleteTaxFormRef: DeleteTaxFormRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteTaxFormRef: +```typescript +const name = deleteTaxFormRef.operationName; +console.log(name); +``` + +### Variables +The `deleteTaxForm` mutation requires an argument of type `DeleteTaxFormVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteTaxFormVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteTaxForm` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteTaxFormData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteTaxFormData { + taxForm_delete?: TaxForm_Key | null; +} +``` +### Using `deleteTaxForm`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteTaxForm, DeleteTaxFormVariables } from '@dataconnect/generated'; + +// The `deleteTaxForm` mutation requires an argument of type `DeleteTaxFormVariables`: +const deleteTaxFormVars: DeleteTaxFormVariables = { + id: ..., +}; + +// Call the `deleteTaxForm()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteTaxForm(deleteTaxFormVars); +// Variables can be defined inline as well. +const { data } = await deleteTaxForm({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteTaxForm(dataConnect, deleteTaxFormVars); + +console.log(data.taxForm_delete); + +// Or, you can use the `Promise` API. +deleteTaxForm(deleteTaxFormVars).then((response) => { + const data = response.data; + console.log(data.taxForm_delete); +}); +``` + +### Using `deleteTaxForm`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteTaxFormRef, DeleteTaxFormVariables } from '@dataconnect/generated'; + +// The `deleteTaxForm` mutation requires an argument of type `DeleteTaxFormVariables`: +const deleteTaxFormVars: DeleteTaxFormVariables = { + id: ..., +}; + +// Call the `deleteTaxFormRef()` function to get a reference to the mutation. +const ref = deleteTaxFormRef(deleteTaxFormVars); +// Variables can be defined inline as well. +const ref = deleteTaxFormRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteTaxFormRef(dataConnect, deleteTaxFormVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.taxForm_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.taxForm_delete); +}); +``` + +## createVendorRate +You can execute the `createVendorRate` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createVendorRate(vars: CreateVendorRateVariables): MutationPromise; + +interface CreateVendorRateRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateVendorRateVariables): MutationRef; +} +export const createVendorRateRef: CreateVendorRateRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createVendorRate(dc: DataConnect, vars: CreateVendorRateVariables): MutationPromise; + +interface CreateVendorRateRef { + ... + (dc: DataConnect, vars: CreateVendorRateVariables): MutationRef; +} +export const createVendorRateRef: CreateVendorRateRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createVendorRateRef: +```typescript +const name = createVendorRateRef.operationName; +console.log(name); +``` + +### Variables +The `createVendorRate` mutation requires an argument of type `CreateVendorRateVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateVendorRateVariables { + vendorId: UUIDString; + roleName?: string | null; + category?: CategoryType | null; + clientRate?: number | null; + employeeWage?: number | null; + markupPercentage?: number | null; + vendorFeePercentage?: number | null; + isActive?: boolean | null; + notes?: string | null; +} +``` +### Return Type +Recall that executing the `createVendorRate` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateVendorRateData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateVendorRateData { + vendorRate_insert: VendorRate_Key; +} +``` +### Using `createVendorRate`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createVendorRate, CreateVendorRateVariables } from '@dataconnect/generated'; + +// The `createVendorRate` mutation requires an argument of type `CreateVendorRateVariables`: +const createVendorRateVars: CreateVendorRateVariables = { + vendorId: ..., + roleName: ..., // optional + category: ..., // optional + clientRate: ..., // optional + employeeWage: ..., // optional + markupPercentage: ..., // optional + vendorFeePercentage: ..., // optional + isActive: ..., // optional + notes: ..., // optional +}; + +// Call the `createVendorRate()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createVendorRate(createVendorRateVars); +// Variables can be defined inline as well. +const { data } = await createVendorRate({ vendorId: ..., roleName: ..., category: ..., clientRate: ..., employeeWage: ..., markupPercentage: ..., vendorFeePercentage: ..., isActive: ..., notes: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createVendorRate(dataConnect, createVendorRateVars); + +console.log(data.vendorRate_insert); + +// Or, you can use the `Promise` API. +createVendorRate(createVendorRateVars).then((response) => { + const data = response.data; + console.log(data.vendorRate_insert); +}); +``` + +### Using `createVendorRate`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createVendorRateRef, CreateVendorRateVariables } from '@dataconnect/generated'; + +// The `createVendorRate` mutation requires an argument of type `CreateVendorRateVariables`: +const createVendorRateVars: CreateVendorRateVariables = { + vendorId: ..., + roleName: ..., // optional + category: ..., // optional + clientRate: ..., // optional + employeeWage: ..., // optional + markupPercentage: ..., // optional + vendorFeePercentage: ..., // optional + isActive: ..., // optional + notes: ..., // optional +}; + +// Call the `createVendorRateRef()` function to get a reference to the mutation. +const ref = createVendorRateRef(createVendorRateVars); +// Variables can be defined inline as well. +const ref = createVendorRateRef({ vendorId: ..., roleName: ..., category: ..., clientRate: ..., employeeWage: ..., markupPercentage: ..., vendorFeePercentage: ..., isActive: ..., notes: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createVendorRateRef(dataConnect, createVendorRateVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.vendorRate_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.vendorRate_insert); +}); +``` + +## updateVendorRate +You can execute the `updateVendorRate` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateVendorRate(vars: UpdateVendorRateVariables): MutationPromise; + +interface UpdateVendorRateRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateVendorRateVariables): MutationRef; +} +export const updateVendorRateRef: UpdateVendorRateRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateVendorRate(dc: DataConnect, vars: UpdateVendorRateVariables): MutationPromise; + +interface UpdateVendorRateRef { + ... + (dc: DataConnect, vars: UpdateVendorRateVariables): MutationRef; +} +export const updateVendorRateRef: UpdateVendorRateRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateVendorRateRef: +```typescript +const name = updateVendorRateRef.operationName; +console.log(name); +``` + +### Variables +The `updateVendorRate` mutation requires an argument of type `UpdateVendorRateVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateVendorRateVariables { + id: UUIDString; + vendorId?: UUIDString | null; + roleName?: string | null; + category?: CategoryType | null; + clientRate?: number | null; + employeeWage?: number | null; + markupPercentage?: number | null; + vendorFeePercentage?: number | null; + isActive?: boolean | null; + notes?: string | null; +} +``` +### Return Type +Recall that executing the `updateVendorRate` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateVendorRateData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateVendorRateData { + vendorRate_update?: VendorRate_Key | null; +} +``` +### Using `updateVendorRate`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateVendorRate, UpdateVendorRateVariables } from '@dataconnect/generated'; + +// The `updateVendorRate` mutation requires an argument of type `UpdateVendorRateVariables`: +const updateVendorRateVars: UpdateVendorRateVariables = { + id: ..., + vendorId: ..., // optional + roleName: ..., // optional + category: ..., // optional + clientRate: ..., // optional + employeeWage: ..., // optional + markupPercentage: ..., // optional + vendorFeePercentage: ..., // optional + isActive: ..., // optional + notes: ..., // optional +}; + +// Call the `updateVendorRate()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateVendorRate(updateVendorRateVars); +// Variables can be defined inline as well. +const { data } = await updateVendorRate({ id: ..., vendorId: ..., roleName: ..., category: ..., clientRate: ..., employeeWage: ..., markupPercentage: ..., vendorFeePercentage: ..., isActive: ..., notes: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateVendorRate(dataConnect, updateVendorRateVars); + +console.log(data.vendorRate_update); + +// Or, you can use the `Promise` API. +updateVendorRate(updateVendorRateVars).then((response) => { + const data = response.data; + console.log(data.vendorRate_update); +}); +``` + +### Using `updateVendorRate`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateVendorRateRef, UpdateVendorRateVariables } from '@dataconnect/generated'; + +// The `updateVendorRate` mutation requires an argument of type `UpdateVendorRateVariables`: +const updateVendorRateVars: UpdateVendorRateVariables = { + id: ..., + vendorId: ..., // optional + roleName: ..., // optional + category: ..., // optional + clientRate: ..., // optional + employeeWage: ..., // optional + markupPercentage: ..., // optional + vendorFeePercentage: ..., // optional + isActive: ..., // optional + notes: ..., // optional +}; + +// Call the `updateVendorRateRef()` function to get a reference to the mutation. +const ref = updateVendorRateRef(updateVendorRateVars); +// Variables can be defined inline as well. +const ref = updateVendorRateRef({ id: ..., vendorId: ..., roleName: ..., category: ..., clientRate: ..., employeeWage: ..., markupPercentage: ..., vendorFeePercentage: ..., isActive: ..., notes: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateVendorRateRef(dataConnect, updateVendorRateVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.vendorRate_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.vendorRate_update); +}); +``` + +## deleteVendorRate +You can execute the `deleteVendorRate` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteVendorRate(vars: DeleteVendorRateVariables): MutationPromise; + +interface DeleteVendorRateRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteVendorRateVariables): MutationRef; +} +export const deleteVendorRateRef: DeleteVendorRateRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteVendorRate(dc: DataConnect, vars: DeleteVendorRateVariables): MutationPromise; + +interface DeleteVendorRateRef { + ... + (dc: DataConnect, vars: DeleteVendorRateVariables): MutationRef; +} +export const deleteVendorRateRef: DeleteVendorRateRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteVendorRateRef: +```typescript +const name = deleteVendorRateRef.operationName; +console.log(name); +``` + +### Variables +The `deleteVendorRate` mutation requires an argument of type `DeleteVendorRateVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteVendorRateVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteVendorRate` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteVendorRateData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteVendorRateData { + vendorRate_delete?: VendorRate_Key | null; +} +``` +### Using `deleteVendorRate`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteVendorRate, DeleteVendorRateVariables } from '@dataconnect/generated'; + +// The `deleteVendorRate` mutation requires an argument of type `DeleteVendorRateVariables`: +const deleteVendorRateVars: DeleteVendorRateVariables = { + id: ..., +}; + +// Call the `deleteVendorRate()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteVendorRate(deleteVendorRateVars); +// Variables can be defined inline as well. +const { data } = await deleteVendorRate({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteVendorRate(dataConnect, deleteVendorRateVars); + +console.log(data.vendorRate_delete); + +// Or, you can use the `Promise` API. +deleteVendorRate(deleteVendorRateVars).then((response) => { + const data = response.data; + console.log(data.vendorRate_delete); +}); +``` + +### Using `deleteVendorRate`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteVendorRateRef, DeleteVendorRateVariables } from '@dataconnect/generated'; + +// The `deleteVendorRate` mutation requires an argument of type `DeleteVendorRateVariables`: +const deleteVendorRateVars: DeleteVendorRateVariables = { + id: ..., +}; + +// Call the `deleteVendorRateRef()` function to get a reference to the mutation. +const ref = deleteVendorRateRef(deleteVendorRateVars); +// Variables can be defined inline as well. +const ref = deleteVendorRateRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteVendorRateRef(dataConnect, deleteVendorRateVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.vendorRate_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.vendorRate_delete); +}); +``` + +## createActivityLog +You can execute the `createActivityLog` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createActivityLog(vars: CreateActivityLogVariables): MutationPromise; + +interface CreateActivityLogRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateActivityLogVariables): MutationRef; +} +export const createActivityLogRef: CreateActivityLogRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createActivityLog(dc: DataConnect, vars: CreateActivityLogVariables): MutationPromise; + +interface CreateActivityLogRef { + ... + (dc: DataConnect, vars: CreateActivityLogVariables): MutationRef; +} +export const createActivityLogRef: CreateActivityLogRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createActivityLogRef: +```typescript +const name = createActivityLogRef.operationName; +console.log(name); +``` + +### Variables +The `createActivityLog` mutation requires an argument of type `CreateActivityLogVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateActivityLogVariables { + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; +} +``` +### Return Type +Recall that executing the `createActivityLog` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateActivityLogData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateActivityLogData { + activityLog_insert: ActivityLog_Key; +} +``` +### Using `createActivityLog`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createActivityLog, CreateActivityLogVariables } from '@dataconnect/generated'; + +// The `createActivityLog` mutation requires an argument of type `CreateActivityLogVariables`: +const createActivityLogVars: CreateActivityLogVariables = { + userId: ..., + date: ..., + hourStart: ..., // optional + hourEnd: ..., // optional + totalhours: ..., // optional + iconType: ..., // optional + iconColor: ..., // optional + title: ..., + description: ..., + isRead: ..., // optional + activityType: ..., +}; + +// Call the `createActivityLog()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createActivityLog(createActivityLogVars); +// Variables can be defined inline as well. +const { data } = await createActivityLog({ userId: ..., date: ..., hourStart: ..., hourEnd: ..., totalhours: ..., iconType: ..., iconColor: ..., title: ..., description: ..., isRead: ..., activityType: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createActivityLog(dataConnect, createActivityLogVars); + +console.log(data.activityLog_insert); + +// Or, you can use the `Promise` API. +createActivityLog(createActivityLogVars).then((response) => { + const data = response.data; + console.log(data.activityLog_insert); +}); +``` + +### Using `createActivityLog`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createActivityLogRef, CreateActivityLogVariables } from '@dataconnect/generated'; + +// The `createActivityLog` mutation requires an argument of type `CreateActivityLogVariables`: +const createActivityLogVars: CreateActivityLogVariables = { + userId: ..., + date: ..., + hourStart: ..., // optional + hourEnd: ..., // optional + totalhours: ..., // optional + iconType: ..., // optional + iconColor: ..., // optional + title: ..., + description: ..., + isRead: ..., // optional + activityType: ..., +}; + +// Call the `createActivityLogRef()` function to get a reference to the mutation. +const ref = createActivityLogRef(createActivityLogVars); +// Variables can be defined inline as well. +const ref = createActivityLogRef({ userId: ..., date: ..., hourStart: ..., hourEnd: ..., totalhours: ..., iconType: ..., iconColor: ..., title: ..., description: ..., isRead: ..., activityType: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createActivityLogRef(dataConnect, createActivityLogVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.activityLog_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.activityLog_insert); +}); +``` + +## updateActivityLog +You can execute the `updateActivityLog` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateActivityLog(vars: UpdateActivityLogVariables): MutationPromise; + +interface UpdateActivityLogRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateActivityLogVariables): MutationRef; +} +export const updateActivityLogRef: UpdateActivityLogRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateActivityLog(dc: DataConnect, vars: UpdateActivityLogVariables): MutationPromise; + +interface UpdateActivityLogRef { + ... + (dc: DataConnect, vars: UpdateActivityLogVariables): MutationRef; +} +export const updateActivityLogRef: UpdateActivityLogRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateActivityLogRef: +```typescript +const name = updateActivityLogRef.operationName; +console.log(name); +``` + +### Variables +The `updateActivityLog` mutation requires an argument of type `UpdateActivityLogVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateActivityLogVariables { + id: UUIDString; + userId?: string | null; + date?: TimestampString | null; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title?: string | null; + description?: string | null; + isRead?: boolean | null; + activityType?: ActivityType | null; +} +``` +### Return Type +Recall that executing the `updateActivityLog` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateActivityLogData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateActivityLogData { + activityLog_update?: ActivityLog_Key | null; +} +``` +### Using `updateActivityLog`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateActivityLog, UpdateActivityLogVariables } from '@dataconnect/generated'; + +// The `updateActivityLog` mutation requires an argument of type `UpdateActivityLogVariables`: +const updateActivityLogVars: UpdateActivityLogVariables = { + id: ..., + userId: ..., // optional + date: ..., // optional + hourStart: ..., // optional + hourEnd: ..., // optional + totalhours: ..., // optional + iconType: ..., // optional + iconColor: ..., // optional + title: ..., // optional + description: ..., // optional + isRead: ..., // optional + activityType: ..., // optional +}; + +// Call the `updateActivityLog()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateActivityLog(updateActivityLogVars); +// Variables can be defined inline as well. +const { data } = await updateActivityLog({ id: ..., userId: ..., date: ..., hourStart: ..., hourEnd: ..., totalhours: ..., iconType: ..., iconColor: ..., title: ..., description: ..., isRead: ..., activityType: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateActivityLog(dataConnect, updateActivityLogVars); + +console.log(data.activityLog_update); + +// Or, you can use the `Promise` API. +updateActivityLog(updateActivityLogVars).then((response) => { + const data = response.data; + console.log(data.activityLog_update); +}); +``` + +### Using `updateActivityLog`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateActivityLogRef, UpdateActivityLogVariables } from '@dataconnect/generated'; + +// The `updateActivityLog` mutation requires an argument of type `UpdateActivityLogVariables`: +const updateActivityLogVars: UpdateActivityLogVariables = { + id: ..., + userId: ..., // optional + date: ..., // optional + hourStart: ..., // optional + hourEnd: ..., // optional + totalhours: ..., // optional + iconType: ..., // optional + iconColor: ..., // optional + title: ..., // optional + description: ..., // optional + isRead: ..., // optional + activityType: ..., // optional +}; + +// Call the `updateActivityLogRef()` function to get a reference to the mutation. +const ref = updateActivityLogRef(updateActivityLogVars); +// Variables can be defined inline as well. +const ref = updateActivityLogRef({ id: ..., userId: ..., date: ..., hourStart: ..., hourEnd: ..., totalhours: ..., iconType: ..., iconColor: ..., title: ..., description: ..., isRead: ..., activityType: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateActivityLogRef(dataConnect, updateActivityLogVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.activityLog_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.activityLog_update); +}); +``` + +## markActivityLogAsRead +You can execute the `markActivityLogAsRead` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +markActivityLogAsRead(vars: MarkActivityLogAsReadVariables): MutationPromise; + +interface MarkActivityLogAsReadRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: MarkActivityLogAsReadVariables): MutationRef; +} +export const markActivityLogAsReadRef: MarkActivityLogAsReadRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +markActivityLogAsRead(dc: DataConnect, vars: MarkActivityLogAsReadVariables): MutationPromise; + +interface MarkActivityLogAsReadRef { + ... + (dc: DataConnect, vars: MarkActivityLogAsReadVariables): MutationRef; +} +export const markActivityLogAsReadRef: MarkActivityLogAsReadRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the markActivityLogAsReadRef: +```typescript +const name = markActivityLogAsReadRef.operationName; +console.log(name); +``` + +### Variables +The `markActivityLogAsRead` mutation requires an argument of type `MarkActivityLogAsReadVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface MarkActivityLogAsReadVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `markActivityLogAsRead` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `MarkActivityLogAsReadData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface MarkActivityLogAsReadData { + activityLog_update?: ActivityLog_Key | null; +} +``` +### Using `markActivityLogAsRead`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, markActivityLogAsRead, MarkActivityLogAsReadVariables } from '@dataconnect/generated'; + +// The `markActivityLogAsRead` mutation requires an argument of type `MarkActivityLogAsReadVariables`: +const markActivityLogAsReadVars: MarkActivityLogAsReadVariables = { + id: ..., +}; + +// Call the `markActivityLogAsRead()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await markActivityLogAsRead(markActivityLogAsReadVars); +// Variables can be defined inline as well. +const { data } = await markActivityLogAsRead({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await markActivityLogAsRead(dataConnect, markActivityLogAsReadVars); + +console.log(data.activityLog_update); + +// Or, you can use the `Promise` API. +markActivityLogAsRead(markActivityLogAsReadVars).then((response) => { + const data = response.data; + console.log(data.activityLog_update); +}); +``` + +### Using `markActivityLogAsRead`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, markActivityLogAsReadRef, MarkActivityLogAsReadVariables } from '@dataconnect/generated'; + +// The `markActivityLogAsRead` mutation requires an argument of type `MarkActivityLogAsReadVariables`: +const markActivityLogAsReadVars: MarkActivityLogAsReadVariables = { + id: ..., +}; + +// Call the `markActivityLogAsReadRef()` function to get a reference to the mutation. +const ref = markActivityLogAsReadRef(markActivityLogAsReadVars); +// Variables can be defined inline as well. +const ref = markActivityLogAsReadRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = markActivityLogAsReadRef(dataConnect, markActivityLogAsReadVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.activityLog_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.activityLog_update); +}); +``` + +## markActivityLogsAsRead +You can execute the `markActivityLogsAsRead` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +markActivityLogsAsRead(vars: MarkActivityLogsAsReadVariables): MutationPromise; + +interface MarkActivityLogsAsReadRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: MarkActivityLogsAsReadVariables): MutationRef; +} +export const markActivityLogsAsReadRef: MarkActivityLogsAsReadRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +markActivityLogsAsRead(dc: DataConnect, vars: MarkActivityLogsAsReadVariables): MutationPromise; + +interface MarkActivityLogsAsReadRef { + ... + (dc: DataConnect, vars: MarkActivityLogsAsReadVariables): MutationRef; +} +export const markActivityLogsAsReadRef: MarkActivityLogsAsReadRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the markActivityLogsAsReadRef: +```typescript +const name = markActivityLogsAsReadRef.operationName; +console.log(name); +``` + +### Variables +The `markActivityLogsAsRead` mutation requires an argument of type `MarkActivityLogsAsReadVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface MarkActivityLogsAsReadVariables { + ids: UUIDString[]; +} +``` +### Return Type +Recall that executing the `markActivityLogsAsRead` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `MarkActivityLogsAsReadData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface MarkActivityLogsAsReadData { + activityLog_updateMany: number; +} +``` +### Using `markActivityLogsAsRead`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, markActivityLogsAsRead, MarkActivityLogsAsReadVariables } from '@dataconnect/generated'; + +// The `markActivityLogsAsRead` mutation requires an argument of type `MarkActivityLogsAsReadVariables`: +const markActivityLogsAsReadVars: MarkActivityLogsAsReadVariables = { + ids: ..., +}; + +// Call the `markActivityLogsAsRead()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await markActivityLogsAsRead(markActivityLogsAsReadVars); +// Variables can be defined inline as well. +const { data } = await markActivityLogsAsRead({ ids: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await markActivityLogsAsRead(dataConnect, markActivityLogsAsReadVars); + +console.log(data.activityLog_updateMany); + +// Or, you can use the `Promise` API. +markActivityLogsAsRead(markActivityLogsAsReadVars).then((response) => { + const data = response.data; + console.log(data.activityLog_updateMany); +}); +``` + +### Using `markActivityLogsAsRead`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, markActivityLogsAsReadRef, MarkActivityLogsAsReadVariables } from '@dataconnect/generated'; + +// The `markActivityLogsAsRead` mutation requires an argument of type `MarkActivityLogsAsReadVariables`: +const markActivityLogsAsReadVars: MarkActivityLogsAsReadVariables = { + ids: ..., +}; + +// Call the `markActivityLogsAsReadRef()` function to get a reference to the mutation. +const ref = markActivityLogsAsReadRef(markActivityLogsAsReadVars); +// Variables can be defined inline as well. +const ref = markActivityLogsAsReadRef({ ids: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = markActivityLogsAsReadRef(dataConnect, markActivityLogsAsReadVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.activityLog_updateMany); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.activityLog_updateMany); +}); +``` + +## deleteActivityLog +You can execute the `deleteActivityLog` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteActivityLog(vars: DeleteActivityLogVariables): MutationPromise; + +interface DeleteActivityLogRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteActivityLogVariables): MutationRef; +} +export const deleteActivityLogRef: DeleteActivityLogRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteActivityLog(dc: DataConnect, vars: DeleteActivityLogVariables): MutationPromise; + +interface DeleteActivityLogRef { + ... + (dc: DataConnect, vars: DeleteActivityLogVariables): MutationRef; +} +export const deleteActivityLogRef: DeleteActivityLogRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteActivityLogRef: +```typescript +const name = deleteActivityLogRef.operationName; +console.log(name); +``` + +### Variables +The `deleteActivityLog` mutation requires an argument of type `DeleteActivityLogVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteActivityLogVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteActivityLog` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteActivityLogData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteActivityLogData { + activityLog_delete?: ActivityLog_Key | null; +} +``` +### Using `deleteActivityLog`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteActivityLog, DeleteActivityLogVariables } from '@dataconnect/generated'; + +// The `deleteActivityLog` mutation requires an argument of type `DeleteActivityLogVariables`: +const deleteActivityLogVars: DeleteActivityLogVariables = { + id: ..., +}; + +// Call the `deleteActivityLog()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteActivityLog(deleteActivityLogVars); +// Variables can be defined inline as well. +const { data } = await deleteActivityLog({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteActivityLog(dataConnect, deleteActivityLogVars); + +console.log(data.activityLog_delete); + +// Or, you can use the `Promise` API. +deleteActivityLog(deleteActivityLogVars).then((response) => { + const data = response.data; + console.log(data.activityLog_delete); +}); +``` + +### Using `deleteActivityLog`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteActivityLogRef, DeleteActivityLogVariables } from '@dataconnect/generated'; + +// The `deleteActivityLog` mutation requires an argument of type `DeleteActivityLogVariables`: +const deleteActivityLogVars: DeleteActivityLogVariables = { + id: ..., +}; + +// Call the `deleteActivityLogRef()` function to get a reference to the mutation. +const ref = deleteActivityLogRef(deleteActivityLogVars); +// Variables can be defined inline as well. +const ref = deleteActivityLogRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteActivityLogRef(dataConnect, deleteActivityLogVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.activityLog_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.activityLog_delete); +}); +``` + +## createShift +You can execute the `createShift` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createShift(vars: CreateShiftVariables): MutationPromise; + +interface CreateShiftRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateShiftVariables): MutationRef; +} +export const createShiftRef: CreateShiftRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createShift(dc: DataConnect, vars: CreateShiftVariables): MutationPromise; + +interface CreateShiftRef { + ... + (dc: DataConnect, vars: CreateShiftVariables): MutationRef; +} +export const createShiftRef: CreateShiftRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createShiftRef: +```typescript +const name = createShiftRef.operationName; +console.log(name); +``` + +### Variables +The `createShift` mutation requires an argument of type `CreateShiftVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateShiftVariables { + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdBy?: string | null; +} +``` +### Return Type +Recall that executing the `createShift` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateShiftData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateShiftData { + shift_insert: Shift_Key; +} +``` +### Using `createShift`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createShift, CreateShiftVariables } from '@dataconnect/generated'; + +// The `createShift` mutation requires an argument of type `CreateShiftVariables`: +const createShiftVars: CreateShiftVariables = { + title: ..., + orderId: ..., + date: ..., // optional + startTime: ..., // optional + endTime: ..., // optional + hours: ..., // optional + cost: ..., // optional + location: ..., // optional + locationAddress: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + placeId: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + description: ..., // optional + status: ..., // optional + workersNeeded: ..., // optional + filled: ..., // optional + filledAt: ..., // optional + managers: ..., // optional + durationDays: ..., // optional + createdBy: ..., // optional +}; + +// Call the `createShift()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createShift(createShiftVars); +// Variables can be defined inline as well. +const { data } = await createShift({ title: ..., orderId: ..., date: ..., startTime: ..., endTime: ..., hours: ..., cost: ..., location: ..., locationAddress: ..., latitude: ..., longitude: ..., placeId: ..., city: ..., state: ..., street: ..., country: ..., description: ..., status: ..., workersNeeded: ..., filled: ..., filledAt: ..., managers: ..., durationDays: ..., createdBy: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createShift(dataConnect, createShiftVars); + +console.log(data.shift_insert); + +// Or, you can use the `Promise` API. +createShift(createShiftVars).then((response) => { + const data = response.data; + console.log(data.shift_insert); +}); +``` + +### Using `createShift`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createShiftRef, CreateShiftVariables } from '@dataconnect/generated'; + +// The `createShift` mutation requires an argument of type `CreateShiftVariables`: +const createShiftVars: CreateShiftVariables = { + title: ..., + orderId: ..., + date: ..., // optional + startTime: ..., // optional + endTime: ..., // optional + hours: ..., // optional + cost: ..., // optional + location: ..., // optional + locationAddress: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + placeId: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + description: ..., // optional + status: ..., // optional + workersNeeded: ..., // optional + filled: ..., // optional + filledAt: ..., // optional + managers: ..., // optional + durationDays: ..., // optional + createdBy: ..., // optional +}; + +// Call the `createShiftRef()` function to get a reference to the mutation. +const ref = createShiftRef(createShiftVars); +// Variables can be defined inline as well. +const ref = createShiftRef({ title: ..., orderId: ..., date: ..., startTime: ..., endTime: ..., hours: ..., cost: ..., location: ..., locationAddress: ..., latitude: ..., longitude: ..., placeId: ..., city: ..., state: ..., street: ..., country: ..., description: ..., status: ..., workersNeeded: ..., filled: ..., filledAt: ..., managers: ..., durationDays: ..., createdBy: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createShiftRef(dataConnect, createShiftVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.shift_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.shift_insert); +}); +``` + +## updateShift +You can execute the `updateShift` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateShift(vars: UpdateShiftVariables): MutationPromise; + +interface UpdateShiftRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateShiftVariables): MutationRef; +} +export const updateShiftRef: UpdateShiftRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateShift(dc: DataConnect, vars: UpdateShiftVariables): MutationPromise; + +interface UpdateShiftRef { + ... + (dc: DataConnect, vars: UpdateShiftVariables): MutationRef; +} +export const updateShiftRef: UpdateShiftRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateShiftRef: +```typescript +const name = updateShiftRef.operationName; +console.log(name); +``` + +### Variables +The `updateShift` mutation requires an argument of type `UpdateShiftVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateShiftVariables { + id: UUIDString; + title?: string | null; + orderId?: UUIDString | null; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; +} +``` +### Return Type +Recall that executing the `updateShift` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateShiftData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateShiftData { + shift_update?: Shift_Key | null; +} +``` +### Using `updateShift`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateShift, UpdateShiftVariables } from '@dataconnect/generated'; + +// The `updateShift` mutation requires an argument of type `UpdateShiftVariables`: +const updateShiftVars: UpdateShiftVariables = { + id: ..., + title: ..., // optional + orderId: ..., // optional + date: ..., // optional + startTime: ..., // optional + endTime: ..., // optional + hours: ..., // optional + cost: ..., // optional + location: ..., // optional + locationAddress: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + placeId: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + description: ..., // optional + status: ..., // optional + workersNeeded: ..., // optional + filled: ..., // optional + filledAt: ..., // optional + managers: ..., // optional + durationDays: ..., // optional +}; + +// Call the `updateShift()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateShift(updateShiftVars); +// Variables can be defined inline as well. +const { data } = await updateShift({ id: ..., title: ..., orderId: ..., date: ..., startTime: ..., endTime: ..., hours: ..., cost: ..., location: ..., locationAddress: ..., latitude: ..., longitude: ..., placeId: ..., city: ..., state: ..., street: ..., country: ..., description: ..., status: ..., workersNeeded: ..., filled: ..., filledAt: ..., managers: ..., durationDays: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateShift(dataConnect, updateShiftVars); + +console.log(data.shift_update); + +// Or, you can use the `Promise` API. +updateShift(updateShiftVars).then((response) => { + const data = response.data; + console.log(data.shift_update); +}); +``` + +### Using `updateShift`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateShiftRef, UpdateShiftVariables } from '@dataconnect/generated'; + +// The `updateShift` mutation requires an argument of type `UpdateShiftVariables`: +const updateShiftVars: UpdateShiftVariables = { + id: ..., + title: ..., // optional + orderId: ..., // optional + date: ..., // optional + startTime: ..., // optional + endTime: ..., // optional + hours: ..., // optional + cost: ..., // optional + location: ..., // optional + locationAddress: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + placeId: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + description: ..., // optional + status: ..., // optional + workersNeeded: ..., // optional + filled: ..., // optional + filledAt: ..., // optional + managers: ..., // optional + durationDays: ..., // optional +}; + +// Call the `updateShiftRef()` function to get a reference to the mutation. +const ref = updateShiftRef(updateShiftVars); +// Variables can be defined inline as well. +const ref = updateShiftRef({ id: ..., title: ..., orderId: ..., date: ..., startTime: ..., endTime: ..., hours: ..., cost: ..., location: ..., locationAddress: ..., latitude: ..., longitude: ..., placeId: ..., city: ..., state: ..., street: ..., country: ..., description: ..., status: ..., workersNeeded: ..., filled: ..., filledAt: ..., managers: ..., durationDays: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateShiftRef(dataConnect, updateShiftVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.shift_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.shift_update); +}); +``` + +## deleteShift +You can execute the `deleteShift` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteShift(vars: DeleteShiftVariables): MutationPromise; + +interface DeleteShiftRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteShiftVariables): MutationRef; +} +export const deleteShiftRef: DeleteShiftRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteShift(dc: DataConnect, vars: DeleteShiftVariables): MutationPromise; + +interface DeleteShiftRef { + ... + (dc: DataConnect, vars: DeleteShiftVariables): MutationRef; +} +export const deleteShiftRef: DeleteShiftRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteShiftRef: +```typescript +const name = deleteShiftRef.operationName; +console.log(name); +``` + +### Variables +The `deleteShift` mutation requires an argument of type `DeleteShiftVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteShiftVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `deleteShift` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteShiftData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteShiftData { + shift_delete?: Shift_Key | null; +} +``` +### Using `deleteShift`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteShift, DeleteShiftVariables } from '@dataconnect/generated'; + +// The `deleteShift` mutation requires an argument of type `DeleteShiftVariables`: +const deleteShiftVars: DeleteShiftVariables = { + id: ..., +}; + +// Call the `deleteShift()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteShift(deleteShiftVars); +// Variables can be defined inline as well. +const { data } = await deleteShift({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteShift(dataConnect, deleteShiftVars); + +console.log(data.shift_delete); + +// Or, you can use the `Promise` API. +deleteShift(deleteShiftVars).then((response) => { + const data = response.data; + console.log(data.shift_delete); +}); +``` + +### Using `deleteShift`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteShiftRef, DeleteShiftVariables } from '@dataconnect/generated'; + +// The `deleteShift` mutation requires an argument of type `DeleteShiftVariables`: +const deleteShiftVars: DeleteShiftVariables = { + id: ..., +}; + +// Call the `deleteShiftRef()` function to get a reference to the mutation. +const ref = deleteShiftRef(deleteShiftVars); +// Variables can be defined inline as well. +const ref = deleteShiftRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteShiftRef(dataConnect, deleteShiftVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.shift_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.shift_delete); +}); +``` + +## CreateStaff +You can execute the `CreateStaff` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +createStaff(vars: CreateStaffVariables): MutationPromise; + +interface CreateStaffRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateStaffVariables): MutationRef; +} +export const createStaffRef: CreateStaffRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +createStaff(dc: DataConnect, vars: CreateStaffVariables): MutationPromise; + +interface CreateStaffRef { + ... + (dc: DataConnect, vars: CreateStaffVariables): MutationRef; +} +export const createStaffRef: CreateStaffRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the createStaffRef: +```typescript +const name = createStaffRef.operationName; +console.log(name); +``` + +### Variables +The `CreateStaff` mutation requires an argument of type `CreateStaffVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface CreateStaffVariables { + userId: string; + fullName: string; + level?: string | null; + role?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + ownerId?: UUIDString | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; +} +``` +### Return Type +Recall that executing the `CreateStaff` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `CreateStaffData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface CreateStaffData { + staff_insert: Staff_Key; +} +``` +### Using `CreateStaff`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, createStaff, CreateStaffVariables } from '@dataconnect/generated'; + +// The `CreateStaff` mutation requires an argument of type `CreateStaffVariables`: +const createStaffVars: CreateStaffVariables = { + userId: ..., + fullName: ..., + level: ..., // optional + role: ..., // optional + phone: ..., // optional + email: ..., // optional + photoUrl: ..., // optional + totalShifts: ..., // optional + averageRating: ..., // optional + onTimeRate: ..., // optional + noShowCount: ..., // optional + cancellationCount: ..., // optional + reliabilityScore: ..., // optional + bio: ..., // optional + skills: ..., // optional + industries: ..., // optional + preferredLocations: ..., // optional + maxDistanceMiles: ..., // optional + languages: ..., // optional + itemsAttire: ..., // optional + xp: ..., // optional + badges: ..., // optional + isRecommended: ..., // optional + ownerId: ..., // optional + department: ..., // optional + hubId: ..., // optional + manager: ..., // optional + english: ..., // optional + backgroundCheckStatus: ..., // optional + employmentType: ..., // optional + initial: ..., // optional + englishRequired: ..., // optional + city: ..., // optional + addres: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional +}; + +// Call the `createStaff()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await createStaff(createStaffVars); +// Variables can be defined inline as well. +const { data } = await createStaff({ userId: ..., fullName: ..., level: ..., role: ..., phone: ..., email: ..., photoUrl: ..., totalShifts: ..., averageRating: ..., onTimeRate: ..., noShowCount: ..., cancellationCount: ..., reliabilityScore: ..., bio: ..., skills: ..., industries: ..., preferredLocations: ..., maxDistanceMiles: ..., languages: ..., itemsAttire: ..., xp: ..., badges: ..., isRecommended: ..., ownerId: ..., department: ..., hubId: ..., manager: ..., english: ..., backgroundCheckStatus: ..., employmentType: ..., initial: ..., englishRequired: ..., city: ..., addres: ..., placeId: ..., latitude: ..., longitude: ..., state: ..., street: ..., country: ..., zipCode: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await createStaff(dataConnect, createStaffVars); + +console.log(data.staff_insert); + +// Or, you can use the `Promise` API. +createStaff(createStaffVars).then((response) => { + const data = response.data; + console.log(data.staff_insert); +}); +``` + +### Using `CreateStaff`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, createStaffRef, CreateStaffVariables } from '@dataconnect/generated'; + +// The `CreateStaff` mutation requires an argument of type `CreateStaffVariables`: +const createStaffVars: CreateStaffVariables = { + userId: ..., + fullName: ..., + level: ..., // optional + role: ..., // optional + phone: ..., // optional + email: ..., // optional + photoUrl: ..., // optional + totalShifts: ..., // optional + averageRating: ..., // optional + onTimeRate: ..., // optional + noShowCount: ..., // optional + cancellationCount: ..., // optional + reliabilityScore: ..., // optional + bio: ..., // optional + skills: ..., // optional + industries: ..., // optional + preferredLocations: ..., // optional + maxDistanceMiles: ..., // optional + languages: ..., // optional + itemsAttire: ..., // optional + xp: ..., // optional + badges: ..., // optional + isRecommended: ..., // optional + ownerId: ..., // optional + department: ..., // optional + hubId: ..., // optional + manager: ..., // optional + english: ..., // optional + backgroundCheckStatus: ..., // optional + employmentType: ..., // optional + initial: ..., // optional + englishRequired: ..., // optional + city: ..., // optional + addres: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional +}; + +// Call the `createStaffRef()` function to get a reference to the mutation. +const ref = createStaffRef(createStaffVars); +// Variables can be defined inline as well. +const ref = createStaffRef({ userId: ..., fullName: ..., level: ..., role: ..., phone: ..., email: ..., photoUrl: ..., totalShifts: ..., averageRating: ..., onTimeRate: ..., noShowCount: ..., cancellationCount: ..., reliabilityScore: ..., bio: ..., skills: ..., industries: ..., preferredLocations: ..., maxDistanceMiles: ..., languages: ..., itemsAttire: ..., xp: ..., badges: ..., isRecommended: ..., ownerId: ..., department: ..., hubId: ..., manager: ..., english: ..., backgroundCheckStatus: ..., employmentType: ..., initial: ..., englishRequired: ..., city: ..., addres: ..., placeId: ..., latitude: ..., longitude: ..., state: ..., street: ..., country: ..., zipCode: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = createStaffRef(dataConnect, createStaffVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staff_insert); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staff_insert); +}); +``` + +## UpdateStaff +You can execute the `UpdateStaff` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +updateStaff(vars: UpdateStaffVariables): MutationPromise; + +interface UpdateStaffRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateStaffVariables): MutationRef; +} +export const updateStaffRef: UpdateStaffRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +updateStaff(dc: DataConnect, vars: UpdateStaffVariables): MutationPromise; + +interface UpdateStaffRef { + ... + (dc: DataConnect, vars: UpdateStaffVariables): MutationRef; +} +export const updateStaffRef: UpdateStaffRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the updateStaffRef: +```typescript +const name = updateStaffRef.operationName; +console.log(name); +``` + +### Variables +The `UpdateStaff` mutation requires an argument of type `UpdateStaffVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface UpdateStaffVariables { + id: UUIDString; + userId?: string | null; + fullName?: string | null; + level?: string | null; + role?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + ownerId?: UUIDString | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; +} +``` +### Return Type +Recall that executing the `UpdateStaff` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `UpdateStaffData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface UpdateStaffData { + staff_update?: Staff_Key | null; +} +``` +### Using `UpdateStaff`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, updateStaff, UpdateStaffVariables } from '@dataconnect/generated'; + +// The `UpdateStaff` mutation requires an argument of type `UpdateStaffVariables`: +const updateStaffVars: UpdateStaffVariables = { + id: ..., + userId: ..., // optional + fullName: ..., // optional + level: ..., // optional + role: ..., // optional + phone: ..., // optional + email: ..., // optional + photoUrl: ..., // optional + totalShifts: ..., // optional + averageRating: ..., // optional + onTimeRate: ..., // optional + noShowCount: ..., // optional + cancellationCount: ..., // optional + reliabilityScore: ..., // optional + bio: ..., // optional + skills: ..., // optional + industries: ..., // optional + preferredLocations: ..., // optional + maxDistanceMiles: ..., // optional + languages: ..., // optional + itemsAttire: ..., // optional + xp: ..., // optional + badges: ..., // optional + isRecommended: ..., // optional + ownerId: ..., // optional + department: ..., // optional + hubId: ..., // optional + manager: ..., // optional + english: ..., // optional + backgroundCheckStatus: ..., // optional + employmentType: ..., // optional + initial: ..., // optional + englishRequired: ..., // optional + city: ..., // optional + addres: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional +}; + +// Call the `updateStaff()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await updateStaff(updateStaffVars); +// Variables can be defined inline as well. +const { data } = await updateStaff({ id: ..., userId: ..., fullName: ..., level: ..., role: ..., phone: ..., email: ..., photoUrl: ..., totalShifts: ..., averageRating: ..., onTimeRate: ..., noShowCount: ..., cancellationCount: ..., reliabilityScore: ..., bio: ..., skills: ..., industries: ..., preferredLocations: ..., maxDistanceMiles: ..., languages: ..., itemsAttire: ..., xp: ..., badges: ..., isRecommended: ..., ownerId: ..., department: ..., hubId: ..., manager: ..., english: ..., backgroundCheckStatus: ..., employmentType: ..., initial: ..., englishRequired: ..., city: ..., addres: ..., placeId: ..., latitude: ..., longitude: ..., state: ..., street: ..., country: ..., zipCode: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await updateStaff(dataConnect, updateStaffVars); + +console.log(data.staff_update); + +// Or, you can use the `Promise` API. +updateStaff(updateStaffVars).then((response) => { + const data = response.data; + console.log(data.staff_update); +}); +``` + +### Using `UpdateStaff`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, updateStaffRef, UpdateStaffVariables } from '@dataconnect/generated'; + +// The `UpdateStaff` mutation requires an argument of type `UpdateStaffVariables`: +const updateStaffVars: UpdateStaffVariables = { + id: ..., + userId: ..., // optional + fullName: ..., // optional + level: ..., // optional + role: ..., // optional + phone: ..., // optional + email: ..., // optional + photoUrl: ..., // optional + totalShifts: ..., // optional + averageRating: ..., // optional + onTimeRate: ..., // optional + noShowCount: ..., // optional + cancellationCount: ..., // optional + reliabilityScore: ..., // optional + bio: ..., // optional + skills: ..., // optional + industries: ..., // optional + preferredLocations: ..., // optional + maxDistanceMiles: ..., // optional + languages: ..., // optional + itemsAttire: ..., // optional + xp: ..., // optional + badges: ..., // optional + isRecommended: ..., // optional + ownerId: ..., // optional + department: ..., // optional + hubId: ..., // optional + manager: ..., // optional + english: ..., // optional + backgroundCheckStatus: ..., // optional + employmentType: ..., // optional + initial: ..., // optional + englishRequired: ..., // optional + city: ..., // optional + addres: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional +}; + +// Call the `updateStaffRef()` function to get a reference to the mutation. +const ref = updateStaffRef(updateStaffVars); +// Variables can be defined inline as well. +const ref = updateStaffRef({ id: ..., userId: ..., fullName: ..., level: ..., role: ..., phone: ..., email: ..., photoUrl: ..., totalShifts: ..., averageRating: ..., onTimeRate: ..., noShowCount: ..., cancellationCount: ..., reliabilityScore: ..., bio: ..., skills: ..., industries: ..., preferredLocations: ..., maxDistanceMiles: ..., languages: ..., itemsAttire: ..., xp: ..., badges: ..., isRecommended: ..., ownerId: ..., department: ..., hubId: ..., manager: ..., english: ..., backgroundCheckStatus: ..., employmentType: ..., initial: ..., englishRequired: ..., city: ..., addres: ..., placeId: ..., latitude: ..., longitude: ..., state: ..., street: ..., country: ..., zipCode: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = updateStaffRef(dataConnect, updateStaffVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staff_update); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staff_update); +}); +``` + +## DeleteStaff +You can execute the `DeleteStaff` mutation using the following action shortcut function, or by calling `executeMutation()` after calling the following `MutationRef` function, both of which are defined in [dataconnect-generated/index.d.ts](./index.d.ts): +```typescript +deleteStaff(vars: DeleteStaffVariables): MutationPromise; + +interface DeleteStaffRef { + ... + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteStaffVariables): MutationRef; +} +export const deleteStaffRef: DeleteStaffRef; +``` +You can also pass in a `DataConnect` instance to the action shortcut function or `MutationRef` function. +```typescript +deleteStaff(dc: DataConnect, vars: DeleteStaffVariables): MutationPromise; + +interface DeleteStaffRef { + ... + (dc: DataConnect, vars: DeleteStaffVariables): MutationRef; +} +export const deleteStaffRef: DeleteStaffRef; +``` + +If you need the name of the operation without creating a ref, you can retrieve the operation name by calling the `operationName` property on the deleteStaffRef: +```typescript +const name = deleteStaffRef.operationName; +console.log(name); +``` + +### Variables +The `DeleteStaff` mutation requires an argument of type `DeleteStaffVariables`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: + +```typescript +export interface DeleteStaffVariables { + id: UUIDString; +} +``` +### Return Type +Recall that executing the `DeleteStaff` mutation returns a `MutationPromise` that resolves to an object with a `data` property. + +The `data` property is an object of type `DeleteStaffData`, which is defined in [dataconnect-generated/index.d.ts](./index.d.ts). It has the following fields: +```typescript +export interface DeleteStaffData { + staff_delete?: Staff_Key | null; +} +``` +### Using `DeleteStaff`'s action shortcut function + +```typescript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, deleteStaff, DeleteStaffVariables } from '@dataconnect/generated'; + +// The `DeleteStaff` mutation requires an argument of type `DeleteStaffVariables`: +const deleteStaffVars: DeleteStaffVariables = { + id: ..., +}; + +// Call the `deleteStaff()` function to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await deleteStaff(deleteStaffVars); +// Variables can be defined inline as well. +const { data } = await deleteStaff({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the action shortcut function. +const dataConnect = getDataConnect(connectorConfig); +const { data } = await deleteStaff(dataConnect, deleteStaffVars); + +console.log(data.staff_delete); + +// Or, you can use the `Promise` API. +deleteStaff(deleteStaffVars).then((response) => { + const data = response.data; + console.log(data.staff_delete); +}); +``` + +### Using `DeleteStaff`'s `MutationRef` function + +```typescript +import { getDataConnect, executeMutation } from 'firebase/data-connect'; +import { connectorConfig, deleteStaffRef, DeleteStaffVariables } from '@dataconnect/generated'; + +// The `DeleteStaff` mutation requires an argument of type `DeleteStaffVariables`: +const deleteStaffVars: DeleteStaffVariables = { + id: ..., +}; + +// Call the `deleteStaffRef()` function to get a reference to the mutation. +const ref = deleteStaffRef(deleteStaffVars); +// Variables can be defined inline as well. +const ref = deleteStaffRef({ id: ..., }); + +// You can also pass in a `DataConnect` instance to the `MutationRef` function. +const dataConnect = getDataConnect(connectorConfig); +const ref = deleteStaffRef(dataConnect, deleteStaffVars); + +// Call `executeMutation()` on the reference to execute the mutation. +// You can use the `await` keyword to wait for the promise to resolve. +const { data } = await executeMutation(ref); + +console.log(data.staff_delete); + +// Or, you can use the `Promise` API. +executeMutation(ref).then((response) => { + const data = response.data; + console.log(data.staff_delete); +}); +``` + diff --git a/apps/web/src/dataconnect-generated/esm/index.esm.js b/apps/web/src/dataconnect-generated/esm/index.esm.js new file mode 100644 index 00000000..c4fc7c84 --- /dev/null +++ b/apps/web/src/dataconnect-generated/esm/index.esm.js @@ -0,0 +1,4493 @@ +import { queryRef, executeQuery, mutationRef, executeMutation, validateArgs } from 'firebase/data-connect'; + +export const AccountType = { + CHECKING: "CHECKING", + SAVINGS: "SAVINGS", +} + +export const ActivityIconType = { + INVOICE: "INVOICE", + CHECK: "CHECK", + ALERT: "ALERT", + MESSAGE: "MESSAGE", + CALENDAR: "CALENDAR", +} + +export const ActivityType = { + ORDER_CREATED: "ORDER_CREATED", + SHIFT_UPDATE: "SHIFT_UPDATE", + COMPLIANCE_ALERT: "COMPLIANCE_ALERT", + MESSAGE_RECEIVED: "MESSAGE_RECEIVED", + SYSTEM_UPDATE: "SYSTEM_UPDATE", +} + +export const ApplicationOrigin = { + STAFF: "STAFF", + EMPLOYER: "EMPLOYER", +} + +export const ApplicationStatus = { + PENDING: "PENDING", + REJECTED: "REJECTED", + CONFIRMED: "CONFIRMED", + CHECKED_IN: "CHECKED_IN", + CHECKED_OUT: "CHECKED_OUT", + LATE: "LATE", + NO_SHOW: "NO_SHOW", + COMPLETED: "COMPLETED", +} + +export const ApprovalStatus = { + APPROVED: "APPROVED", +} + +export const AssignmentStatus = { + PENDING: "PENDING", + CONFIRMED: "CONFIRMED", + OPEN: "OPEN", + COMPLETED: "COMPLETED", + CANCELED: "CANCELED", + ACTIVE: "ACTIVE", +} + +export const AvailabilitySlot = { + MORNING: "MORNING", + AFTERNOON: "AFTERNOON", + EVENING: "EVENING", +} + +export const AvailabilityStatus = { + CONFIRMED_AVAILABLE: "CONFIRMED_AVAILABLE", + UNKNOWN: "UNKNOWN", + BLOCKED: "BLOCKED", +} + +export const BackgroundCheckStatus = { + PENDING: "PENDING", + CLEARED: "CLEARED", + FAILED: "FAILED", + EXPIRED: "EXPIRED", + NOT_REQUIRED: "NOT_REQUIRED", +} + +export const BreakDuration = { + MIN_15: "MIN_15", + MIN_30: "MIN_30", + NO_BREAK: "NO_BREAK", +} + +export const BusinessArea = { + BAY_AREA: "BAY_AREA", + SOUTHERN_CALIFORNIA: "SOUTHERN_CALIFORNIA", + NORTHERN_CALIFORNIA: "NORTHERN_CALIFORNIA", + CENTRAL_VALLEY: "CENTRAL_VALLEY", + OTHER: "OTHER", +} + +export const BusinessRateGroup = { + STANDARD: "STANDARD", + PREMIUM: "PREMIUM", + ENTERPRISE: "ENTERPRISE", + CUSTOM: "CUSTOM", +} + +export const BusinessSector = { + BON_APPETIT: "BON_APPETIT", + EUREST: "EUREST", + ARAMARK: "ARAMARK", + EPICUREAN_GROUP: "EPICUREAN_GROUP", + CHARTWELLS: "CHARTWELLS", + OTHER: "OTHER", +} + +export const BusinessStatus = { + ACTIVE: "ACTIVE", + INACTIVE: "INACTIVE", + PENDING: "PENDING", +} + +export const CategoryType = { + KITCHEN_AND_CULINARY: "KITCHEN_AND_CULINARY", + CONCESSIONS: "CONCESSIONS", + FACILITIES: "FACILITIES", + BARTENDING: "BARTENDING", + SECURITY: "SECURITY", + EVENT_STAFF: "EVENT_STAFF", + MANAGEMENT: "MANAGEMENT", + TECHNICAL: "TECHNICAL", + OTHER: "OTHER", +} + +export const CertificateStatus = { + CURRENT: "CURRENT", + EXPIRING_SOON: "EXPIRING_SOON", + COMPLETED: "COMPLETED", + PENDING: "PENDING", + EXPIRED: "EXPIRED", + EXPIRING: "EXPIRING", + NOT_STARTED: "NOT_STARTED", +} + +export const CitizenshipStatus = { + CITIZEN: "CITIZEN", + NONCITIZEN: "NONCITIZEN", + PERMANENT_RESIDENT: "PERMANENT_RESIDENT", + ALIEN: "ALIEN", +} + +export const ComplianceType = { + BACKGROUND_CHECK: "BACKGROUND_CHECK", + FOOD_HANDLER: "FOOD_HANDLER", + RBS: "RBS", + LEGAL: "LEGAL", + OPERATIONAL: "OPERATIONAL", + SAFETY: "SAFETY", + TRAINING: "TRAINING", + LICENSE: "LICENSE", + OTHER: "OTHER", +} + +export const ConversationStatus = { + ACTIVE: "ACTIVE", +} + +export const ConversationType = { + CLIENT_VENDOR: "CLIENT_VENDOR", + GROUP_STAFF: "GROUP_STAFF", + STAFF_CLIENT: "STAFF_CLIENT", + STAFF_ADMIN: "STAFF_ADMIN", + VENDOR_ADMIN: "VENDOR_ADMIN", + CLIENT_ADMIN: "CLIENT_ADMIN", + GROUP_ORDER_STAFF: "GROUP_ORDER_STAFF", +} + +export const DayOfWeek = { + SUNDAY: "SUNDAY", + MONDAY: "MONDAY", + TUESDAY: "TUESDAY", + WEDNESDAY: "WEDNESDAY", + THURSDAY: "THURSDAY", + FRIDAY: "FRIDAY", + SATURDAY: "SATURDAY", +} + +export const DepartmentType = { + OPERATIONS: "OPERATIONS", + SALES: "SALES", + HR: "HR", + FINANCE: "FINANCE", + IT: "IT", + MARKETING: "MARKETING", + CUSTOMER_SERVICE: "CUSTOMER_SERVICE", + LOGISTICS: "LOGISTICS", +} + +export const DocumentStatus = { + UPLOADED: "UPLOADED", + PENDING: "PENDING", + EXPIRING: "EXPIRING", + MISSING: "MISSING", + VERIFIED: "VERIFIED", +} + +export const DocumentType = { + W4_FORM: "W4_FORM", + I9_FORM: "I9_FORM", + STATE_TAX_FORM: "STATE_TAX_FORM", + DIRECT_DEPOSIT: "DIRECT_DEPOSIT", + ID_COPY: "ID_COPY", + SSN_CARD: "SSN_CARD", + WORK_PERMIT: "WORK_PERMIT", +} + +export const EmploymentType = { + FULL_TIME: "FULL_TIME", + PART_TIME: "PART_TIME", + ON_CALL: "ON_CALL", + WEEKENDS: "WEEKENDS", + SPECIFIC_DAYS: "SPECIFIC_DAYS", + SEASONAL: "SEASONAL", + MEDICAL_LEAVE: "MEDICAL_LEAVE", +} + +export const EnglishProficiency = { + FLUENT: "FLUENT", + INTERMEDIATE: "INTERMEDIATE", + BASIC: "BASIC", + NONE: "NONE", +} + +export const InovicePaymentTerms = { + NET_30: "NET_30", + NET_45: "NET_45", + NET_60: "NET_60", +} + +export const InovicePaymentTermsTemp = { + NET_30: "NET_30", + NET_45: "NET_45", + NET_60: "NET_60", +} + +export const InvoiceStatus = { + PAID: "PAID", + PENDING: "PENDING", + OVERDUE: "OVERDUE", + PENDING_REVIEW: "PENDING_REVIEW", + APPROVED: "APPROVED", + DISPUTED: "DISPUTED", + DRAFT: "DRAFT", +} + +export const MaritalStatus = { + SINGLE: "SINGLE", + MARRIED: "MARRIED", + HEAD: "HEAD", +} + +export const OrderDuration = { + WEEKLY: "WEEKLY", + MONTHLY: "MONTHLY", +} + +export const OrderStatus = { + DRAFT: "DRAFT", + POSTED: "POSTED", + FILLED: "FILLED", + COMPLETED: "COMPLETED", + CANCELLED: "CANCELLED", + PENDING: "PENDING", + FULLY_STAFFED: "FULLY_STAFFED", + PARTIAL_STAFFED: "PARTIAL_STAFFED", +} + +export const OrderType = { + ONE_TIME: "ONE_TIME", + PERMANENT: "PERMANENT", + RECURRING: "RECURRING", + RAPID: "RAPID", +} + +export const RecentPaymentStatus = { + PAID: "PAID", + PENDING: "PENDING", + FAILED: "FAILED", +} + +export const RelationshipType = { + FAMILY: "FAMILY", + SPOUSE: "SPOUSE", + FRIEND: "FRIEND", + OTHER: "OTHER", +} + +export const RoleCategoryType = { + KITCHEN_AND_CULINARY: "KITCHEN_AND_CULINARY", + CONCESSIONS: "CONCESSIONS", + FACILITIES: "FACILITIES", + BARTENDING: "BARTENDING", + SECURITY: "SECURITY", + EVENT_STAFF: "EVENT_STAFF", + MANAGEMENT: "MANAGEMENT", + TECHNICAL: "TECHNICAL", + OTHER: "OTHER", +} + +export const RoleType = { + SKILLED: "SKILLED", + BEGINNER: "BEGINNER", + CROSS_TRAINED: "CROSS_TRAINED", +} + +export const ShiftStatus = { + DRAFT: "DRAFT", + FILLED: "FILLED", + PENDING: "PENDING", + ASSIGNED: "ASSIGNED", + CONFIRMED: "CONFIRMED", + OPEN: "OPEN", + IN_PROGRESS: "IN_PROGRESS", + COMPLETED: "COMPLETED", + CANCELED: "CANCELED", +} + +export const TaskPriority = { + LOW: "LOW", + NORMAL: "NORMAL", + HIGH: "HIGH", +} + +export const TaskStatus = { + PENDING: "PENDING", + IN_PROGRESS: "IN_PROGRESS", + COMPLETED: "COMPLETED", +} + +export const TaxFormStatus = { + NOT_STARTED: "NOT_STARTED", + DRAFT: "DRAFT", + SUBMITTED: "SUBMITTED", + APPROVED: "APPROVED", + REJECTED: "REJECTED", +} + +export const TaxFormType = { + I9: "I9", + W4: "W4", +} + +export const TeamMemberInviteStatus = { + PENDING: "PENDING", + ACCEPTED: "ACCEPTED", + CANCELLED: "CANCELLED", +} + +export const TeamMemberRole = { + OWNER: "OWNER", + ADMIN: "ADMIN", + MEMBER: "MEMBER", + MANAGER: "MANAGER", + VIEWER: "VIEWER", +} + +export const UserBaseRole = { + ADMIN: "ADMIN", + USER: "USER", +} + +export const ValidationStatus = { + APPROVED: "APPROVED", + PENDING_EXPERT_REVIEW: "PENDING_EXPERT_REVIEW", + REJECTED: "REJECTED", + AI_VERIFIED: "AI_VERIFIED", + AI_FLAGGED: "AI_FLAGGED", + MANUAL_REVIEW_NEEDED: "MANUAL_REVIEW_NEEDED", +} + +export const VendorTier = { + PREFERRED: "PREFERRED", + APPROVED: "APPROVED", + STANDARD: "STANDARD", +} + +export const WorkforceEmploymentType = { + W2: "W2", + W1099: "W1099", + TEMPORARY: "TEMPORARY", + CONTRACT: "CONTRACT", +} + +export const WorkforceStatus = { + ACTIVE: "ACTIVE", + INACTIVE: "INACTIVE", +} + +export const connectorConfig = { + connector: 'example', + service: 'krow-workforce-db', + location: 'us-central1' +}; + +export const createBenefitsDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createBenefitsData', inputVars); +} +createBenefitsDataRef.operationName = 'createBenefitsData'; + +export function createBenefitsData(dcOrVars, vars) { + return executeMutation(createBenefitsDataRef(dcOrVars, vars)); +} + +export const updateBenefitsDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateBenefitsData', inputVars); +} +updateBenefitsDataRef.operationName = 'updateBenefitsData'; + +export function updateBenefitsData(dcOrVars, vars) { + return executeMutation(updateBenefitsDataRef(dcOrVars, vars)); +} + +export const deleteBenefitsDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteBenefitsData', inputVars); +} +deleteBenefitsDataRef.operationName = 'deleteBenefitsData'; + +export function deleteBenefitsData(dcOrVars, vars) { + return executeMutation(deleteBenefitsDataRef(dcOrVars, vars)); +} + +export const listShiftsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShifts', inputVars); +} +listShiftsRef.operationName = 'listShifts'; + +export function listShifts(dcOrVars, vars) { + return executeQuery(listShiftsRef(dcOrVars, vars)); +} + +export const getShiftByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getShiftById', inputVars); +} +getShiftByIdRef.operationName = 'getShiftById'; + +export function getShiftById(dcOrVars, vars) { + return executeQuery(getShiftByIdRef(dcOrVars, vars)); +} + +export const filterShiftsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterShifts', inputVars); +} +filterShiftsRef.operationName = 'filterShifts'; + +export function filterShifts(dcOrVars, vars) { + return executeQuery(filterShiftsRef(dcOrVars, vars)); +} + +export const getShiftsByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getShiftsByBusinessId', inputVars); +} +getShiftsByBusinessIdRef.operationName = 'getShiftsByBusinessId'; + +export function getShiftsByBusinessId(dcOrVars, vars) { + return executeQuery(getShiftsByBusinessIdRef(dcOrVars, vars)); +} + +export const getShiftsByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getShiftsByVendorId', inputVars); +} +getShiftsByVendorIdRef.operationName = 'getShiftsByVendorId'; + +export function getShiftsByVendorId(dcOrVars, vars) { + return executeQuery(getShiftsByVendorIdRef(dcOrVars, vars)); +} + +export const createStaffDocumentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createStaffDocument', inputVars); +} +createStaffDocumentRef.operationName = 'createStaffDocument'; + +export function createStaffDocument(dcOrVars, vars) { + return executeMutation(createStaffDocumentRef(dcOrVars, vars)); +} + +export const updateStaffDocumentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateStaffDocument', inputVars); +} +updateStaffDocumentRef.operationName = 'updateStaffDocument'; + +export function updateStaffDocument(dcOrVars, vars) { + return executeMutation(updateStaffDocumentRef(dcOrVars, vars)); +} + +export const deleteStaffDocumentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteStaffDocument', inputVars); +} +deleteStaffDocumentRef.operationName = 'deleteStaffDocument'; + +export function deleteStaffDocument(dcOrVars, vars) { + return executeMutation(deleteStaffDocumentRef(dcOrVars, vars)); +} + +export const listEmergencyContactsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listEmergencyContacts'); +} +listEmergencyContactsRef.operationName = 'listEmergencyContacts'; + +export function listEmergencyContacts(dc) { + return executeQuery(listEmergencyContactsRef(dc)); +} + +export const getEmergencyContactByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getEmergencyContactById', inputVars); +} +getEmergencyContactByIdRef.operationName = 'getEmergencyContactById'; + +export function getEmergencyContactById(dcOrVars, vars) { + return executeQuery(getEmergencyContactByIdRef(dcOrVars, vars)); +} + +export const getEmergencyContactsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getEmergencyContactsByStaffId', inputVars); +} +getEmergencyContactsByStaffIdRef.operationName = 'getEmergencyContactsByStaffId'; + +export function getEmergencyContactsByStaffId(dcOrVars, vars) { + return executeQuery(getEmergencyContactsByStaffIdRef(dcOrVars, vars)); +} + +export const getMyTasksRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getMyTasks', inputVars); +} +getMyTasksRef.operationName = 'getMyTasks'; + +export function getMyTasks(dcOrVars, vars) { + return executeQuery(getMyTasksRef(dcOrVars, vars)); +} + +export const getMemberTaskByIdKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getMemberTaskByIdKey', inputVars); +} +getMemberTaskByIdKeyRef.operationName = 'getMemberTaskByIdKey'; + +export function getMemberTaskByIdKey(dcOrVars, vars) { + return executeQuery(getMemberTaskByIdKeyRef(dcOrVars, vars)); +} + +export const getMemberTasksByTaskIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getMemberTasksByTaskId', inputVars); +} +getMemberTasksByTaskIdRef.operationName = 'getMemberTasksByTaskId'; + +export function getMemberTasksByTaskId(dcOrVars, vars) { + return executeQuery(getMemberTasksByTaskIdRef(dcOrVars, vars)); +} + +export const createTeamHudDepartmentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTeamHudDepartment', inputVars); +} +createTeamHudDepartmentRef.operationName = 'createTeamHudDepartment'; + +export function createTeamHudDepartment(dcOrVars, vars) { + return executeMutation(createTeamHudDepartmentRef(dcOrVars, vars)); +} + +export const updateTeamHudDepartmentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTeamHudDepartment', inputVars); +} +updateTeamHudDepartmentRef.operationName = 'updateTeamHudDepartment'; + +export function updateTeamHudDepartment(dcOrVars, vars) { + return executeMutation(updateTeamHudDepartmentRef(dcOrVars, vars)); +} + +export const deleteTeamHudDepartmentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTeamHudDepartment', inputVars); +} +deleteTeamHudDepartmentRef.operationName = 'deleteTeamHudDepartment'; + +export function deleteTeamHudDepartment(dcOrVars, vars) { + return executeMutation(deleteTeamHudDepartmentRef(dcOrVars, vars)); +} + +export const listCertificatesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listCertificates'); +} +listCertificatesRef.operationName = 'listCertificates'; + +export function listCertificates(dc) { + return executeQuery(listCertificatesRef(dc)); +} + +export const getCertificateByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getCertificateById', inputVars); +} +getCertificateByIdRef.operationName = 'getCertificateById'; + +export function getCertificateById(dcOrVars, vars) { + return executeQuery(getCertificateByIdRef(dcOrVars, vars)); +} + +export const listCertificatesByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listCertificatesByStaffId', inputVars); +} +listCertificatesByStaffIdRef.operationName = 'listCertificatesByStaffId'; + +export function listCertificatesByStaffId(dcOrVars, vars) { + return executeQuery(listCertificatesByStaffIdRef(dcOrVars, vars)); +} + +export const createMemberTaskRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createMemberTask', inputVars); +} +createMemberTaskRef.operationName = 'createMemberTask'; + +export function createMemberTask(dcOrVars, vars) { + return executeMutation(createMemberTaskRef(dcOrVars, vars)); +} + +export const deleteMemberTaskRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteMemberTask', inputVars); +} +deleteMemberTaskRef.operationName = 'deleteMemberTask'; + +export function deleteMemberTask(dcOrVars, vars) { + return executeMutation(deleteMemberTaskRef(dcOrVars, vars)); +} + +export const createTeamRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTeam', inputVars); +} +createTeamRef.operationName = 'createTeam'; + +export function createTeam(dcOrVars, vars) { + return executeMutation(createTeamRef(dcOrVars, vars)); +} + +export const updateTeamRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTeam', inputVars); +} +updateTeamRef.operationName = 'updateTeam'; + +export function updateTeam(dcOrVars, vars) { + return executeMutation(updateTeamRef(dcOrVars, vars)); +} + +export const deleteTeamRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTeam', inputVars); +} +deleteTeamRef.operationName = 'deleteTeam'; + +export function deleteTeam(dcOrVars, vars) { + return executeMutation(deleteTeamRef(dcOrVars, vars)); +} + +export const createUserConversationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createUserConversation', inputVars); +} +createUserConversationRef.operationName = 'createUserConversation'; + +export function createUserConversation(dcOrVars, vars) { + return executeMutation(createUserConversationRef(dcOrVars, vars)); +} + +export const updateUserConversationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateUserConversation', inputVars); +} +updateUserConversationRef.operationName = 'updateUserConversation'; + +export function updateUserConversation(dcOrVars, vars) { + return executeMutation(updateUserConversationRef(dcOrVars, vars)); +} + +export const markConversationAsReadRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'markConversationAsRead', inputVars); +} +markConversationAsReadRef.operationName = 'markConversationAsRead'; + +export function markConversationAsRead(dcOrVars, vars) { + return executeMutation(markConversationAsReadRef(dcOrVars, vars)); +} + +export const incrementUnreadForUserRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'incrementUnreadForUser', inputVars); +} +incrementUnreadForUserRef.operationName = 'incrementUnreadForUser'; + +export function incrementUnreadForUser(dcOrVars, vars) { + return executeMutation(incrementUnreadForUserRef(dcOrVars, vars)); +} + +export const deleteUserConversationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteUserConversation', inputVars); +} +deleteUserConversationRef.operationName = 'deleteUserConversation'; + +export function deleteUserConversation(dcOrVars, vars) { + return executeMutation(deleteUserConversationRef(dcOrVars, vars)); +} + +export const listAssignmentsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAssignments', inputVars); +} +listAssignmentsRef.operationName = 'listAssignments'; + +export function listAssignments(dcOrVars, vars) { + return executeQuery(listAssignmentsRef(dcOrVars, vars)); +} + +export const getAssignmentByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getAssignmentById', inputVars); +} +getAssignmentByIdRef.operationName = 'getAssignmentById'; + +export function getAssignmentById(dcOrVars, vars) { + return executeQuery(getAssignmentByIdRef(dcOrVars, vars)); +} + +export const listAssignmentsByWorkforceIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAssignmentsByWorkforceId', inputVars); +} +listAssignmentsByWorkforceIdRef.operationName = 'listAssignmentsByWorkforceId'; + +export function listAssignmentsByWorkforceId(dcOrVars, vars) { + return executeQuery(listAssignmentsByWorkforceIdRef(dcOrVars, vars)); +} + +export const listAssignmentsByWorkforceIdsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAssignmentsByWorkforceIds', inputVars); +} +listAssignmentsByWorkforceIdsRef.operationName = 'listAssignmentsByWorkforceIds'; + +export function listAssignmentsByWorkforceIds(dcOrVars, vars) { + return executeQuery(listAssignmentsByWorkforceIdsRef(dcOrVars, vars)); +} + +export const listAssignmentsByShiftRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAssignmentsByShiftRole', inputVars); +} +listAssignmentsByShiftRoleRef.operationName = 'listAssignmentsByShiftRole'; + +export function listAssignmentsByShiftRole(dcOrVars, vars) { + return executeQuery(listAssignmentsByShiftRoleRef(dcOrVars, vars)); +} + +export const filterAssignmentsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterAssignments', inputVars); +} +filterAssignmentsRef.operationName = 'filterAssignments'; + +export function filterAssignments(dcOrVars, vars) { + return executeQuery(filterAssignmentsRef(dcOrVars, vars)); +} + +export const createAttireOptionRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createAttireOption', inputVars); +} +createAttireOptionRef.operationName = 'createAttireOption'; + +export function createAttireOption(dcOrVars, vars) { + return executeMutation(createAttireOptionRef(dcOrVars, vars)); +} + +export const updateAttireOptionRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateAttireOption', inputVars); +} +updateAttireOptionRef.operationName = 'updateAttireOption'; + +export function updateAttireOption(dcOrVars, vars) { + return executeMutation(updateAttireOptionRef(dcOrVars, vars)); +} + +export const deleteAttireOptionRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteAttireOption', inputVars); +} +deleteAttireOptionRef.operationName = 'deleteAttireOption'; + +export function deleteAttireOption(dcOrVars, vars) { + return executeMutation(deleteAttireOptionRef(dcOrVars, vars)); +} + +export const createCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createCourse', inputVars); +} +createCourseRef.operationName = 'createCourse'; + +export function createCourse(dcOrVars, vars) { + return executeMutation(createCourseRef(dcOrVars, vars)); +} + +export const updateCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateCourse', inputVars); +} +updateCourseRef.operationName = 'updateCourse'; + +export function updateCourse(dcOrVars, vars) { + return executeMutation(updateCourseRef(dcOrVars, vars)); +} + +export const deleteCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteCourse', inputVars); +} +deleteCourseRef.operationName = 'deleteCourse'; + +export function deleteCourse(dcOrVars, vars) { + return executeMutation(deleteCourseRef(dcOrVars, vars)); +} + +export const createEmergencyContactRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createEmergencyContact', inputVars); +} +createEmergencyContactRef.operationName = 'createEmergencyContact'; + +export function createEmergencyContact(dcOrVars, vars) { + return executeMutation(createEmergencyContactRef(dcOrVars, vars)); +} + +export const updateEmergencyContactRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateEmergencyContact', inputVars); +} +updateEmergencyContactRef.operationName = 'updateEmergencyContact'; + +export function updateEmergencyContact(dcOrVars, vars) { + return executeMutation(updateEmergencyContactRef(dcOrVars, vars)); +} + +export const deleteEmergencyContactRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteEmergencyContact', inputVars); +} +deleteEmergencyContactRef.operationName = 'deleteEmergencyContact'; + +export function deleteEmergencyContact(dcOrVars, vars) { + return executeMutation(deleteEmergencyContactRef(dcOrVars, vars)); +} + +export const listInvoiceTemplatesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoiceTemplates', inputVars); +} +listInvoiceTemplatesRef.operationName = 'listInvoiceTemplates'; + +export function listInvoiceTemplates(dcOrVars, vars) { + return executeQuery(listInvoiceTemplatesRef(dcOrVars, vars)); +} + +export const getInvoiceTemplateByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getInvoiceTemplateById', inputVars); +} +getInvoiceTemplateByIdRef.operationName = 'getInvoiceTemplateById'; + +export function getInvoiceTemplateById(dcOrVars, vars) { + return executeQuery(getInvoiceTemplateByIdRef(dcOrVars, vars)); +} + +export const listInvoiceTemplatesByOwnerIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoiceTemplatesByOwnerId', inputVars); +} +listInvoiceTemplatesByOwnerIdRef.operationName = 'listInvoiceTemplatesByOwnerId'; + +export function listInvoiceTemplatesByOwnerId(dcOrVars, vars) { + return executeQuery(listInvoiceTemplatesByOwnerIdRef(dcOrVars, vars)); +} + +export const listInvoiceTemplatesByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoiceTemplatesByVendorId', inputVars); +} +listInvoiceTemplatesByVendorIdRef.operationName = 'listInvoiceTemplatesByVendorId'; + +export function listInvoiceTemplatesByVendorId(dcOrVars, vars) { + return executeQuery(listInvoiceTemplatesByVendorIdRef(dcOrVars, vars)); +} + +export const listInvoiceTemplatesByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoiceTemplatesByBusinessId', inputVars); +} +listInvoiceTemplatesByBusinessIdRef.operationName = 'listInvoiceTemplatesByBusinessId'; + +export function listInvoiceTemplatesByBusinessId(dcOrVars, vars) { + return executeQuery(listInvoiceTemplatesByBusinessIdRef(dcOrVars, vars)); +} + +export const listInvoiceTemplatesByOrderIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoiceTemplatesByOrderId', inputVars); +} +listInvoiceTemplatesByOrderIdRef.operationName = 'listInvoiceTemplatesByOrderId'; + +export function listInvoiceTemplatesByOrderId(dcOrVars, vars) { + return executeQuery(listInvoiceTemplatesByOrderIdRef(dcOrVars, vars)); +} + +export const searchInvoiceTemplatesByOwnerAndNameRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'searchInvoiceTemplatesByOwnerAndName', inputVars); +} +searchInvoiceTemplatesByOwnerAndNameRef.operationName = 'searchInvoiceTemplatesByOwnerAndName'; + +export function searchInvoiceTemplatesByOwnerAndName(dcOrVars, vars) { + return executeQuery(searchInvoiceTemplatesByOwnerAndNameRef(dcOrVars, vars)); +} + +export const createStaffCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createStaffCourse', inputVars); +} +createStaffCourseRef.operationName = 'createStaffCourse'; + +export function createStaffCourse(dcOrVars, vars) { + return executeMutation(createStaffCourseRef(dcOrVars, vars)); +} + +export const updateStaffCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateStaffCourse', inputVars); +} +updateStaffCourseRef.operationName = 'updateStaffCourse'; + +export function updateStaffCourse(dcOrVars, vars) { + return executeMutation(updateStaffCourseRef(dcOrVars, vars)); +} + +export const deleteStaffCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteStaffCourse', inputVars); +} +deleteStaffCourseRef.operationName = 'deleteStaffCourse'; + +export function deleteStaffCourse(dcOrVars, vars) { + return executeMutation(deleteStaffCourseRef(dcOrVars, vars)); +} + +export const getStaffDocumentByKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffDocumentByKey', inputVars); +} +getStaffDocumentByKeyRef.operationName = 'getStaffDocumentByKey'; + +export function getStaffDocumentByKey(dcOrVars, vars) { + return executeQuery(getStaffDocumentByKeyRef(dcOrVars, vars)); +} + +export const listStaffDocumentsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffDocumentsByStaffId', inputVars); +} +listStaffDocumentsByStaffIdRef.operationName = 'listStaffDocumentsByStaffId'; + +export function listStaffDocumentsByStaffId(dcOrVars, vars) { + return executeQuery(listStaffDocumentsByStaffIdRef(dcOrVars, vars)); +} + +export const listStaffDocumentsByDocumentTypeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffDocumentsByDocumentType', inputVars); +} +listStaffDocumentsByDocumentTypeRef.operationName = 'listStaffDocumentsByDocumentType'; + +export function listStaffDocumentsByDocumentType(dcOrVars, vars) { + return executeQuery(listStaffDocumentsByDocumentTypeRef(dcOrVars, vars)); +} + +export const listStaffDocumentsByStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffDocumentsByStatus', inputVars); +} +listStaffDocumentsByStatusRef.operationName = 'listStaffDocumentsByStatus'; + +export function listStaffDocumentsByStatus(dcOrVars, vars) { + return executeQuery(listStaffDocumentsByStatusRef(dcOrVars, vars)); +} + +export const createTaskRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTask', inputVars); +} +createTaskRef.operationName = 'createTask'; + +export function createTask(dcOrVars, vars) { + return executeMutation(createTaskRef(dcOrVars, vars)); +} + +export const updateTaskRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTask', inputVars); +} +updateTaskRef.operationName = 'updateTask'; + +export function updateTask(dcOrVars, vars) { + return executeMutation(updateTaskRef(dcOrVars, vars)); +} + +export const deleteTaskRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTask', inputVars); +} +deleteTaskRef.operationName = 'deleteTask'; + +export function deleteTask(dcOrVars, vars) { + return executeMutation(deleteTaskRef(dcOrVars, vars)); +} + +export const listAccountsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAccounts'); +} +listAccountsRef.operationName = 'listAccounts'; + +export function listAccounts(dc) { + return executeQuery(listAccountsRef(dc)); +} + +export const getAccountByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getAccountById', inputVars); +} +getAccountByIdRef.operationName = 'getAccountById'; + +export function getAccountById(dcOrVars, vars) { + return executeQuery(getAccountByIdRef(dcOrVars, vars)); +} + +export const getAccountsByOwnerIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getAccountsByOwnerId', inputVars); +} +getAccountsByOwnerIdRef.operationName = 'getAccountsByOwnerId'; + +export function getAccountsByOwnerId(dcOrVars, vars) { + return executeQuery(getAccountsByOwnerIdRef(dcOrVars, vars)); +} + +export const filterAccountsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterAccounts', inputVars); +} +filterAccountsRef.operationName = 'filterAccounts'; + +export function filterAccounts(dcOrVars, vars) { + return executeQuery(filterAccountsRef(dcOrVars, vars)); +} + +export const listApplicationsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listApplications'); +} +listApplicationsRef.operationName = 'listApplications'; + +export function listApplications(dc) { + return executeQuery(listApplicationsRef(dc)); +} + +export const getApplicationByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getApplicationById', inputVars); +} +getApplicationByIdRef.operationName = 'getApplicationById'; + +export function getApplicationById(dcOrVars, vars) { + return executeQuery(getApplicationByIdRef(dcOrVars, vars)); +} + +export const getApplicationsByShiftIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getApplicationsByShiftId', inputVars); +} +getApplicationsByShiftIdRef.operationName = 'getApplicationsByShiftId'; + +export function getApplicationsByShiftId(dcOrVars, vars) { + return executeQuery(getApplicationsByShiftIdRef(dcOrVars, vars)); +} + +export const getApplicationsByShiftIdAndStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getApplicationsByShiftIdAndStatus', inputVars); +} +getApplicationsByShiftIdAndStatusRef.operationName = 'getApplicationsByShiftIdAndStatus'; + +export function getApplicationsByShiftIdAndStatus(dcOrVars, vars) { + return executeQuery(getApplicationsByShiftIdAndStatusRef(dcOrVars, vars)); +} + +export const getApplicationsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getApplicationsByStaffId', inputVars); +} +getApplicationsByStaffIdRef.operationName = 'getApplicationsByStaffId'; + +export function getApplicationsByStaffId(dcOrVars, vars) { + return executeQuery(getApplicationsByStaffIdRef(dcOrVars, vars)); +} + +export const vaidateDayStaffApplicationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'vaidateDayStaffApplication', inputVars); +} +vaidateDayStaffApplicationRef.operationName = 'vaidateDayStaffApplication'; + +export function vaidateDayStaffApplication(dcOrVars, vars) { + return executeQuery(vaidateDayStaffApplicationRef(dcOrVars, vars)); +} + +export const getApplicationByStaffShiftAndRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getApplicationByStaffShiftAndRole', inputVars); +} +getApplicationByStaffShiftAndRoleRef.operationName = 'getApplicationByStaffShiftAndRole'; + +export function getApplicationByStaffShiftAndRole(dcOrVars, vars) { + return executeQuery(getApplicationByStaffShiftAndRoleRef(dcOrVars, vars)); +} + +export const listAcceptedApplicationsByShiftRoleKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAcceptedApplicationsByShiftRoleKey', inputVars); +} +listAcceptedApplicationsByShiftRoleKeyRef.operationName = 'listAcceptedApplicationsByShiftRoleKey'; + +export function listAcceptedApplicationsByShiftRoleKey(dcOrVars, vars) { + return executeQuery(listAcceptedApplicationsByShiftRoleKeyRef(dcOrVars, vars)); +} + +export const listAcceptedApplicationsByBusinessForDayRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAcceptedApplicationsByBusinessForDay', inputVars); +} +listAcceptedApplicationsByBusinessForDayRef.operationName = 'listAcceptedApplicationsByBusinessForDay'; + +export function listAcceptedApplicationsByBusinessForDay(dcOrVars, vars) { + return executeQuery(listAcceptedApplicationsByBusinessForDayRef(dcOrVars, vars)); +} + +export const listStaffsApplicationsByBusinessForDayRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffsApplicationsByBusinessForDay', inputVars); +} +listStaffsApplicationsByBusinessForDayRef.operationName = 'listStaffsApplicationsByBusinessForDay'; + +export function listStaffsApplicationsByBusinessForDay(dcOrVars, vars) { + return executeQuery(listStaffsApplicationsByBusinessForDayRef(dcOrVars, vars)); +} + +export const listCompletedApplicationsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listCompletedApplicationsByStaffId', inputVars); +} +listCompletedApplicationsByStaffIdRef.operationName = 'listCompletedApplicationsByStaffId'; + +export function listCompletedApplicationsByStaffId(dcOrVars, vars) { + return executeQuery(listCompletedApplicationsByStaffIdRef(dcOrVars, vars)); +} + +export const listAttireOptionsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAttireOptions'); +} +listAttireOptionsRef.operationName = 'listAttireOptions'; + +export function listAttireOptions(dc) { + return executeQuery(listAttireOptionsRef(dc)); +} + +export const getAttireOptionByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getAttireOptionById', inputVars); +} +getAttireOptionByIdRef.operationName = 'getAttireOptionById'; + +export function getAttireOptionById(dcOrVars, vars) { + return executeQuery(getAttireOptionByIdRef(dcOrVars, vars)); +} + +export const filterAttireOptionsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterAttireOptions', inputVars); +} +filterAttireOptionsRef.operationName = 'filterAttireOptions'; + +export function filterAttireOptions(dcOrVars, vars) { + return executeQuery(filterAttireOptionsRef(dcOrVars, vars)); +} + +export const createCertificateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'CreateCertificate', inputVars); +} +createCertificateRef.operationName = 'CreateCertificate'; + +export function createCertificate(dcOrVars, vars) { + return executeMutation(createCertificateRef(dcOrVars, vars)); +} + +export const updateCertificateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'UpdateCertificate', inputVars); +} +updateCertificateRef.operationName = 'UpdateCertificate'; + +export function updateCertificate(dcOrVars, vars) { + return executeMutation(updateCertificateRef(dcOrVars, vars)); +} + +export const deleteCertificateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'DeleteCertificate', inputVars); +} +deleteCertificateRef.operationName = 'DeleteCertificate'; + +export function deleteCertificate(dcOrVars, vars) { + return executeMutation(deleteCertificateRef(dcOrVars, vars)); +} + +export const listCustomRateCardsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listCustomRateCards'); +} +listCustomRateCardsRef.operationName = 'listCustomRateCards'; + +export function listCustomRateCards(dc) { + return executeQuery(listCustomRateCardsRef(dc)); +} + +export const getCustomRateCardByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getCustomRateCardById', inputVars); +} +getCustomRateCardByIdRef.operationName = 'getCustomRateCardById'; + +export function getCustomRateCardById(dcOrVars, vars) { + return executeQuery(getCustomRateCardByIdRef(dcOrVars, vars)); +} + +export const createRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createRole', inputVars); +} +createRoleRef.operationName = 'createRole'; + +export function createRole(dcOrVars, vars) { + return executeMutation(createRoleRef(dcOrVars, vars)); +} + +export const updateRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateRole', inputVars); +} +updateRoleRef.operationName = 'updateRole'; + +export function updateRole(dcOrVars, vars) { + return executeMutation(updateRoleRef(dcOrVars, vars)); +} + +export const deleteRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteRole', inputVars); +} +deleteRoleRef.operationName = 'deleteRole'; + +export function deleteRole(dcOrVars, vars) { + return executeMutation(deleteRoleRef(dcOrVars, vars)); +} + +export const listRoleCategoriesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRoleCategories'); +} +listRoleCategoriesRef.operationName = 'listRoleCategories'; + +export function listRoleCategories(dc) { + return executeQuery(listRoleCategoriesRef(dc)); +} + +export const getRoleCategoryByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getRoleCategoryById', inputVars); +} +getRoleCategoryByIdRef.operationName = 'getRoleCategoryById'; + +export function getRoleCategoryById(dcOrVars, vars) { + return executeQuery(getRoleCategoryByIdRef(dcOrVars, vars)); +} + +export const getRoleCategoriesByCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getRoleCategoriesByCategory', inputVars); +} +getRoleCategoriesByCategoryRef.operationName = 'getRoleCategoriesByCategory'; + +export function getRoleCategoriesByCategory(dcOrVars, vars) { + return executeQuery(getRoleCategoriesByCategoryRef(dcOrVars, vars)); +} + +export const listStaffAvailabilitiesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffAvailabilities', inputVars); +} +listStaffAvailabilitiesRef.operationName = 'listStaffAvailabilities'; + +export function listStaffAvailabilities(dcOrVars, vars) { + return executeQuery(listStaffAvailabilitiesRef(dcOrVars, vars)); +} + +export const listStaffAvailabilitiesByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffAvailabilitiesByStaffId', inputVars); +} +listStaffAvailabilitiesByStaffIdRef.operationName = 'listStaffAvailabilitiesByStaffId'; + +export function listStaffAvailabilitiesByStaffId(dcOrVars, vars) { + return executeQuery(listStaffAvailabilitiesByStaffIdRef(dcOrVars, vars)); +} + +export const getStaffAvailabilityByKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffAvailabilityByKey', inputVars); +} +getStaffAvailabilityByKeyRef.operationName = 'getStaffAvailabilityByKey'; + +export function getStaffAvailabilityByKey(dcOrVars, vars) { + return executeQuery(getStaffAvailabilityByKeyRef(dcOrVars, vars)); +} + +export const listStaffAvailabilitiesByDayRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffAvailabilitiesByDay', inputVars); +} +listStaffAvailabilitiesByDayRef.operationName = 'listStaffAvailabilitiesByDay'; + +export function listStaffAvailabilitiesByDay(dcOrVars, vars) { + return executeQuery(listStaffAvailabilitiesByDayRef(dcOrVars, vars)); +} + +export const listRecentPaymentsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPayments', inputVars); +} +listRecentPaymentsRef.operationName = 'listRecentPayments'; + +export function listRecentPayments(dcOrVars, vars) { + return executeQuery(listRecentPaymentsRef(dcOrVars, vars)); +} + +export const getRecentPaymentByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getRecentPaymentById', inputVars); +} +getRecentPaymentByIdRef.operationName = 'getRecentPaymentById'; + +export function getRecentPaymentById(dcOrVars, vars) { + return executeQuery(getRecentPaymentByIdRef(dcOrVars, vars)); +} + +export const listRecentPaymentsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPaymentsByStaffId', inputVars); +} +listRecentPaymentsByStaffIdRef.operationName = 'listRecentPaymentsByStaffId'; + +export function listRecentPaymentsByStaffId(dcOrVars, vars) { + return executeQuery(listRecentPaymentsByStaffIdRef(dcOrVars, vars)); +} + +export const listRecentPaymentsByApplicationIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPaymentsByApplicationId', inputVars); +} +listRecentPaymentsByApplicationIdRef.operationName = 'listRecentPaymentsByApplicationId'; + +export function listRecentPaymentsByApplicationId(dcOrVars, vars) { + return executeQuery(listRecentPaymentsByApplicationIdRef(dcOrVars, vars)); +} + +export const listRecentPaymentsByInvoiceIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPaymentsByInvoiceId', inputVars); +} +listRecentPaymentsByInvoiceIdRef.operationName = 'listRecentPaymentsByInvoiceId'; + +export function listRecentPaymentsByInvoiceId(dcOrVars, vars) { + return executeQuery(listRecentPaymentsByInvoiceIdRef(dcOrVars, vars)); +} + +export const listRecentPaymentsByStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPaymentsByStatus', inputVars); +} +listRecentPaymentsByStatusRef.operationName = 'listRecentPaymentsByStatus'; + +export function listRecentPaymentsByStatus(dcOrVars, vars) { + return executeQuery(listRecentPaymentsByStatusRef(dcOrVars, vars)); +} + +export const listRecentPaymentsByInvoiceIdsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPaymentsByInvoiceIds', inputVars); +} +listRecentPaymentsByInvoiceIdsRef.operationName = 'listRecentPaymentsByInvoiceIds'; + +export function listRecentPaymentsByInvoiceIds(dcOrVars, vars) { + return executeQuery(listRecentPaymentsByInvoiceIdsRef(dcOrVars, vars)); +} + +export const listRecentPaymentsByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPaymentsByBusinessId', inputVars); +} +listRecentPaymentsByBusinessIdRef.operationName = 'listRecentPaymentsByBusinessId'; + +export function listRecentPaymentsByBusinessId(dcOrVars, vars) { + return executeQuery(listRecentPaymentsByBusinessIdRef(dcOrVars, vars)); +} + +export const listBusinessesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listBusinesses'); +} +listBusinessesRef.operationName = 'listBusinesses'; + +export function listBusinesses(dc) { + return executeQuery(listBusinessesRef(dc)); +} + +export const getBusinessesByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getBusinessesByUserId', inputVars); +} +getBusinessesByUserIdRef.operationName = 'getBusinessesByUserId'; + +export function getBusinessesByUserId(dcOrVars, vars) { + return executeQuery(getBusinessesByUserIdRef(dcOrVars, vars)); +} + +export const getBusinessByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getBusinessById', inputVars); +} +getBusinessByIdRef.operationName = 'getBusinessById'; + +export function getBusinessById(dcOrVars, vars) { + return executeQuery(getBusinessByIdRef(dcOrVars, vars)); +} + +export const createClientFeedbackRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createClientFeedback', inputVars); +} +createClientFeedbackRef.operationName = 'createClientFeedback'; + +export function createClientFeedback(dcOrVars, vars) { + return executeMutation(createClientFeedbackRef(dcOrVars, vars)); +} + +export const updateClientFeedbackRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateClientFeedback', inputVars); +} +updateClientFeedbackRef.operationName = 'updateClientFeedback'; + +export function updateClientFeedback(dcOrVars, vars) { + return executeMutation(updateClientFeedbackRef(dcOrVars, vars)); +} + +export const deleteClientFeedbackRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteClientFeedback', inputVars); +} +deleteClientFeedbackRef.operationName = 'deleteClientFeedback'; + +export function deleteClientFeedback(dcOrVars, vars) { + return executeMutation(deleteClientFeedbackRef(dcOrVars, vars)); +} + +export const listConversationsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listConversations', inputVars); +} +listConversationsRef.operationName = 'listConversations'; + +export function listConversations(dcOrVars, vars) { + return executeQuery(listConversationsRef(dcOrVars, vars)); +} + +export const getConversationByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getConversationById', inputVars); +} +getConversationByIdRef.operationName = 'getConversationById'; + +export function getConversationById(dcOrVars, vars) { + return executeQuery(getConversationByIdRef(dcOrVars, vars)); +} + +export const listConversationsByTypeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listConversationsByType', inputVars); +} +listConversationsByTypeRef.operationName = 'listConversationsByType'; + +export function listConversationsByType(dcOrVars, vars) { + return executeQuery(listConversationsByTypeRef(dcOrVars, vars)); +} + +export const listConversationsByStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listConversationsByStatus', inputVars); +} +listConversationsByStatusRef.operationName = 'listConversationsByStatus'; + +export function listConversationsByStatus(dcOrVars, vars) { + return executeQuery(listConversationsByStatusRef(dcOrVars, vars)); +} + +export const filterConversationsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterConversations', inputVars); +} +filterConversationsRef.operationName = 'filterConversations'; + +export function filterConversations(dcOrVars, vars) { + return executeQuery(filterConversationsRef(dcOrVars, vars)); +} + +export const listOrdersRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listOrders', inputVars); +} +listOrdersRef.operationName = 'listOrders'; + +export function listOrders(dcOrVars, vars) { + return executeQuery(listOrdersRef(dcOrVars, vars)); +} + +export const getOrderByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getOrderById', inputVars); +} +getOrderByIdRef.operationName = 'getOrderById'; + +export function getOrderById(dcOrVars, vars) { + return executeQuery(getOrderByIdRef(dcOrVars, vars)); +} + +export const getOrdersByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getOrdersByBusinessId', inputVars); +} +getOrdersByBusinessIdRef.operationName = 'getOrdersByBusinessId'; + +export function getOrdersByBusinessId(dcOrVars, vars) { + return executeQuery(getOrdersByBusinessIdRef(dcOrVars, vars)); +} + +export const getOrdersByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getOrdersByVendorId', inputVars); +} +getOrdersByVendorIdRef.operationName = 'getOrdersByVendorId'; + +export function getOrdersByVendorId(dcOrVars, vars) { + return executeQuery(getOrdersByVendorIdRef(dcOrVars, vars)); +} + +export const getOrdersByStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getOrdersByStatus', inputVars); +} +getOrdersByStatusRef.operationName = 'getOrdersByStatus'; + +export function getOrdersByStatus(dcOrVars, vars) { + return executeQuery(getOrdersByStatusRef(dcOrVars, vars)); +} + +export const getOrdersByDateRangeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getOrdersByDateRange', inputVars); +} +getOrdersByDateRangeRef.operationName = 'getOrdersByDateRange'; + +export function getOrdersByDateRange(dcOrVars, vars) { + return executeQuery(getOrdersByDateRangeRef(dcOrVars, vars)); +} + +export const getRapidOrdersRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getRapidOrders', inputVars); +} +getRapidOrdersRef.operationName = 'getRapidOrders'; + +export function getRapidOrders(dcOrVars, vars) { + return executeQuery(getRapidOrdersRef(dcOrVars, vars)); +} + +export const listOrdersByBusinessAndTeamHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listOrdersByBusinessAndTeamHub', inputVars); +} +listOrdersByBusinessAndTeamHubRef.operationName = 'listOrdersByBusinessAndTeamHub'; + +export function listOrdersByBusinessAndTeamHub(dcOrVars, vars) { + return executeQuery(listOrdersByBusinessAndTeamHubRef(dcOrVars, vars)); +} + +export const listStaffRolesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffRoles', inputVars); +} +listStaffRolesRef.operationName = 'listStaffRoles'; + +export function listStaffRoles(dcOrVars, vars) { + return executeQuery(listStaffRolesRef(dcOrVars, vars)); +} + +export const getStaffRoleByKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffRoleByKey', inputVars); +} +getStaffRoleByKeyRef.operationName = 'getStaffRoleByKey'; + +export function getStaffRoleByKey(dcOrVars, vars) { + return executeQuery(getStaffRoleByKeyRef(dcOrVars, vars)); +} + +export const listStaffRolesByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffRolesByStaffId', inputVars); +} +listStaffRolesByStaffIdRef.operationName = 'listStaffRolesByStaffId'; + +export function listStaffRolesByStaffId(dcOrVars, vars) { + return executeQuery(listStaffRolesByStaffIdRef(dcOrVars, vars)); +} + +export const listStaffRolesByRoleIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffRolesByRoleId', inputVars); +} +listStaffRolesByRoleIdRef.operationName = 'listStaffRolesByRoleId'; + +export function listStaffRolesByRoleId(dcOrVars, vars) { + return executeQuery(listStaffRolesByRoleIdRef(dcOrVars, vars)); +} + +export const filterStaffRolesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterStaffRoles', inputVars); +} +filterStaffRolesRef.operationName = 'filterStaffRoles'; + +export function filterStaffRoles(dcOrVars, vars) { + return executeQuery(filterStaffRolesRef(dcOrVars, vars)); +} + +export const listTaskCommentsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTaskComments'); +} +listTaskCommentsRef.operationName = 'listTaskComments'; + +export function listTaskComments(dc) { + return executeQuery(listTaskCommentsRef(dc)); +} + +export const getTaskCommentByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTaskCommentById', inputVars); +} +getTaskCommentByIdRef.operationName = 'getTaskCommentById'; + +export function getTaskCommentById(dcOrVars, vars) { + return executeQuery(getTaskCommentByIdRef(dcOrVars, vars)); +} + +export const getTaskCommentsByTaskIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTaskCommentsByTaskId', inputVars); +} +getTaskCommentsByTaskIdRef.operationName = 'getTaskCommentsByTaskId'; + +export function getTaskCommentsByTaskId(dcOrVars, vars) { + return executeQuery(getTaskCommentsByTaskIdRef(dcOrVars, vars)); +} + +export const createBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createBusiness', inputVars); +} +createBusinessRef.operationName = 'createBusiness'; + +export function createBusiness(dcOrVars, vars) { + return executeMutation(createBusinessRef(dcOrVars, vars)); +} + +export const updateBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateBusiness', inputVars); +} +updateBusinessRef.operationName = 'updateBusiness'; + +export function updateBusiness(dcOrVars, vars) { + return executeMutation(updateBusinessRef(dcOrVars, vars)); +} + +export const deleteBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteBusiness', inputVars); +} +deleteBusinessRef.operationName = 'deleteBusiness'; + +export function deleteBusiness(dcOrVars, vars) { + return executeMutation(deleteBusinessRef(dcOrVars, vars)); +} + +export const createConversationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createConversation', inputVars); +} +createConversationRef.operationName = 'createConversation'; + +export function createConversation(dcOrVars, vars) { + return executeMutation(createConversationRef(dcOrVars, vars)); +} + +export const updateConversationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateConversation', inputVars); +} +updateConversationRef.operationName = 'updateConversation'; + +export function updateConversation(dcOrVars, vars) { + return executeMutation(updateConversationRef(dcOrVars, vars)); +} + +export const updateConversationLastMessageRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateConversationLastMessage', inputVars); +} +updateConversationLastMessageRef.operationName = 'updateConversationLastMessage'; + +export function updateConversationLastMessage(dcOrVars, vars) { + return executeMutation(updateConversationLastMessageRef(dcOrVars, vars)); +} + +export const deleteConversationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteConversation', inputVars); +} +deleteConversationRef.operationName = 'deleteConversation'; + +export function deleteConversation(dcOrVars, vars) { + return executeMutation(deleteConversationRef(dcOrVars, vars)); +} + +export const createCustomRateCardRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createCustomRateCard', inputVars); +} +createCustomRateCardRef.operationName = 'createCustomRateCard'; + +export function createCustomRateCard(dcOrVars, vars) { + return executeMutation(createCustomRateCardRef(dcOrVars, vars)); +} + +export const updateCustomRateCardRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateCustomRateCard', inputVars); +} +updateCustomRateCardRef.operationName = 'updateCustomRateCard'; + +export function updateCustomRateCard(dcOrVars, vars) { + return executeMutation(updateCustomRateCardRef(dcOrVars, vars)); +} + +export const deleteCustomRateCardRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteCustomRateCard', inputVars); +} +deleteCustomRateCardRef.operationName = 'deleteCustomRateCard'; + +export function deleteCustomRateCard(dcOrVars, vars) { + return executeMutation(deleteCustomRateCardRef(dcOrVars, vars)); +} + +export const listDocumentsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listDocuments'); +} +listDocumentsRef.operationName = 'listDocuments'; + +export function listDocuments(dc) { + return executeQuery(listDocumentsRef(dc)); +} + +export const getDocumentByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getDocumentById', inputVars); +} +getDocumentByIdRef.operationName = 'getDocumentById'; + +export function getDocumentById(dcOrVars, vars) { + return executeQuery(getDocumentByIdRef(dcOrVars, vars)); +} + +export const filterDocumentsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterDocuments', inputVars); +} +filterDocumentsRef.operationName = 'filterDocuments'; + +export function filterDocuments(dcOrVars, vars) { + return executeQuery(filterDocumentsRef(dcOrVars, vars)); +} + +export const createRecentPaymentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createRecentPayment', inputVars); +} +createRecentPaymentRef.operationName = 'createRecentPayment'; + +export function createRecentPayment(dcOrVars, vars) { + return executeMutation(createRecentPaymentRef(dcOrVars, vars)); +} + +export const updateRecentPaymentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateRecentPayment', inputVars); +} +updateRecentPaymentRef.operationName = 'updateRecentPayment'; + +export function updateRecentPayment(dcOrVars, vars) { + return executeMutation(updateRecentPaymentRef(dcOrVars, vars)); +} + +export const deleteRecentPaymentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteRecentPayment', inputVars); +} +deleteRecentPaymentRef.operationName = 'deleteRecentPayment'; + +export function deleteRecentPayment(dcOrVars, vars) { + return executeMutation(deleteRecentPaymentRef(dcOrVars, vars)); +} + +export const listShiftsForCoverageRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForCoverage', inputVars); +} +listShiftsForCoverageRef.operationName = 'listShiftsForCoverage'; + +export function listShiftsForCoverage(dcOrVars, vars) { + return executeQuery(listShiftsForCoverageRef(dcOrVars, vars)); +} + +export const listApplicationsForCoverageRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listApplicationsForCoverage', inputVars); +} +listApplicationsForCoverageRef.operationName = 'listApplicationsForCoverage'; + +export function listApplicationsForCoverage(dcOrVars, vars) { + return executeQuery(listApplicationsForCoverageRef(dcOrVars, vars)); +} + +export const listShiftsForDailyOpsByBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForDailyOpsByBusiness', inputVars); +} +listShiftsForDailyOpsByBusinessRef.operationName = 'listShiftsForDailyOpsByBusiness'; + +export function listShiftsForDailyOpsByBusiness(dcOrVars, vars) { + return executeQuery(listShiftsForDailyOpsByBusinessRef(dcOrVars, vars)); +} + +export const listShiftsForDailyOpsByVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForDailyOpsByVendor', inputVars); +} +listShiftsForDailyOpsByVendorRef.operationName = 'listShiftsForDailyOpsByVendor'; + +export function listShiftsForDailyOpsByVendor(dcOrVars, vars) { + return executeQuery(listShiftsForDailyOpsByVendorRef(dcOrVars, vars)); +} + +export const listApplicationsForDailyOpsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listApplicationsForDailyOps', inputVars); +} +listApplicationsForDailyOpsRef.operationName = 'listApplicationsForDailyOps'; + +export function listApplicationsForDailyOps(dcOrVars, vars) { + return executeQuery(listApplicationsForDailyOpsRef(dcOrVars, vars)); +} + +export const listShiftsForForecastByBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForForecastByBusiness', inputVars); +} +listShiftsForForecastByBusinessRef.operationName = 'listShiftsForForecastByBusiness'; + +export function listShiftsForForecastByBusiness(dcOrVars, vars) { + return executeQuery(listShiftsForForecastByBusinessRef(dcOrVars, vars)); +} + +export const listShiftsForForecastByVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForForecastByVendor', inputVars); +} +listShiftsForForecastByVendorRef.operationName = 'listShiftsForForecastByVendor'; + +export function listShiftsForForecastByVendor(dcOrVars, vars) { + return executeQuery(listShiftsForForecastByVendorRef(dcOrVars, vars)); +} + +export const listShiftsForNoShowRangeByBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForNoShowRangeByBusiness', inputVars); +} +listShiftsForNoShowRangeByBusinessRef.operationName = 'listShiftsForNoShowRangeByBusiness'; + +export function listShiftsForNoShowRangeByBusiness(dcOrVars, vars) { + return executeQuery(listShiftsForNoShowRangeByBusinessRef(dcOrVars, vars)); +} + +export const listShiftsForNoShowRangeByVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForNoShowRangeByVendor', inputVars); +} +listShiftsForNoShowRangeByVendorRef.operationName = 'listShiftsForNoShowRangeByVendor'; + +export function listShiftsForNoShowRangeByVendor(dcOrVars, vars) { + return executeQuery(listShiftsForNoShowRangeByVendorRef(dcOrVars, vars)); +} + +export const listApplicationsForNoShowRangeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listApplicationsForNoShowRange', inputVars); +} +listApplicationsForNoShowRangeRef.operationName = 'listApplicationsForNoShowRange'; + +export function listApplicationsForNoShowRange(dcOrVars, vars) { + return executeQuery(listApplicationsForNoShowRangeRef(dcOrVars, vars)); +} + +export const listStaffForNoShowReportRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffForNoShowReport', inputVars); +} +listStaffForNoShowReportRef.operationName = 'listStaffForNoShowReport'; + +export function listStaffForNoShowReport(dcOrVars, vars) { + return executeQuery(listStaffForNoShowReportRef(dcOrVars, vars)); +} + +export const listInvoicesForSpendByBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesForSpendByBusiness', inputVars); +} +listInvoicesForSpendByBusinessRef.operationName = 'listInvoicesForSpendByBusiness'; + +export function listInvoicesForSpendByBusiness(dcOrVars, vars) { + return executeQuery(listInvoicesForSpendByBusinessRef(dcOrVars, vars)); +} + +export const listInvoicesForSpendByVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesForSpendByVendor', inputVars); +} +listInvoicesForSpendByVendorRef.operationName = 'listInvoicesForSpendByVendor'; + +export function listInvoicesForSpendByVendor(dcOrVars, vars) { + return executeQuery(listInvoicesForSpendByVendorRef(dcOrVars, vars)); +} + +export const listInvoicesForSpendByOrderRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesForSpendByOrder', inputVars); +} +listInvoicesForSpendByOrderRef.operationName = 'listInvoicesForSpendByOrder'; + +export function listInvoicesForSpendByOrder(dcOrVars, vars) { + return executeQuery(listInvoicesForSpendByOrderRef(dcOrVars, vars)); +} + +export const listTimesheetsForSpendRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTimesheetsForSpend', inputVars); +} +listTimesheetsForSpendRef.operationName = 'listTimesheetsForSpend'; + +export function listTimesheetsForSpend(dcOrVars, vars) { + return executeQuery(listTimesheetsForSpendRef(dcOrVars, vars)); +} + +export const listShiftsForPerformanceByBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForPerformanceByBusiness', inputVars); +} +listShiftsForPerformanceByBusinessRef.operationName = 'listShiftsForPerformanceByBusiness'; + +export function listShiftsForPerformanceByBusiness(dcOrVars, vars) { + return executeQuery(listShiftsForPerformanceByBusinessRef(dcOrVars, vars)); +} + +export const listShiftsForPerformanceByVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForPerformanceByVendor', inputVars); +} +listShiftsForPerformanceByVendorRef.operationName = 'listShiftsForPerformanceByVendor'; + +export function listShiftsForPerformanceByVendor(dcOrVars, vars) { + return executeQuery(listShiftsForPerformanceByVendorRef(dcOrVars, vars)); +} + +export const listApplicationsForPerformanceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listApplicationsForPerformance', inputVars); +} +listApplicationsForPerformanceRef.operationName = 'listApplicationsForPerformance'; + +export function listApplicationsForPerformance(dcOrVars, vars) { + return executeQuery(listApplicationsForPerformanceRef(dcOrVars, vars)); +} + +export const listStaffForPerformanceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffForPerformance', inputVars); +} +listStaffForPerformanceRef.operationName = 'listStaffForPerformance'; + +export function listStaffForPerformance(dcOrVars, vars) { + return executeQuery(listStaffForPerformanceRef(dcOrVars, vars)); +} + +export const createUserRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'CreateUser', inputVars); +} +createUserRef.operationName = 'CreateUser'; + +export function createUser(dcOrVars, vars) { + return executeMutation(createUserRef(dcOrVars, vars)); +} + +export const updateUserRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'UpdateUser', inputVars); +} +updateUserRef.operationName = 'UpdateUser'; + +export function updateUser(dcOrVars, vars) { + return executeMutation(updateUserRef(dcOrVars, vars)); +} + +export const deleteUserRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'DeleteUser', inputVars); +} +deleteUserRef.operationName = 'DeleteUser'; + +export function deleteUser(dcOrVars, vars) { + return executeMutation(deleteUserRef(dcOrVars, vars)); +} + +export const createVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createVendor', inputVars); +} +createVendorRef.operationName = 'createVendor'; + +export function createVendor(dcOrVars, vars) { + return executeMutation(createVendorRef(dcOrVars, vars)); +} + +export const updateVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateVendor', inputVars); +} +updateVendorRef.operationName = 'updateVendor'; + +export function updateVendor(dcOrVars, vars) { + return executeMutation(updateVendorRef(dcOrVars, vars)); +} + +export const deleteVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteVendor', inputVars); +} +deleteVendorRef.operationName = 'deleteVendor'; + +export function deleteVendor(dcOrVars, vars) { + return executeMutation(deleteVendorRef(dcOrVars, vars)); +} + +export const createDocumentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createDocument', inputVars); +} +createDocumentRef.operationName = 'createDocument'; + +export function createDocument(dcOrVars, vars) { + return executeMutation(createDocumentRef(dcOrVars, vars)); +} + +export const updateDocumentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateDocument', inputVars); +} +updateDocumentRef.operationName = 'updateDocument'; + +export function updateDocument(dcOrVars, vars) { + return executeMutation(updateDocumentRef(dcOrVars, vars)); +} + +export const deleteDocumentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteDocument', inputVars); +} +deleteDocumentRef.operationName = 'deleteDocument'; + +export function deleteDocument(dcOrVars, vars) { + return executeMutation(deleteDocumentRef(dcOrVars, vars)); +} + +export const listRolesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRoles'); +} +listRolesRef.operationName = 'listRoles'; + +export function listRoles(dc) { + return executeQuery(listRolesRef(dc)); +} + +export const getRoleByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getRoleById', inputVars); +} +getRoleByIdRef.operationName = 'getRoleById'; + +export function getRoleById(dcOrVars, vars) { + return executeQuery(getRoleByIdRef(dcOrVars, vars)); +} + +export const listRolesByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRolesByVendorId', inputVars); +} +listRolesByVendorIdRef.operationName = 'listRolesByVendorId'; + +export function listRolesByVendorId(dcOrVars, vars) { + return executeQuery(listRolesByVendorIdRef(dcOrVars, vars)); +} + +export const listRolesByroleCategoryIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRolesByroleCategoryId', inputVars); +} +listRolesByroleCategoryIdRef.operationName = 'listRolesByroleCategoryId'; + +export function listRolesByroleCategoryId(dcOrVars, vars) { + return executeQuery(listRolesByroleCategoryIdRef(dcOrVars, vars)); +} + +export const getShiftRoleByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getShiftRoleById', inputVars); +} +getShiftRoleByIdRef.operationName = 'getShiftRoleById'; + +export function getShiftRoleById(dcOrVars, vars) { + return executeQuery(getShiftRoleByIdRef(dcOrVars, vars)); +} + +export const listShiftRolesByShiftIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByShiftId', inputVars); +} +listShiftRolesByShiftIdRef.operationName = 'listShiftRolesByShiftId'; + +export function listShiftRolesByShiftId(dcOrVars, vars) { + return executeQuery(listShiftRolesByShiftIdRef(dcOrVars, vars)); +} + +export const listShiftRolesByRoleIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByRoleId', inputVars); +} +listShiftRolesByRoleIdRef.operationName = 'listShiftRolesByRoleId'; + +export function listShiftRolesByRoleId(dcOrVars, vars) { + return executeQuery(listShiftRolesByRoleIdRef(dcOrVars, vars)); +} + +export const listShiftRolesByShiftIdAndTimeRangeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByShiftIdAndTimeRange', inputVars); +} +listShiftRolesByShiftIdAndTimeRangeRef.operationName = 'listShiftRolesByShiftIdAndTimeRange'; + +export function listShiftRolesByShiftIdAndTimeRange(dcOrVars, vars) { + return executeQuery(listShiftRolesByShiftIdAndTimeRangeRef(dcOrVars, vars)); +} + +export const listShiftRolesByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByVendorId', inputVars); +} +listShiftRolesByVendorIdRef.operationName = 'listShiftRolesByVendorId'; + +export function listShiftRolesByVendorId(dcOrVars, vars) { + return executeQuery(listShiftRolesByVendorIdRef(dcOrVars, vars)); +} + +export const listShiftRolesByBusinessAndDateRangeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByBusinessAndDateRange', inputVars); +} +listShiftRolesByBusinessAndDateRangeRef.operationName = 'listShiftRolesByBusinessAndDateRange'; + +export function listShiftRolesByBusinessAndDateRange(dcOrVars, vars) { + return executeQuery(listShiftRolesByBusinessAndDateRangeRef(dcOrVars, vars)); +} + +export const listShiftRolesByBusinessAndOrderRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByBusinessAndOrder', inputVars); +} +listShiftRolesByBusinessAndOrderRef.operationName = 'listShiftRolesByBusinessAndOrder'; + +export function listShiftRolesByBusinessAndOrder(dcOrVars, vars) { + return executeQuery(listShiftRolesByBusinessAndOrderRef(dcOrVars, vars)); +} + +export const listShiftRolesByBusinessDateRangeCompletedOrdersRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByBusinessDateRangeCompletedOrders', inputVars); +} +listShiftRolesByBusinessDateRangeCompletedOrdersRef.operationName = 'listShiftRolesByBusinessDateRangeCompletedOrders'; + +export function listShiftRolesByBusinessDateRangeCompletedOrders(dcOrVars, vars) { + return executeQuery(listShiftRolesByBusinessDateRangeCompletedOrdersRef(dcOrVars, vars)); +} + +export const listShiftRolesByBusinessAndDatesSummaryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByBusinessAndDatesSummary', inputVars); +} +listShiftRolesByBusinessAndDatesSummaryRef.operationName = 'listShiftRolesByBusinessAndDatesSummary'; + +export function listShiftRolesByBusinessAndDatesSummary(dcOrVars, vars) { + return executeQuery(listShiftRolesByBusinessAndDatesSummaryRef(dcOrVars, vars)); +} + +export const getCompletedShiftsByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getCompletedShiftsByBusinessId', inputVars); +} +getCompletedShiftsByBusinessIdRef.operationName = 'getCompletedShiftsByBusinessId'; + +export function getCompletedShiftsByBusinessId(dcOrVars, vars) { + return executeQuery(getCompletedShiftsByBusinessIdRef(dcOrVars, vars)); +} + +export const createTaskCommentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTaskComment', inputVars); +} +createTaskCommentRef.operationName = 'createTaskComment'; + +export function createTaskComment(dcOrVars, vars) { + return executeMutation(createTaskCommentRef(dcOrVars, vars)); +} + +export const updateTaskCommentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTaskComment', inputVars); +} +updateTaskCommentRef.operationName = 'updateTaskComment'; + +export function updateTaskComment(dcOrVars, vars) { + return executeMutation(updateTaskCommentRef(dcOrVars, vars)); +} + +export const deleteTaskCommentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTaskComment', inputVars); +} +deleteTaskCommentRef.operationName = 'deleteTaskComment'; + +export function deleteTaskComment(dcOrVars, vars) { + return executeMutation(deleteTaskCommentRef(dcOrVars, vars)); +} + +export const listTaxFormsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTaxForms', inputVars); +} +listTaxFormsRef.operationName = 'listTaxForms'; + +export function listTaxForms(dcOrVars, vars) { + return executeQuery(listTaxFormsRef(dcOrVars, vars)); +} + +export const getTaxFormByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTaxFormById', inputVars); +} +getTaxFormByIdRef.operationName = 'getTaxFormById'; + +export function getTaxFormById(dcOrVars, vars) { + return executeQuery(getTaxFormByIdRef(dcOrVars, vars)); +} + +export const getTaxFormsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTaxFormsByStaffId', inputVars); +} +getTaxFormsByStaffIdRef.operationName = 'getTaxFormsByStaffId'; + +export function getTaxFormsByStaffId(dcOrVars, vars) { + return executeQuery(getTaxFormsByStaffIdRef(dcOrVars, vars)); +} + +export const listTaxFormsWhereRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTaxFormsWhere', inputVars); +} +listTaxFormsWhereRef.operationName = 'listTaxFormsWhere'; + +export function listTaxFormsWhere(dcOrVars, vars) { + return executeQuery(listTaxFormsWhereRef(dcOrVars, vars)); +} + +export const createVendorBenefitPlanRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createVendorBenefitPlan', inputVars); +} +createVendorBenefitPlanRef.operationName = 'createVendorBenefitPlan'; + +export function createVendorBenefitPlan(dcOrVars, vars) { + return executeMutation(createVendorBenefitPlanRef(dcOrVars, vars)); +} + +export const updateVendorBenefitPlanRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateVendorBenefitPlan', inputVars); +} +updateVendorBenefitPlanRef.operationName = 'updateVendorBenefitPlan'; + +export function updateVendorBenefitPlan(dcOrVars, vars) { + return executeMutation(updateVendorBenefitPlanRef(dcOrVars, vars)); +} + +export const deleteVendorBenefitPlanRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteVendorBenefitPlan', inputVars); +} +deleteVendorBenefitPlanRef.operationName = 'deleteVendorBenefitPlan'; + +export function deleteVendorBenefitPlan(dcOrVars, vars) { + return executeMutation(deleteVendorBenefitPlanRef(dcOrVars, vars)); +} + +export const listFaqDatasRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listFaqDatas'); +} +listFaqDatasRef.operationName = 'listFaqDatas'; + +export function listFaqDatas(dc) { + return executeQuery(listFaqDatasRef(dc)); +} + +export const getFaqDataByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getFaqDataById', inputVars); +} +getFaqDataByIdRef.operationName = 'getFaqDataById'; + +export function getFaqDataById(dcOrVars, vars) { + return executeQuery(getFaqDataByIdRef(dcOrVars, vars)); +} + +export const filterFaqDatasRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterFaqDatas', inputVars); +} +filterFaqDatasRef.operationName = 'filterFaqDatas'; + +export function filterFaqDatas(dcOrVars, vars) { + return executeQuery(filterFaqDatasRef(dcOrVars, vars)); +} + +export const createMessageRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createMessage', inputVars); +} +createMessageRef.operationName = 'createMessage'; + +export function createMessage(dcOrVars, vars) { + return executeMutation(createMessageRef(dcOrVars, vars)); +} + +export const updateMessageRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateMessage', inputVars); +} +updateMessageRef.operationName = 'updateMessage'; + +export function updateMessage(dcOrVars, vars) { + return executeMutation(updateMessageRef(dcOrVars, vars)); +} + +export const deleteMessageRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteMessage', inputVars); +} +deleteMessageRef.operationName = 'deleteMessage'; + +export function deleteMessage(dcOrVars, vars) { + return executeMutation(deleteMessageRef(dcOrVars, vars)); +} + +export const getStaffCourseByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffCourseById', inputVars); +} +getStaffCourseByIdRef.operationName = 'getStaffCourseById'; + +export function getStaffCourseById(dcOrVars, vars) { + return executeQuery(getStaffCourseByIdRef(dcOrVars, vars)); +} + +export const listStaffCoursesByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffCoursesByStaffId', inputVars); +} +listStaffCoursesByStaffIdRef.operationName = 'listStaffCoursesByStaffId'; + +export function listStaffCoursesByStaffId(dcOrVars, vars) { + return executeQuery(listStaffCoursesByStaffIdRef(dcOrVars, vars)); +} + +export const listStaffCoursesByCourseIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffCoursesByCourseId', inputVars); +} +listStaffCoursesByCourseIdRef.operationName = 'listStaffCoursesByCourseId'; + +export function listStaffCoursesByCourseId(dcOrVars, vars) { + return executeQuery(listStaffCoursesByCourseIdRef(dcOrVars, vars)); +} + +export const getStaffCourseByStaffAndCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffCourseByStaffAndCourse', inputVars); +} +getStaffCourseByStaffAndCourseRef.operationName = 'getStaffCourseByStaffAndCourse'; + +export function getStaffCourseByStaffAndCourse(dcOrVars, vars) { + return executeQuery(getStaffCourseByStaffAndCourseRef(dcOrVars, vars)); +} + +export const createWorkforceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createWorkforce', inputVars); +} +createWorkforceRef.operationName = 'createWorkforce'; + +export function createWorkforce(dcOrVars, vars) { + return executeMutation(createWorkforceRef(dcOrVars, vars)); +} + +export const updateWorkforceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateWorkforce', inputVars); +} +updateWorkforceRef.operationName = 'updateWorkforce'; + +export function updateWorkforce(dcOrVars, vars) { + return executeMutation(updateWorkforceRef(dcOrVars, vars)); +} + +export const deactivateWorkforceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deactivateWorkforce', inputVars); +} +deactivateWorkforceRef.operationName = 'deactivateWorkforce'; + +export function deactivateWorkforce(dcOrVars, vars) { + return executeMutation(deactivateWorkforceRef(dcOrVars, vars)); +} + +export const listActivityLogsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listActivityLogs', inputVars); +} +listActivityLogsRef.operationName = 'listActivityLogs'; + +export function listActivityLogs(dcOrVars, vars) { + return executeQuery(listActivityLogsRef(dcOrVars, vars)); +} + +export const getActivityLogByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getActivityLogById', inputVars); +} +getActivityLogByIdRef.operationName = 'getActivityLogById'; + +export function getActivityLogById(dcOrVars, vars) { + return executeQuery(getActivityLogByIdRef(dcOrVars, vars)); +} + +export const listActivityLogsByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listActivityLogsByUserId', inputVars); +} +listActivityLogsByUserIdRef.operationName = 'listActivityLogsByUserId'; + +export function listActivityLogsByUserId(dcOrVars, vars) { + return executeQuery(listActivityLogsByUserIdRef(dcOrVars, vars)); +} + +export const listUnreadActivityLogsByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listUnreadActivityLogsByUserId', inputVars); +} +listUnreadActivityLogsByUserIdRef.operationName = 'listUnreadActivityLogsByUserId'; + +export function listUnreadActivityLogsByUserId(dcOrVars, vars) { + return executeQuery(listUnreadActivityLogsByUserIdRef(dcOrVars, vars)); +} + +export const filterActivityLogsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterActivityLogs', inputVars); +} +filterActivityLogsRef.operationName = 'filterActivityLogs'; + +export function filterActivityLogs(dcOrVars, vars) { + return executeQuery(filterActivityLogsRef(dcOrVars, vars)); +} + +export const listBenefitsDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listBenefitsData', inputVars); +} +listBenefitsDataRef.operationName = 'listBenefitsData'; + +export function listBenefitsData(dcOrVars, vars) { + return executeQuery(listBenefitsDataRef(dcOrVars, vars)); +} + +export const getBenefitsDataByKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getBenefitsDataByKey', inputVars); +} +getBenefitsDataByKeyRef.operationName = 'getBenefitsDataByKey'; + +export function getBenefitsDataByKey(dcOrVars, vars) { + return executeQuery(getBenefitsDataByKeyRef(dcOrVars, vars)); +} + +export const listBenefitsDataByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listBenefitsDataByStaffId', inputVars); +} +listBenefitsDataByStaffIdRef.operationName = 'listBenefitsDataByStaffId'; + +export function listBenefitsDataByStaffId(dcOrVars, vars) { + return executeQuery(listBenefitsDataByStaffIdRef(dcOrVars, vars)); +} + +export const listBenefitsDataByVendorBenefitPlanIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listBenefitsDataByVendorBenefitPlanId', inputVars); +} +listBenefitsDataByVendorBenefitPlanIdRef.operationName = 'listBenefitsDataByVendorBenefitPlanId'; + +export function listBenefitsDataByVendorBenefitPlanId(dcOrVars, vars) { + return executeQuery(listBenefitsDataByVendorBenefitPlanIdRef(dcOrVars, vars)); +} + +export const listBenefitsDataByVendorBenefitPlanIdsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listBenefitsDataByVendorBenefitPlanIds', inputVars); +} +listBenefitsDataByVendorBenefitPlanIdsRef.operationName = 'listBenefitsDataByVendorBenefitPlanIds'; + +export function listBenefitsDataByVendorBenefitPlanIds(dcOrVars, vars) { + return executeQuery(listBenefitsDataByVendorBenefitPlanIdsRef(dcOrVars, vars)); +} + +export const createFaqDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createFaqData', inputVars); +} +createFaqDataRef.operationName = 'createFaqData'; + +export function createFaqData(dcOrVars, vars) { + return executeMutation(createFaqDataRef(dcOrVars, vars)); +} + +export const updateFaqDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateFaqData', inputVars); +} +updateFaqDataRef.operationName = 'updateFaqData'; + +export function updateFaqData(dcOrVars, vars) { + return executeMutation(updateFaqDataRef(dcOrVars, vars)); +} + +export const deleteFaqDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteFaqData', inputVars); +} +deleteFaqDataRef.operationName = 'deleteFaqData'; + +export function deleteFaqData(dcOrVars, vars) { + return executeMutation(deleteFaqDataRef(dcOrVars, vars)); +} + +export const createInvoiceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createInvoice', inputVars); +} +createInvoiceRef.operationName = 'createInvoice'; + +export function createInvoice(dcOrVars, vars) { + return executeMutation(createInvoiceRef(dcOrVars, vars)); +} + +export const updateInvoiceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateInvoice', inputVars); +} +updateInvoiceRef.operationName = 'updateInvoice'; + +export function updateInvoice(dcOrVars, vars) { + return executeMutation(updateInvoiceRef(dcOrVars, vars)); +} + +export const deleteInvoiceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteInvoice', inputVars); +} +deleteInvoiceRef.operationName = 'deleteInvoice'; + +export function deleteInvoice(dcOrVars, vars) { + return executeMutation(deleteInvoiceRef(dcOrVars, vars)); +} + +export const listStaffRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaff'); +} +listStaffRef.operationName = 'listStaff'; + +export function listStaff(dc) { + return executeQuery(listStaffRef(dc)); +} + +export const getStaffByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffById', inputVars); +} +getStaffByIdRef.operationName = 'getStaffById'; + +export function getStaffById(dcOrVars, vars) { + return executeQuery(getStaffByIdRef(dcOrVars, vars)); +} + +export const getStaffByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffByUserId', inputVars); +} +getStaffByUserIdRef.operationName = 'getStaffByUserId'; + +export function getStaffByUserId(dcOrVars, vars) { + return executeQuery(getStaffByUserIdRef(dcOrVars, vars)); +} + +export const filterStaffRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterStaff', inputVars); +} +filterStaffRef.operationName = 'filterStaff'; + +export function filterStaff(dcOrVars, vars) { + return executeQuery(filterStaffRef(dcOrVars, vars)); +} + +export const listTasksRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTasks'); +} +listTasksRef.operationName = 'listTasks'; + +export function listTasks(dc) { + return executeQuery(listTasksRef(dc)); +} + +export const getTaskByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTaskById', inputVars); +} +getTaskByIdRef.operationName = 'getTaskById'; + +export function getTaskById(dcOrVars, vars) { + return executeQuery(getTaskByIdRef(dcOrVars, vars)); +} + +export const getTasksByOwnerIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTasksByOwnerId', inputVars); +} +getTasksByOwnerIdRef.operationName = 'getTasksByOwnerId'; + +export function getTasksByOwnerId(dcOrVars, vars) { + return executeQuery(getTasksByOwnerIdRef(dcOrVars, vars)); +} + +export const filterTasksRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterTasks', inputVars); +} +filterTasksRef.operationName = 'filterTasks'; + +export function filterTasks(dcOrVars, vars) { + return executeQuery(filterTasksRef(dcOrVars, vars)); +} + +export const createTeamHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTeamHub', inputVars); +} +createTeamHubRef.operationName = 'createTeamHub'; + +export function createTeamHub(dcOrVars, vars) { + return executeMutation(createTeamHubRef(dcOrVars, vars)); +} + +export const updateTeamHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTeamHub', inputVars); +} +updateTeamHubRef.operationName = 'updateTeamHub'; + +export function updateTeamHub(dcOrVars, vars) { + return executeMutation(updateTeamHubRef(dcOrVars, vars)); +} + +export const deleteTeamHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTeamHub', inputVars); +} +deleteTeamHubRef.operationName = 'deleteTeamHub'; + +export function deleteTeamHub(dcOrVars, vars) { + return executeMutation(deleteTeamHubRef(dcOrVars, vars)); +} + +export const listTeamHubsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTeamHubs', inputVars); +} +listTeamHubsRef.operationName = 'listTeamHubs'; + +export function listTeamHubs(dcOrVars, vars) { + return executeQuery(listTeamHubsRef(dcOrVars, vars)); +} + +export const getTeamHubByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamHubById', inputVars); +} +getTeamHubByIdRef.operationName = 'getTeamHubById'; + +export function getTeamHubById(dcOrVars, vars) { + return executeQuery(getTeamHubByIdRef(dcOrVars, vars)); +} + +export const getTeamHubsByTeamIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamHubsByTeamId', inputVars); +} +getTeamHubsByTeamIdRef.operationName = 'getTeamHubsByTeamId'; + +export function getTeamHubsByTeamId(dcOrVars, vars) { + return executeQuery(getTeamHubsByTeamIdRef(dcOrVars, vars)); +} + +export const listTeamHubsByOwnerIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTeamHubsByOwnerId', inputVars); +} +listTeamHubsByOwnerIdRef.operationName = 'listTeamHubsByOwnerId'; + +export function listTeamHubsByOwnerId(dcOrVars, vars) { + return executeQuery(listTeamHubsByOwnerIdRef(dcOrVars, vars)); +} + +export const listClientFeedbacksRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listClientFeedbacks', inputVars); +} +listClientFeedbacksRef.operationName = 'listClientFeedbacks'; + +export function listClientFeedbacks(dcOrVars, vars) { + return executeQuery(listClientFeedbacksRef(dcOrVars, vars)); +} + +export const getClientFeedbackByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getClientFeedbackById', inputVars); +} +getClientFeedbackByIdRef.operationName = 'getClientFeedbackById'; + +export function getClientFeedbackById(dcOrVars, vars) { + return executeQuery(getClientFeedbackByIdRef(dcOrVars, vars)); +} + +export const listClientFeedbacksByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listClientFeedbacksByBusinessId', inputVars); +} +listClientFeedbacksByBusinessIdRef.operationName = 'listClientFeedbacksByBusinessId'; + +export function listClientFeedbacksByBusinessId(dcOrVars, vars) { + return executeQuery(listClientFeedbacksByBusinessIdRef(dcOrVars, vars)); +} + +export const listClientFeedbacksByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listClientFeedbacksByVendorId', inputVars); +} +listClientFeedbacksByVendorIdRef.operationName = 'listClientFeedbacksByVendorId'; + +export function listClientFeedbacksByVendorId(dcOrVars, vars) { + return executeQuery(listClientFeedbacksByVendorIdRef(dcOrVars, vars)); +} + +export const listClientFeedbacksByBusinessAndVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listClientFeedbacksByBusinessAndVendor', inputVars); +} +listClientFeedbacksByBusinessAndVendorRef.operationName = 'listClientFeedbacksByBusinessAndVendor'; + +export function listClientFeedbacksByBusinessAndVendor(dcOrVars, vars) { + return executeQuery(listClientFeedbacksByBusinessAndVendorRef(dcOrVars, vars)); +} + +export const filterClientFeedbacksRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterClientFeedbacks', inputVars); +} +filterClientFeedbacksRef.operationName = 'filterClientFeedbacks'; + +export function filterClientFeedbacks(dcOrVars, vars) { + return executeQuery(filterClientFeedbacksRef(dcOrVars, vars)); +} + +export const listClientFeedbackRatingsByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listClientFeedbackRatingsByVendorId', inputVars); +} +listClientFeedbackRatingsByVendorIdRef.operationName = 'listClientFeedbackRatingsByVendorId'; + +export function listClientFeedbackRatingsByVendorId(dcOrVars, vars) { + return executeQuery(listClientFeedbackRatingsByVendorIdRef(dcOrVars, vars)); +} + +export const createHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createHub', inputVars); +} +createHubRef.operationName = 'createHub'; + +export function createHub(dcOrVars, vars) { + return executeMutation(createHubRef(dcOrVars, vars)); +} + +export const updateHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateHub', inputVars); +} +updateHubRef.operationName = 'updateHub'; + +export function updateHub(dcOrVars, vars) { + return executeMutation(updateHubRef(dcOrVars, vars)); +} + +export const deleteHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteHub', inputVars); +} +deleteHubRef.operationName = 'deleteHub'; + +export function deleteHub(dcOrVars, vars) { + return executeMutation(deleteHubRef(dcOrVars, vars)); +} + +export const createRoleCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createRoleCategory', inputVars); +} +createRoleCategoryRef.operationName = 'createRoleCategory'; + +export function createRoleCategory(dcOrVars, vars) { + return executeMutation(createRoleCategoryRef(dcOrVars, vars)); +} + +export const updateRoleCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateRoleCategory', inputVars); +} +updateRoleCategoryRef.operationName = 'updateRoleCategory'; + +export function updateRoleCategory(dcOrVars, vars) { + return executeMutation(updateRoleCategoryRef(dcOrVars, vars)); +} + +export const deleteRoleCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteRoleCategory', inputVars); +} +deleteRoleCategoryRef.operationName = 'deleteRoleCategory'; + +export function deleteRoleCategory(dcOrVars, vars) { + return executeMutation(deleteRoleCategoryRef(dcOrVars, vars)); +} + +export const createStaffAvailabilityStatsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createStaffAvailabilityStats', inputVars); +} +createStaffAvailabilityStatsRef.operationName = 'createStaffAvailabilityStats'; + +export function createStaffAvailabilityStats(dcOrVars, vars) { + return executeMutation(createStaffAvailabilityStatsRef(dcOrVars, vars)); +} + +export const updateStaffAvailabilityStatsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateStaffAvailabilityStats', inputVars); +} +updateStaffAvailabilityStatsRef.operationName = 'updateStaffAvailabilityStats'; + +export function updateStaffAvailabilityStats(dcOrVars, vars) { + return executeMutation(updateStaffAvailabilityStatsRef(dcOrVars, vars)); +} + +export const deleteStaffAvailabilityStatsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteStaffAvailabilityStats', inputVars); +} +deleteStaffAvailabilityStatsRef.operationName = 'deleteStaffAvailabilityStats'; + +export function deleteStaffAvailabilityStats(dcOrVars, vars) { + return executeMutation(deleteStaffAvailabilityStatsRef(dcOrVars, vars)); +} + +export const listUsersRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listUsers'); +} +listUsersRef.operationName = 'listUsers'; + +export function listUsers(dc) { + return executeQuery(listUsersRef(dc)); +} + +export const getUserByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getUserById', inputVars); +} +getUserByIdRef.operationName = 'getUserById'; + +export function getUserById(dcOrVars, vars) { + return executeQuery(getUserByIdRef(dcOrVars, vars)); +} + +export const filterUsersRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterUsers', inputVars); +} +filterUsersRef.operationName = 'filterUsers'; + +export function filterUsers(dcOrVars, vars) { + return executeQuery(filterUsersRef(dcOrVars, vars)); +} + +export const getVendorByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getVendorById', inputVars); +} +getVendorByIdRef.operationName = 'getVendorById'; + +export function getVendorById(dcOrVars, vars) { + return executeQuery(getVendorByIdRef(dcOrVars, vars)); +} + +export const getVendorByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getVendorByUserId', inputVars); +} +getVendorByUserIdRef.operationName = 'getVendorByUserId'; + +export function getVendorByUserId(dcOrVars, vars) { + return executeQuery(getVendorByUserIdRef(dcOrVars, vars)); +} + +export const listVendorsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listVendors'); +} +listVendorsRef.operationName = 'listVendors'; + +export function listVendors(dc) { + return executeQuery(listVendorsRef(dc)); +} + +export const listCategoriesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listCategories'); +} +listCategoriesRef.operationName = 'listCategories'; + +export function listCategories(dc) { + return executeQuery(listCategoriesRef(dc)); +} + +export const getCategoryByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getCategoryById', inputVars); +} +getCategoryByIdRef.operationName = 'getCategoryById'; + +export function getCategoryById(dcOrVars, vars) { + return executeQuery(getCategoryByIdRef(dcOrVars, vars)); +} + +export const filterCategoriesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterCategories', inputVars); +} +filterCategoriesRef.operationName = 'filterCategories'; + +export function filterCategories(dcOrVars, vars) { + return executeQuery(filterCategoriesRef(dcOrVars, vars)); +} + +export const listMessagesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listMessages'); +} +listMessagesRef.operationName = 'listMessages'; + +export function listMessages(dc) { + return executeQuery(listMessagesRef(dc)); +} + +export const getMessageByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getMessageById', inputVars); +} +getMessageByIdRef.operationName = 'getMessageById'; + +export function getMessageById(dcOrVars, vars) { + return executeQuery(getMessageByIdRef(dcOrVars, vars)); +} + +export const getMessagesByConversationIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getMessagesByConversationId', inputVars); +} +getMessagesByConversationIdRef.operationName = 'getMessagesByConversationId'; + +export function getMessagesByConversationId(dcOrVars, vars) { + return executeQuery(getMessagesByConversationIdRef(dcOrVars, vars)); +} + +export const createShiftRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createShiftRole', inputVars); +} +createShiftRoleRef.operationName = 'createShiftRole'; + +export function createShiftRole(dcOrVars, vars) { + return executeMutation(createShiftRoleRef(dcOrVars, vars)); +} + +export const updateShiftRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateShiftRole', inputVars); +} +updateShiftRoleRef.operationName = 'updateShiftRole'; + +export function updateShiftRole(dcOrVars, vars) { + return executeMutation(updateShiftRoleRef(dcOrVars, vars)); +} + +export const deleteShiftRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteShiftRole', inputVars); +} +deleteShiftRoleRef.operationName = 'deleteShiftRole'; + +export function deleteShiftRole(dcOrVars, vars) { + return executeMutation(deleteShiftRoleRef(dcOrVars, vars)); +} + +export const createStaffRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createStaffRole', inputVars); +} +createStaffRoleRef.operationName = 'createStaffRole'; + +export function createStaffRole(dcOrVars, vars) { + return executeMutation(createStaffRoleRef(dcOrVars, vars)); +} + +export const deleteStaffRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteStaffRole', inputVars); +} +deleteStaffRoleRef.operationName = 'deleteStaffRole'; + +export function deleteStaffRole(dcOrVars, vars) { + return executeMutation(deleteStaffRoleRef(dcOrVars, vars)); +} + +export const listUserConversationsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listUserConversations', inputVars); +} +listUserConversationsRef.operationName = 'listUserConversations'; + +export function listUserConversations(dcOrVars, vars) { + return executeQuery(listUserConversationsRef(dcOrVars, vars)); +} + +export const getUserConversationByKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getUserConversationByKey', inputVars); +} +getUserConversationByKeyRef.operationName = 'getUserConversationByKey'; + +export function getUserConversationByKey(dcOrVars, vars) { + return executeQuery(getUserConversationByKeyRef(dcOrVars, vars)); +} + +export const listUserConversationsByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listUserConversationsByUserId', inputVars); +} +listUserConversationsByUserIdRef.operationName = 'listUserConversationsByUserId'; + +export function listUserConversationsByUserId(dcOrVars, vars) { + return executeQuery(listUserConversationsByUserIdRef(dcOrVars, vars)); +} + +export const listUnreadUserConversationsByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listUnreadUserConversationsByUserId', inputVars); +} +listUnreadUserConversationsByUserIdRef.operationName = 'listUnreadUserConversationsByUserId'; + +export function listUnreadUserConversationsByUserId(dcOrVars, vars) { + return executeQuery(listUnreadUserConversationsByUserIdRef(dcOrVars, vars)); +} + +export const listUserConversationsByConversationIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listUserConversationsByConversationId', inputVars); +} +listUserConversationsByConversationIdRef.operationName = 'listUserConversationsByConversationId'; + +export function listUserConversationsByConversationId(dcOrVars, vars) { + return executeQuery(listUserConversationsByConversationIdRef(dcOrVars, vars)); +} + +export const filterUserConversationsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterUserConversations', inputVars); +} +filterUserConversationsRef.operationName = 'filterUserConversations'; + +export function filterUserConversations(dcOrVars, vars) { + return executeQuery(filterUserConversationsRef(dcOrVars, vars)); +} + +export const createAccountRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createAccount', inputVars); +} +createAccountRef.operationName = 'createAccount'; + +export function createAccount(dcOrVars, vars) { + return executeMutation(createAccountRef(dcOrVars, vars)); +} + +export const updateAccountRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateAccount', inputVars); +} +updateAccountRef.operationName = 'updateAccount'; + +export function updateAccount(dcOrVars, vars) { + return executeMutation(updateAccountRef(dcOrVars, vars)); +} + +export const deleteAccountRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteAccount', inputVars); +} +deleteAccountRef.operationName = 'deleteAccount'; + +export function deleteAccount(dcOrVars, vars) { + return executeMutation(deleteAccountRef(dcOrVars, vars)); +} + +export const createApplicationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createApplication', inputVars); +} +createApplicationRef.operationName = 'createApplication'; + +export function createApplication(dcOrVars, vars) { + return executeMutation(createApplicationRef(dcOrVars, vars)); +} + +export const updateApplicationStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateApplicationStatus', inputVars); +} +updateApplicationStatusRef.operationName = 'updateApplicationStatus'; + +export function updateApplicationStatus(dcOrVars, vars) { + return executeMutation(updateApplicationStatusRef(dcOrVars, vars)); +} + +export const deleteApplicationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteApplication', inputVars); +} +deleteApplicationRef.operationName = 'deleteApplication'; + +export function deleteApplication(dcOrVars, vars) { + return executeMutation(deleteApplicationRef(dcOrVars, vars)); +} + +export const createAssignmentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'CreateAssignment', inputVars); +} +createAssignmentRef.operationName = 'CreateAssignment'; + +export function createAssignment(dcOrVars, vars) { + return executeMutation(createAssignmentRef(dcOrVars, vars)); +} + +export const updateAssignmentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'UpdateAssignment', inputVars); +} +updateAssignmentRef.operationName = 'UpdateAssignment'; + +export function updateAssignment(dcOrVars, vars) { + return executeMutation(updateAssignmentRef(dcOrVars, vars)); +} + +export const deleteAssignmentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'DeleteAssignment', inputVars); +} +deleteAssignmentRef.operationName = 'DeleteAssignment'; + +export function deleteAssignment(dcOrVars, vars) { + return executeMutation(deleteAssignmentRef(dcOrVars, vars)); +} + +export const listHubsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listHubs'); +} +listHubsRef.operationName = 'listHubs'; + +export function listHubs(dc) { + return executeQuery(listHubsRef(dc)); +} + +export const getHubByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getHubById', inputVars); +} +getHubByIdRef.operationName = 'getHubById'; + +export function getHubById(dcOrVars, vars) { + return executeQuery(getHubByIdRef(dcOrVars, vars)); +} + +export const getHubsByOwnerIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getHubsByOwnerId', inputVars); +} +getHubsByOwnerIdRef.operationName = 'getHubsByOwnerId'; + +export function getHubsByOwnerId(dcOrVars, vars) { + return executeQuery(getHubsByOwnerIdRef(dcOrVars, vars)); +} + +export const filterHubsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterHubs', inputVars); +} +filterHubsRef.operationName = 'filterHubs'; + +export function filterHubs(dcOrVars, vars) { + return executeQuery(filterHubsRef(dcOrVars, vars)); +} + +export const listInvoicesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoices', inputVars); +} +listInvoicesRef.operationName = 'listInvoices'; + +export function listInvoices(dcOrVars, vars) { + return executeQuery(listInvoicesRef(dcOrVars, vars)); +} + +export const getInvoiceByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getInvoiceById', inputVars); +} +getInvoiceByIdRef.operationName = 'getInvoiceById'; + +export function getInvoiceById(dcOrVars, vars) { + return executeQuery(getInvoiceByIdRef(dcOrVars, vars)); +} + +export const listInvoicesByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesByVendorId', inputVars); +} +listInvoicesByVendorIdRef.operationName = 'listInvoicesByVendorId'; + +export function listInvoicesByVendorId(dcOrVars, vars) { + return executeQuery(listInvoicesByVendorIdRef(dcOrVars, vars)); +} + +export const listInvoicesByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesByBusinessId', inputVars); +} +listInvoicesByBusinessIdRef.operationName = 'listInvoicesByBusinessId'; + +export function listInvoicesByBusinessId(dcOrVars, vars) { + return executeQuery(listInvoicesByBusinessIdRef(dcOrVars, vars)); +} + +export const listInvoicesByOrderIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesByOrderId', inputVars); +} +listInvoicesByOrderIdRef.operationName = 'listInvoicesByOrderId'; + +export function listInvoicesByOrderId(dcOrVars, vars) { + return executeQuery(listInvoicesByOrderIdRef(dcOrVars, vars)); +} + +export const listInvoicesByStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesByStatus', inputVars); +} +listInvoicesByStatusRef.operationName = 'listInvoicesByStatus'; + +export function listInvoicesByStatus(dcOrVars, vars) { + return executeQuery(listInvoicesByStatusRef(dcOrVars, vars)); +} + +export const filterInvoicesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterInvoices', inputVars); +} +filterInvoicesRef.operationName = 'filterInvoices'; + +export function filterInvoices(dcOrVars, vars) { + return executeQuery(filterInvoicesRef(dcOrVars, vars)); +} + +export const listOverdueInvoicesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listOverdueInvoices', inputVars); +} +listOverdueInvoicesRef.operationName = 'listOverdueInvoices'; + +export function listOverdueInvoices(dcOrVars, vars) { + return executeQuery(listOverdueInvoicesRef(dcOrVars, vars)); +} + +export const createInvoiceTemplateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createInvoiceTemplate', inputVars); +} +createInvoiceTemplateRef.operationName = 'createInvoiceTemplate'; + +export function createInvoiceTemplate(dcOrVars, vars) { + return executeMutation(createInvoiceTemplateRef(dcOrVars, vars)); +} + +export const updateInvoiceTemplateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateInvoiceTemplate', inputVars); +} +updateInvoiceTemplateRef.operationName = 'updateInvoiceTemplate'; + +export function updateInvoiceTemplate(dcOrVars, vars) { + return executeMutation(updateInvoiceTemplateRef(dcOrVars, vars)); +} + +export const deleteInvoiceTemplateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteInvoiceTemplate', inputVars); +} +deleteInvoiceTemplateRef.operationName = 'deleteInvoiceTemplate'; + +export function deleteInvoiceTemplate(dcOrVars, vars) { + return executeMutation(deleteInvoiceTemplateRef(dcOrVars, vars)); +} + +export const createStaffAvailabilityRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createStaffAvailability', inputVars); +} +createStaffAvailabilityRef.operationName = 'createStaffAvailability'; + +export function createStaffAvailability(dcOrVars, vars) { + return executeMutation(createStaffAvailabilityRef(dcOrVars, vars)); +} + +export const updateStaffAvailabilityRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateStaffAvailability', inputVars); +} +updateStaffAvailabilityRef.operationName = 'updateStaffAvailability'; + +export function updateStaffAvailability(dcOrVars, vars) { + return executeMutation(updateStaffAvailabilityRef(dcOrVars, vars)); +} + +export const deleteStaffAvailabilityRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteStaffAvailability', inputVars); +} +deleteStaffAvailabilityRef.operationName = 'deleteStaffAvailability'; + +export function deleteStaffAvailability(dcOrVars, vars) { + return executeMutation(deleteStaffAvailabilityRef(dcOrVars, vars)); +} + +export const createTeamMemberRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTeamMember', inputVars); +} +createTeamMemberRef.operationName = 'createTeamMember'; + +export function createTeamMember(dcOrVars, vars) { + return executeMutation(createTeamMemberRef(dcOrVars, vars)); +} + +export const updateTeamMemberRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTeamMember', inputVars); +} +updateTeamMemberRef.operationName = 'updateTeamMember'; + +export function updateTeamMember(dcOrVars, vars) { + return executeMutation(updateTeamMemberRef(dcOrVars, vars)); +} + +export const updateTeamMemberInviteStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTeamMemberInviteStatus', inputVars); +} +updateTeamMemberInviteStatusRef.operationName = 'updateTeamMemberInviteStatus'; + +export function updateTeamMemberInviteStatus(dcOrVars, vars) { + return executeMutation(updateTeamMemberInviteStatusRef(dcOrVars, vars)); +} + +export const acceptInviteByCodeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'acceptInviteByCode', inputVars); +} +acceptInviteByCodeRef.operationName = 'acceptInviteByCode'; + +export function acceptInviteByCode(dcOrVars, vars) { + return executeMutation(acceptInviteByCodeRef(dcOrVars, vars)); +} + +export const cancelInviteByCodeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'cancelInviteByCode', inputVars); +} +cancelInviteByCodeRef.operationName = 'cancelInviteByCode'; + +export function cancelInviteByCode(dcOrVars, vars) { + return executeMutation(cancelInviteByCodeRef(dcOrVars, vars)); +} + +export const deleteTeamMemberRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTeamMember', inputVars); +} +deleteTeamMemberRef.operationName = 'deleteTeamMember'; + +export function deleteTeamMember(dcOrVars, vars) { + return executeMutation(deleteTeamMemberRef(dcOrVars, vars)); +} + +export const listCoursesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listCourses'); +} +listCoursesRef.operationName = 'listCourses'; + +export function listCourses(dc) { + return executeQuery(listCoursesRef(dc)); +} + +export const getCourseByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getCourseById', inputVars); +} +getCourseByIdRef.operationName = 'getCourseById'; + +export function getCourseById(dcOrVars, vars) { + return executeQuery(getCourseByIdRef(dcOrVars, vars)); +} + +export const filterCoursesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterCourses', inputVars); +} +filterCoursesRef.operationName = 'filterCourses'; + +export function filterCourses(dcOrVars, vars) { + return executeQuery(filterCoursesRef(dcOrVars, vars)); +} + +export const createLevelRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createLevel', inputVars); +} +createLevelRef.operationName = 'createLevel'; + +export function createLevel(dcOrVars, vars) { + return executeMutation(createLevelRef(dcOrVars, vars)); +} + +export const updateLevelRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateLevel', inputVars); +} +updateLevelRef.operationName = 'updateLevel'; + +export function updateLevel(dcOrVars, vars) { + return executeMutation(updateLevelRef(dcOrVars, vars)); +} + +export const deleteLevelRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteLevel', inputVars); +} +deleteLevelRef.operationName = 'deleteLevel'; + +export function deleteLevel(dcOrVars, vars) { + return executeMutation(deleteLevelRef(dcOrVars, vars)); +} + +export const createOrderRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createOrder', inputVars); +} +createOrderRef.operationName = 'createOrder'; + +export function createOrder(dcOrVars, vars) { + return executeMutation(createOrderRef(dcOrVars, vars)); +} + +export const updateOrderRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateOrder', inputVars); +} +updateOrderRef.operationName = 'updateOrder'; + +export function updateOrder(dcOrVars, vars) { + return executeMutation(updateOrderRef(dcOrVars, vars)); +} + +export const deleteOrderRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteOrder', inputVars); +} +deleteOrderRef.operationName = 'deleteOrder'; + +export function deleteOrder(dcOrVars, vars) { + return executeMutation(deleteOrderRef(dcOrVars, vars)); +} + +export const listVendorRatesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listVendorRates'); +} +listVendorRatesRef.operationName = 'listVendorRates'; + +export function listVendorRates(dc) { + return executeQuery(listVendorRatesRef(dc)); +} + +export const getVendorRateByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getVendorRateById', inputVars); +} +getVendorRateByIdRef.operationName = 'getVendorRateById'; + +export function getVendorRateById(dcOrVars, vars) { + return executeQuery(getVendorRateByIdRef(dcOrVars, vars)); +} + +export const getWorkforceByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getWorkforceById', inputVars); +} +getWorkforceByIdRef.operationName = 'getWorkforceById'; + +export function getWorkforceById(dcOrVars, vars) { + return executeQuery(getWorkforceByIdRef(dcOrVars, vars)); +} + +export const getWorkforceByVendorAndStaffRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getWorkforceByVendorAndStaff', inputVars); +} +getWorkforceByVendorAndStaffRef.operationName = 'getWorkforceByVendorAndStaff'; + +export function getWorkforceByVendorAndStaff(dcOrVars, vars) { + return executeQuery(getWorkforceByVendorAndStaffRef(dcOrVars, vars)); +} + +export const listWorkforceByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listWorkforceByVendorId', inputVars); +} +listWorkforceByVendorIdRef.operationName = 'listWorkforceByVendorId'; + +export function listWorkforceByVendorId(dcOrVars, vars) { + return executeQuery(listWorkforceByVendorIdRef(dcOrVars, vars)); +} + +export const listWorkforceByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listWorkforceByStaffId', inputVars); +} +listWorkforceByStaffIdRef.operationName = 'listWorkforceByStaffId'; + +export function listWorkforceByStaffId(dcOrVars, vars) { + return executeQuery(listWorkforceByStaffIdRef(dcOrVars, vars)); +} + +export const getWorkforceByVendorAndNumberRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getWorkforceByVendorAndNumber', inputVars); +} +getWorkforceByVendorAndNumberRef.operationName = 'getWorkforceByVendorAndNumber'; + +export function getWorkforceByVendorAndNumber(dcOrVars, vars) { + return executeQuery(getWorkforceByVendorAndNumberRef(dcOrVars, vars)); +} + +export const createCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createCategory', inputVars); +} +createCategoryRef.operationName = 'createCategory'; + +export function createCategory(dcOrVars, vars) { + return executeMutation(createCategoryRef(dcOrVars, vars)); +} + +export const updateCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateCategory', inputVars); +} +updateCategoryRef.operationName = 'updateCategory'; + +export function updateCategory(dcOrVars, vars) { + return executeMutation(updateCategoryRef(dcOrVars, vars)); +} + +export const deleteCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteCategory', inputVars); +} +deleteCategoryRef.operationName = 'deleteCategory'; + +export function deleteCategory(dcOrVars, vars) { + return executeMutation(deleteCategoryRef(dcOrVars, vars)); +} + +export const listStaffAvailabilityStatsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffAvailabilityStats', inputVars); +} +listStaffAvailabilityStatsRef.operationName = 'listStaffAvailabilityStats'; + +export function listStaffAvailabilityStats(dcOrVars, vars) { + return executeQuery(listStaffAvailabilityStatsRef(dcOrVars, vars)); +} + +export const getStaffAvailabilityStatsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffAvailabilityStatsByStaffId', inputVars); +} +getStaffAvailabilityStatsByStaffIdRef.operationName = 'getStaffAvailabilityStatsByStaffId'; + +export function getStaffAvailabilityStatsByStaffId(dcOrVars, vars) { + return executeQuery(getStaffAvailabilityStatsByStaffIdRef(dcOrVars, vars)); +} + +export const filterStaffAvailabilityStatsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterStaffAvailabilityStats', inputVars); +} +filterStaffAvailabilityStatsRef.operationName = 'filterStaffAvailabilityStats'; + +export function filterStaffAvailabilityStats(dcOrVars, vars) { + return executeQuery(filterStaffAvailabilityStatsRef(dcOrVars, vars)); +} + +export const createTaxFormRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTaxForm', inputVars); +} +createTaxFormRef.operationName = 'createTaxForm'; + +export function createTaxForm(dcOrVars, vars) { + return executeMutation(createTaxFormRef(dcOrVars, vars)); +} + +export const updateTaxFormRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTaxForm', inputVars); +} +updateTaxFormRef.operationName = 'updateTaxForm'; + +export function updateTaxForm(dcOrVars, vars) { + return executeMutation(updateTaxFormRef(dcOrVars, vars)); +} + +export const deleteTaxFormRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTaxForm', inputVars); +} +deleteTaxFormRef.operationName = 'deleteTaxForm'; + +export function deleteTaxForm(dcOrVars, vars) { + return executeMutation(deleteTaxFormRef(dcOrVars, vars)); +} + +export const listTeamHudDepartmentsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTeamHudDepartments', inputVars); +} +listTeamHudDepartmentsRef.operationName = 'listTeamHudDepartments'; + +export function listTeamHudDepartments(dcOrVars, vars) { + return executeQuery(listTeamHudDepartmentsRef(dcOrVars, vars)); +} + +export const getTeamHudDepartmentByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamHudDepartmentById', inputVars); +} +getTeamHudDepartmentByIdRef.operationName = 'getTeamHudDepartmentById'; + +export function getTeamHudDepartmentById(dcOrVars, vars) { + return executeQuery(getTeamHudDepartmentByIdRef(dcOrVars, vars)); +} + +export const listTeamHudDepartmentsByTeamHubIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTeamHudDepartmentsByTeamHubId', inputVars); +} +listTeamHudDepartmentsByTeamHubIdRef.operationName = 'listTeamHudDepartmentsByTeamHubId'; + +export function listTeamHudDepartmentsByTeamHubId(dcOrVars, vars) { + return executeQuery(listTeamHudDepartmentsByTeamHubIdRef(dcOrVars, vars)); +} + +export const createVendorRateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createVendorRate', inputVars); +} +createVendorRateRef.operationName = 'createVendorRate'; + +export function createVendorRate(dcOrVars, vars) { + return executeMutation(createVendorRateRef(dcOrVars, vars)); +} + +export const updateVendorRateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateVendorRate', inputVars); +} +updateVendorRateRef.operationName = 'updateVendorRate'; + +export function updateVendorRate(dcOrVars, vars) { + return executeMutation(updateVendorRateRef(dcOrVars, vars)); +} + +export const deleteVendorRateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteVendorRate', inputVars); +} +deleteVendorRateRef.operationName = 'deleteVendorRate'; + +export function deleteVendorRate(dcOrVars, vars) { + return executeMutation(deleteVendorRateRef(dcOrVars, vars)); +} + +export const createActivityLogRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createActivityLog', inputVars); +} +createActivityLogRef.operationName = 'createActivityLog'; + +export function createActivityLog(dcOrVars, vars) { + return executeMutation(createActivityLogRef(dcOrVars, vars)); +} + +export const updateActivityLogRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateActivityLog', inputVars); +} +updateActivityLogRef.operationName = 'updateActivityLog'; + +export function updateActivityLog(dcOrVars, vars) { + return executeMutation(updateActivityLogRef(dcOrVars, vars)); +} + +export const markActivityLogAsReadRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'markActivityLogAsRead', inputVars); +} +markActivityLogAsReadRef.operationName = 'markActivityLogAsRead'; + +export function markActivityLogAsRead(dcOrVars, vars) { + return executeMutation(markActivityLogAsReadRef(dcOrVars, vars)); +} + +export const markActivityLogsAsReadRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'markActivityLogsAsRead', inputVars); +} +markActivityLogsAsReadRef.operationName = 'markActivityLogsAsRead'; + +export function markActivityLogsAsRead(dcOrVars, vars) { + return executeMutation(markActivityLogsAsReadRef(dcOrVars, vars)); +} + +export const deleteActivityLogRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteActivityLog', inputVars); +} +deleteActivityLogRef.operationName = 'deleteActivityLog'; + +export function deleteActivityLog(dcOrVars, vars) { + return executeMutation(deleteActivityLogRef(dcOrVars, vars)); +} + +export const listLevelsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listLevels'); +} +listLevelsRef.operationName = 'listLevels'; + +export function listLevels(dc) { + return executeQuery(listLevelsRef(dc)); +} + +export const getLevelByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getLevelById', inputVars); +} +getLevelByIdRef.operationName = 'getLevelById'; + +export function getLevelById(dcOrVars, vars) { + return executeQuery(getLevelByIdRef(dcOrVars, vars)); +} + +export const filterLevelsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterLevels', inputVars); +} +filterLevelsRef.operationName = 'filterLevels'; + +export function filterLevels(dcOrVars, vars) { + return executeQuery(filterLevelsRef(dcOrVars, vars)); +} + +export const createShiftRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createShift', inputVars); +} +createShiftRef.operationName = 'createShift'; + +export function createShift(dcOrVars, vars) { + return executeMutation(createShiftRef(dcOrVars, vars)); +} + +export const updateShiftRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateShift', inputVars); +} +updateShiftRef.operationName = 'updateShift'; + +export function updateShift(dcOrVars, vars) { + return executeMutation(updateShiftRef(dcOrVars, vars)); +} + +export const deleteShiftRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteShift', inputVars); +} +deleteShiftRef.operationName = 'deleteShift'; + +export function deleteShift(dcOrVars, vars) { + return executeMutation(deleteShiftRef(dcOrVars, vars)); +} + +export const createStaffRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'CreateStaff', inputVars); +} +createStaffRef.operationName = 'CreateStaff'; + +export function createStaff(dcOrVars, vars) { + return executeMutation(createStaffRef(dcOrVars, vars)); +} + +export const updateStaffRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'UpdateStaff', inputVars); +} +updateStaffRef.operationName = 'UpdateStaff'; + +export function updateStaff(dcOrVars, vars) { + return executeMutation(updateStaffRef(dcOrVars, vars)); +} + +export const deleteStaffRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'DeleteStaff', inputVars); +} +deleteStaffRef.operationName = 'DeleteStaff'; + +export function deleteStaff(dcOrVars, vars) { + return executeMutation(deleteStaffRef(dcOrVars, vars)); +} + +export const listTeamsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTeams'); +} +listTeamsRef.operationName = 'listTeams'; + +export function listTeams(dc) { + return executeQuery(listTeamsRef(dc)); +} + +export const getTeamByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamById', inputVars); +} +getTeamByIdRef.operationName = 'getTeamById'; + +export function getTeamById(dcOrVars, vars) { + return executeQuery(getTeamByIdRef(dcOrVars, vars)); +} + +export const getTeamsByOwnerIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamsByOwnerId', inputVars); +} +getTeamsByOwnerIdRef.operationName = 'getTeamsByOwnerId'; + +export function getTeamsByOwnerId(dcOrVars, vars) { + return executeQuery(getTeamsByOwnerIdRef(dcOrVars, vars)); +} + +export const listTeamMembersRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTeamMembers'); +} +listTeamMembersRef.operationName = 'listTeamMembers'; + +export function listTeamMembers(dc) { + return executeQuery(listTeamMembersRef(dc)); +} + +export const getTeamMemberByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamMemberById', inputVars); +} +getTeamMemberByIdRef.operationName = 'getTeamMemberById'; + +export function getTeamMemberById(dcOrVars, vars) { + return executeQuery(getTeamMemberByIdRef(dcOrVars, vars)); +} + +export const getTeamMembersByTeamIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamMembersByTeamId', inputVars); +} +getTeamMembersByTeamIdRef.operationName = 'getTeamMembersByTeamId'; + +export function getTeamMembersByTeamId(dcOrVars, vars) { + return executeQuery(getTeamMembersByTeamIdRef(dcOrVars, vars)); +} + +export const listVendorBenefitPlansRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listVendorBenefitPlans', inputVars); +} +listVendorBenefitPlansRef.operationName = 'listVendorBenefitPlans'; + +export function listVendorBenefitPlans(dcOrVars, vars) { + return executeQuery(listVendorBenefitPlansRef(dcOrVars, vars)); +} + +export const getVendorBenefitPlanByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getVendorBenefitPlanById', inputVars); +} +getVendorBenefitPlanByIdRef.operationName = 'getVendorBenefitPlanById'; + +export function getVendorBenefitPlanById(dcOrVars, vars) { + return executeQuery(getVendorBenefitPlanByIdRef(dcOrVars, vars)); +} + +export const listVendorBenefitPlansByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listVendorBenefitPlansByVendorId', inputVars); +} +listVendorBenefitPlansByVendorIdRef.operationName = 'listVendorBenefitPlansByVendorId'; + +export function listVendorBenefitPlansByVendorId(dcOrVars, vars) { + return executeQuery(listVendorBenefitPlansByVendorIdRef(dcOrVars, vars)); +} + +export const listActiveVendorBenefitPlansByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listActiveVendorBenefitPlansByVendorId', inputVars); +} +listActiveVendorBenefitPlansByVendorIdRef.operationName = 'listActiveVendorBenefitPlansByVendorId'; + +export function listActiveVendorBenefitPlansByVendorId(dcOrVars, vars) { + return executeQuery(listActiveVendorBenefitPlansByVendorIdRef(dcOrVars, vars)); +} + +export const filterVendorBenefitPlansRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterVendorBenefitPlans', inputVars); +} +filterVendorBenefitPlansRef.operationName = 'filterVendorBenefitPlans'; + +export function filterVendorBenefitPlans(dcOrVars, vars) { + return executeQuery(filterVendorBenefitPlansRef(dcOrVars, vars)); +} + diff --git a/apps/web/src/dataconnect-generated/esm/package.json b/apps/web/src/dataconnect-generated/esm/package.json new file mode 100644 index 00000000..7c34deb5 --- /dev/null +++ b/apps/web/src/dataconnect-generated/esm/package.json @@ -0,0 +1 @@ +{"type":"module"} \ No newline at end of file diff --git a/apps/web/src/dataconnect-generated/index.cjs.js b/apps/web/src/dataconnect-generated/index.cjs.js new file mode 100644 index 00000000..73e4d8fb --- /dev/null +++ b/apps/web/src/dataconnect-generated/index.cjs.js @@ -0,0 +1,4916 @@ +const { queryRef, executeQuery, mutationRef, executeMutation, validateArgs } = require('firebase/data-connect'); + +const AccountType = { + CHECKING: "CHECKING", + SAVINGS: "SAVINGS", +} +exports.AccountType = AccountType; + +const ActivityIconType = { + INVOICE: "INVOICE", + CHECK: "CHECK", + ALERT: "ALERT", + MESSAGE: "MESSAGE", + CALENDAR: "CALENDAR", +} +exports.ActivityIconType = ActivityIconType; + +const ActivityType = { + ORDER_CREATED: "ORDER_CREATED", + SHIFT_UPDATE: "SHIFT_UPDATE", + COMPLIANCE_ALERT: "COMPLIANCE_ALERT", + MESSAGE_RECEIVED: "MESSAGE_RECEIVED", + SYSTEM_UPDATE: "SYSTEM_UPDATE", +} +exports.ActivityType = ActivityType; + +const ApplicationOrigin = { + STAFF: "STAFF", + EMPLOYER: "EMPLOYER", +} +exports.ApplicationOrigin = ApplicationOrigin; + +const ApplicationStatus = { + PENDING: "PENDING", + REJECTED: "REJECTED", + CONFIRMED: "CONFIRMED", + CHECKED_IN: "CHECKED_IN", + CHECKED_OUT: "CHECKED_OUT", + LATE: "LATE", + NO_SHOW: "NO_SHOW", + COMPLETED: "COMPLETED", +} +exports.ApplicationStatus = ApplicationStatus; + +const ApprovalStatus = { + APPROVED: "APPROVED", +} +exports.ApprovalStatus = ApprovalStatus; + +const AssignmentStatus = { + PENDING: "PENDING", + CONFIRMED: "CONFIRMED", + OPEN: "OPEN", + COMPLETED: "COMPLETED", + CANCELED: "CANCELED", + ACTIVE: "ACTIVE", +} +exports.AssignmentStatus = AssignmentStatus; + +const AvailabilitySlot = { + MORNING: "MORNING", + AFTERNOON: "AFTERNOON", + EVENING: "EVENING", +} +exports.AvailabilitySlot = AvailabilitySlot; + +const AvailabilityStatus = { + CONFIRMED_AVAILABLE: "CONFIRMED_AVAILABLE", + UNKNOWN: "UNKNOWN", + BLOCKED: "BLOCKED", +} +exports.AvailabilityStatus = AvailabilityStatus; + +const BackgroundCheckStatus = { + PENDING: "PENDING", + CLEARED: "CLEARED", + FAILED: "FAILED", + EXPIRED: "EXPIRED", + NOT_REQUIRED: "NOT_REQUIRED", +} +exports.BackgroundCheckStatus = BackgroundCheckStatus; + +const BreakDuration = { + MIN_15: "MIN_15", + MIN_30: "MIN_30", + NO_BREAK: "NO_BREAK", +} +exports.BreakDuration = BreakDuration; + +const BusinessArea = { + BAY_AREA: "BAY_AREA", + SOUTHERN_CALIFORNIA: "SOUTHERN_CALIFORNIA", + NORTHERN_CALIFORNIA: "NORTHERN_CALIFORNIA", + CENTRAL_VALLEY: "CENTRAL_VALLEY", + OTHER: "OTHER", +} +exports.BusinessArea = BusinessArea; + +const BusinessRateGroup = { + STANDARD: "STANDARD", + PREMIUM: "PREMIUM", + ENTERPRISE: "ENTERPRISE", + CUSTOM: "CUSTOM", +} +exports.BusinessRateGroup = BusinessRateGroup; + +const BusinessSector = { + BON_APPETIT: "BON_APPETIT", + EUREST: "EUREST", + ARAMARK: "ARAMARK", + EPICUREAN_GROUP: "EPICUREAN_GROUP", + CHARTWELLS: "CHARTWELLS", + OTHER: "OTHER", +} +exports.BusinessSector = BusinessSector; + +const BusinessStatus = { + ACTIVE: "ACTIVE", + INACTIVE: "INACTIVE", + PENDING: "PENDING", +} +exports.BusinessStatus = BusinessStatus; + +const CategoryType = { + KITCHEN_AND_CULINARY: "KITCHEN_AND_CULINARY", + CONCESSIONS: "CONCESSIONS", + FACILITIES: "FACILITIES", + BARTENDING: "BARTENDING", + SECURITY: "SECURITY", + EVENT_STAFF: "EVENT_STAFF", + MANAGEMENT: "MANAGEMENT", + TECHNICAL: "TECHNICAL", + OTHER: "OTHER", +} +exports.CategoryType = CategoryType; + +const CertificateStatus = { + CURRENT: "CURRENT", + EXPIRING_SOON: "EXPIRING_SOON", + COMPLETED: "COMPLETED", + PENDING: "PENDING", + EXPIRED: "EXPIRED", + EXPIRING: "EXPIRING", + NOT_STARTED: "NOT_STARTED", +} +exports.CertificateStatus = CertificateStatus; + +const CitizenshipStatus = { + CITIZEN: "CITIZEN", + NONCITIZEN: "NONCITIZEN", + PERMANENT_RESIDENT: "PERMANENT_RESIDENT", + ALIEN: "ALIEN", +} +exports.CitizenshipStatus = CitizenshipStatus; + +const ComplianceType = { + BACKGROUND_CHECK: "BACKGROUND_CHECK", + FOOD_HANDLER: "FOOD_HANDLER", + RBS: "RBS", + LEGAL: "LEGAL", + OPERATIONAL: "OPERATIONAL", + SAFETY: "SAFETY", + TRAINING: "TRAINING", + LICENSE: "LICENSE", + OTHER: "OTHER", +} +exports.ComplianceType = ComplianceType; + +const ConversationStatus = { + ACTIVE: "ACTIVE", +} +exports.ConversationStatus = ConversationStatus; + +const ConversationType = { + CLIENT_VENDOR: "CLIENT_VENDOR", + GROUP_STAFF: "GROUP_STAFF", + STAFF_CLIENT: "STAFF_CLIENT", + STAFF_ADMIN: "STAFF_ADMIN", + VENDOR_ADMIN: "VENDOR_ADMIN", + CLIENT_ADMIN: "CLIENT_ADMIN", + GROUP_ORDER_STAFF: "GROUP_ORDER_STAFF", +} +exports.ConversationType = ConversationType; + +const DayOfWeek = { + SUNDAY: "SUNDAY", + MONDAY: "MONDAY", + TUESDAY: "TUESDAY", + WEDNESDAY: "WEDNESDAY", + THURSDAY: "THURSDAY", + FRIDAY: "FRIDAY", + SATURDAY: "SATURDAY", +} +exports.DayOfWeek = DayOfWeek; + +const DepartmentType = { + OPERATIONS: "OPERATIONS", + SALES: "SALES", + HR: "HR", + FINANCE: "FINANCE", + IT: "IT", + MARKETING: "MARKETING", + CUSTOMER_SERVICE: "CUSTOMER_SERVICE", + LOGISTICS: "LOGISTICS", +} +exports.DepartmentType = DepartmentType; + +const DocumentStatus = { + UPLOADED: "UPLOADED", + PENDING: "PENDING", + EXPIRING: "EXPIRING", + MISSING: "MISSING", + VERIFIED: "VERIFIED", +} +exports.DocumentStatus = DocumentStatus; + +const DocumentType = { + W4_FORM: "W4_FORM", + I9_FORM: "I9_FORM", + STATE_TAX_FORM: "STATE_TAX_FORM", + DIRECT_DEPOSIT: "DIRECT_DEPOSIT", + ID_COPY: "ID_COPY", + SSN_CARD: "SSN_CARD", + WORK_PERMIT: "WORK_PERMIT", +} +exports.DocumentType = DocumentType; + +const EmploymentType = { + FULL_TIME: "FULL_TIME", + PART_TIME: "PART_TIME", + ON_CALL: "ON_CALL", + WEEKENDS: "WEEKENDS", + SPECIFIC_DAYS: "SPECIFIC_DAYS", + SEASONAL: "SEASONAL", + MEDICAL_LEAVE: "MEDICAL_LEAVE", +} +exports.EmploymentType = EmploymentType; + +const EnglishProficiency = { + FLUENT: "FLUENT", + INTERMEDIATE: "INTERMEDIATE", + BASIC: "BASIC", + NONE: "NONE", +} +exports.EnglishProficiency = EnglishProficiency; + +const InovicePaymentTerms = { + NET_30: "NET_30", + NET_45: "NET_45", + NET_60: "NET_60", +} +exports.InovicePaymentTerms = InovicePaymentTerms; + +const InovicePaymentTermsTemp = { + NET_30: "NET_30", + NET_45: "NET_45", + NET_60: "NET_60", +} +exports.InovicePaymentTermsTemp = InovicePaymentTermsTemp; + +const InvoiceStatus = { + PAID: "PAID", + PENDING: "PENDING", + OVERDUE: "OVERDUE", + PENDING_REVIEW: "PENDING_REVIEW", + APPROVED: "APPROVED", + DISPUTED: "DISPUTED", + DRAFT: "DRAFT", +} +exports.InvoiceStatus = InvoiceStatus; + +const MaritalStatus = { + SINGLE: "SINGLE", + MARRIED: "MARRIED", + HEAD: "HEAD", +} +exports.MaritalStatus = MaritalStatus; + +const OrderDuration = { + WEEKLY: "WEEKLY", + MONTHLY: "MONTHLY", +} +exports.OrderDuration = OrderDuration; + +const OrderStatus = { + DRAFT: "DRAFT", + POSTED: "POSTED", + FILLED: "FILLED", + COMPLETED: "COMPLETED", + CANCELLED: "CANCELLED", + PENDING: "PENDING", + FULLY_STAFFED: "FULLY_STAFFED", + PARTIAL_STAFFED: "PARTIAL_STAFFED", +} +exports.OrderStatus = OrderStatus; + +const OrderType = { + ONE_TIME: "ONE_TIME", + PERMANENT: "PERMANENT", + RECURRING: "RECURRING", + RAPID: "RAPID", +} +exports.OrderType = OrderType; + +const RecentPaymentStatus = { + PAID: "PAID", + PENDING: "PENDING", + FAILED: "FAILED", +} +exports.RecentPaymentStatus = RecentPaymentStatus; + +const RelationshipType = { + FAMILY: "FAMILY", + SPOUSE: "SPOUSE", + FRIEND: "FRIEND", + OTHER: "OTHER", +} +exports.RelationshipType = RelationshipType; + +const RoleCategoryType = { + KITCHEN_AND_CULINARY: "KITCHEN_AND_CULINARY", + CONCESSIONS: "CONCESSIONS", + FACILITIES: "FACILITIES", + BARTENDING: "BARTENDING", + SECURITY: "SECURITY", + EVENT_STAFF: "EVENT_STAFF", + MANAGEMENT: "MANAGEMENT", + TECHNICAL: "TECHNICAL", + OTHER: "OTHER", +} +exports.RoleCategoryType = RoleCategoryType; + +const RoleType = { + SKILLED: "SKILLED", + BEGINNER: "BEGINNER", + CROSS_TRAINED: "CROSS_TRAINED", +} +exports.RoleType = RoleType; + +const ShiftStatus = { + DRAFT: "DRAFT", + FILLED: "FILLED", + PENDING: "PENDING", + ASSIGNED: "ASSIGNED", + CONFIRMED: "CONFIRMED", + OPEN: "OPEN", + IN_PROGRESS: "IN_PROGRESS", + COMPLETED: "COMPLETED", + CANCELED: "CANCELED", +} +exports.ShiftStatus = ShiftStatus; + +const TaskPriority = { + LOW: "LOW", + NORMAL: "NORMAL", + HIGH: "HIGH", +} +exports.TaskPriority = TaskPriority; + +const TaskStatus = { + PENDING: "PENDING", + IN_PROGRESS: "IN_PROGRESS", + COMPLETED: "COMPLETED", +} +exports.TaskStatus = TaskStatus; + +const TaxFormStatus = { + NOT_STARTED: "NOT_STARTED", + DRAFT: "DRAFT", + SUBMITTED: "SUBMITTED", + APPROVED: "APPROVED", + REJECTED: "REJECTED", +} +exports.TaxFormStatus = TaxFormStatus; + +const TaxFormType = { + I9: "I9", + W4: "W4", +} +exports.TaxFormType = TaxFormType; + +const TeamMemberInviteStatus = { + PENDING: "PENDING", + ACCEPTED: "ACCEPTED", + CANCELLED: "CANCELLED", +} +exports.TeamMemberInviteStatus = TeamMemberInviteStatus; + +const TeamMemberRole = { + OWNER: "OWNER", + ADMIN: "ADMIN", + MEMBER: "MEMBER", + MANAGER: "MANAGER", + VIEWER: "VIEWER", +} +exports.TeamMemberRole = TeamMemberRole; + +const UserBaseRole = { + ADMIN: "ADMIN", + USER: "USER", +} +exports.UserBaseRole = UserBaseRole; + +const ValidationStatus = { + APPROVED: "APPROVED", + PENDING_EXPERT_REVIEW: "PENDING_EXPERT_REVIEW", + REJECTED: "REJECTED", + AI_VERIFIED: "AI_VERIFIED", + AI_FLAGGED: "AI_FLAGGED", + MANUAL_REVIEW_NEEDED: "MANUAL_REVIEW_NEEDED", +} +exports.ValidationStatus = ValidationStatus; + +const VendorTier = { + PREFERRED: "PREFERRED", + APPROVED: "APPROVED", + STANDARD: "STANDARD", +} +exports.VendorTier = VendorTier; + +const WorkforceEmploymentType = { + W2: "W2", + W1099: "W1099", + TEMPORARY: "TEMPORARY", + CONTRACT: "CONTRACT", +} +exports.WorkforceEmploymentType = WorkforceEmploymentType; + +const WorkforceStatus = { + ACTIVE: "ACTIVE", + INACTIVE: "INACTIVE", +} +exports.WorkforceStatus = WorkforceStatus; + +const connectorConfig = { + connector: 'example', + service: 'krow-workforce-db', + location: 'us-central1' +}; +exports.connectorConfig = connectorConfig; + +const createBenefitsDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createBenefitsData', inputVars); +} +createBenefitsDataRef.operationName = 'createBenefitsData'; +exports.createBenefitsDataRef = createBenefitsDataRef; + +exports.createBenefitsData = function createBenefitsData(dcOrVars, vars) { + return executeMutation(createBenefitsDataRef(dcOrVars, vars)); +}; + +const updateBenefitsDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateBenefitsData', inputVars); +} +updateBenefitsDataRef.operationName = 'updateBenefitsData'; +exports.updateBenefitsDataRef = updateBenefitsDataRef; + +exports.updateBenefitsData = function updateBenefitsData(dcOrVars, vars) { + return executeMutation(updateBenefitsDataRef(dcOrVars, vars)); +}; + +const deleteBenefitsDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteBenefitsData', inputVars); +} +deleteBenefitsDataRef.operationName = 'deleteBenefitsData'; +exports.deleteBenefitsDataRef = deleteBenefitsDataRef; + +exports.deleteBenefitsData = function deleteBenefitsData(dcOrVars, vars) { + return executeMutation(deleteBenefitsDataRef(dcOrVars, vars)); +}; + +const listShiftsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShifts', inputVars); +} +listShiftsRef.operationName = 'listShifts'; +exports.listShiftsRef = listShiftsRef; + +exports.listShifts = function listShifts(dcOrVars, vars) { + return executeQuery(listShiftsRef(dcOrVars, vars)); +}; + +const getShiftByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getShiftById', inputVars); +} +getShiftByIdRef.operationName = 'getShiftById'; +exports.getShiftByIdRef = getShiftByIdRef; + +exports.getShiftById = function getShiftById(dcOrVars, vars) { + return executeQuery(getShiftByIdRef(dcOrVars, vars)); +}; + +const filterShiftsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterShifts', inputVars); +} +filterShiftsRef.operationName = 'filterShifts'; +exports.filterShiftsRef = filterShiftsRef; + +exports.filterShifts = function filterShifts(dcOrVars, vars) { + return executeQuery(filterShiftsRef(dcOrVars, vars)); +}; + +const getShiftsByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getShiftsByBusinessId', inputVars); +} +getShiftsByBusinessIdRef.operationName = 'getShiftsByBusinessId'; +exports.getShiftsByBusinessIdRef = getShiftsByBusinessIdRef; + +exports.getShiftsByBusinessId = function getShiftsByBusinessId(dcOrVars, vars) { + return executeQuery(getShiftsByBusinessIdRef(dcOrVars, vars)); +}; + +const getShiftsByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getShiftsByVendorId', inputVars); +} +getShiftsByVendorIdRef.operationName = 'getShiftsByVendorId'; +exports.getShiftsByVendorIdRef = getShiftsByVendorIdRef; + +exports.getShiftsByVendorId = function getShiftsByVendorId(dcOrVars, vars) { + return executeQuery(getShiftsByVendorIdRef(dcOrVars, vars)); +}; + +const createStaffDocumentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createStaffDocument', inputVars); +} +createStaffDocumentRef.operationName = 'createStaffDocument'; +exports.createStaffDocumentRef = createStaffDocumentRef; + +exports.createStaffDocument = function createStaffDocument(dcOrVars, vars) { + return executeMutation(createStaffDocumentRef(dcOrVars, vars)); +}; + +const updateStaffDocumentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateStaffDocument', inputVars); +} +updateStaffDocumentRef.operationName = 'updateStaffDocument'; +exports.updateStaffDocumentRef = updateStaffDocumentRef; + +exports.updateStaffDocument = function updateStaffDocument(dcOrVars, vars) { + return executeMutation(updateStaffDocumentRef(dcOrVars, vars)); +}; + +const deleteStaffDocumentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteStaffDocument', inputVars); +} +deleteStaffDocumentRef.operationName = 'deleteStaffDocument'; +exports.deleteStaffDocumentRef = deleteStaffDocumentRef; + +exports.deleteStaffDocument = function deleteStaffDocument(dcOrVars, vars) { + return executeMutation(deleteStaffDocumentRef(dcOrVars, vars)); +}; + +const listEmergencyContactsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listEmergencyContacts'); +} +listEmergencyContactsRef.operationName = 'listEmergencyContacts'; +exports.listEmergencyContactsRef = listEmergencyContactsRef; + +exports.listEmergencyContacts = function listEmergencyContacts(dc) { + return executeQuery(listEmergencyContactsRef(dc)); +}; + +const getEmergencyContactByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getEmergencyContactById', inputVars); +} +getEmergencyContactByIdRef.operationName = 'getEmergencyContactById'; +exports.getEmergencyContactByIdRef = getEmergencyContactByIdRef; + +exports.getEmergencyContactById = function getEmergencyContactById(dcOrVars, vars) { + return executeQuery(getEmergencyContactByIdRef(dcOrVars, vars)); +}; + +const getEmergencyContactsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getEmergencyContactsByStaffId', inputVars); +} +getEmergencyContactsByStaffIdRef.operationName = 'getEmergencyContactsByStaffId'; +exports.getEmergencyContactsByStaffIdRef = getEmergencyContactsByStaffIdRef; + +exports.getEmergencyContactsByStaffId = function getEmergencyContactsByStaffId(dcOrVars, vars) { + return executeQuery(getEmergencyContactsByStaffIdRef(dcOrVars, vars)); +}; + +const getMyTasksRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getMyTasks', inputVars); +} +getMyTasksRef.operationName = 'getMyTasks'; +exports.getMyTasksRef = getMyTasksRef; + +exports.getMyTasks = function getMyTasks(dcOrVars, vars) { + return executeQuery(getMyTasksRef(dcOrVars, vars)); +}; + +const getMemberTaskByIdKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getMemberTaskByIdKey', inputVars); +} +getMemberTaskByIdKeyRef.operationName = 'getMemberTaskByIdKey'; +exports.getMemberTaskByIdKeyRef = getMemberTaskByIdKeyRef; + +exports.getMemberTaskByIdKey = function getMemberTaskByIdKey(dcOrVars, vars) { + return executeQuery(getMemberTaskByIdKeyRef(dcOrVars, vars)); +}; + +const getMemberTasksByTaskIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getMemberTasksByTaskId', inputVars); +} +getMemberTasksByTaskIdRef.operationName = 'getMemberTasksByTaskId'; +exports.getMemberTasksByTaskIdRef = getMemberTasksByTaskIdRef; + +exports.getMemberTasksByTaskId = function getMemberTasksByTaskId(dcOrVars, vars) { + return executeQuery(getMemberTasksByTaskIdRef(dcOrVars, vars)); +}; + +const createTeamHudDepartmentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTeamHudDepartment', inputVars); +} +createTeamHudDepartmentRef.operationName = 'createTeamHudDepartment'; +exports.createTeamHudDepartmentRef = createTeamHudDepartmentRef; + +exports.createTeamHudDepartment = function createTeamHudDepartment(dcOrVars, vars) { + return executeMutation(createTeamHudDepartmentRef(dcOrVars, vars)); +}; + +const updateTeamHudDepartmentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTeamHudDepartment', inputVars); +} +updateTeamHudDepartmentRef.operationName = 'updateTeamHudDepartment'; +exports.updateTeamHudDepartmentRef = updateTeamHudDepartmentRef; + +exports.updateTeamHudDepartment = function updateTeamHudDepartment(dcOrVars, vars) { + return executeMutation(updateTeamHudDepartmentRef(dcOrVars, vars)); +}; + +const deleteTeamHudDepartmentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTeamHudDepartment', inputVars); +} +deleteTeamHudDepartmentRef.operationName = 'deleteTeamHudDepartment'; +exports.deleteTeamHudDepartmentRef = deleteTeamHudDepartmentRef; + +exports.deleteTeamHudDepartment = function deleteTeamHudDepartment(dcOrVars, vars) { + return executeMutation(deleteTeamHudDepartmentRef(dcOrVars, vars)); +}; + +const listCertificatesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listCertificates'); +} +listCertificatesRef.operationName = 'listCertificates'; +exports.listCertificatesRef = listCertificatesRef; + +exports.listCertificates = function listCertificates(dc) { + return executeQuery(listCertificatesRef(dc)); +}; + +const getCertificateByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getCertificateById', inputVars); +} +getCertificateByIdRef.operationName = 'getCertificateById'; +exports.getCertificateByIdRef = getCertificateByIdRef; + +exports.getCertificateById = function getCertificateById(dcOrVars, vars) { + return executeQuery(getCertificateByIdRef(dcOrVars, vars)); +}; + +const listCertificatesByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listCertificatesByStaffId', inputVars); +} +listCertificatesByStaffIdRef.operationName = 'listCertificatesByStaffId'; +exports.listCertificatesByStaffIdRef = listCertificatesByStaffIdRef; + +exports.listCertificatesByStaffId = function listCertificatesByStaffId(dcOrVars, vars) { + return executeQuery(listCertificatesByStaffIdRef(dcOrVars, vars)); +}; + +const createMemberTaskRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createMemberTask', inputVars); +} +createMemberTaskRef.operationName = 'createMemberTask'; +exports.createMemberTaskRef = createMemberTaskRef; + +exports.createMemberTask = function createMemberTask(dcOrVars, vars) { + return executeMutation(createMemberTaskRef(dcOrVars, vars)); +}; + +const deleteMemberTaskRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteMemberTask', inputVars); +} +deleteMemberTaskRef.operationName = 'deleteMemberTask'; +exports.deleteMemberTaskRef = deleteMemberTaskRef; + +exports.deleteMemberTask = function deleteMemberTask(dcOrVars, vars) { + return executeMutation(deleteMemberTaskRef(dcOrVars, vars)); +}; + +const createTeamRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTeam', inputVars); +} +createTeamRef.operationName = 'createTeam'; +exports.createTeamRef = createTeamRef; + +exports.createTeam = function createTeam(dcOrVars, vars) { + return executeMutation(createTeamRef(dcOrVars, vars)); +}; + +const updateTeamRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTeam', inputVars); +} +updateTeamRef.operationName = 'updateTeam'; +exports.updateTeamRef = updateTeamRef; + +exports.updateTeam = function updateTeam(dcOrVars, vars) { + return executeMutation(updateTeamRef(dcOrVars, vars)); +}; + +const deleteTeamRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTeam', inputVars); +} +deleteTeamRef.operationName = 'deleteTeam'; +exports.deleteTeamRef = deleteTeamRef; + +exports.deleteTeam = function deleteTeam(dcOrVars, vars) { + return executeMutation(deleteTeamRef(dcOrVars, vars)); +}; + +const createUserConversationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createUserConversation', inputVars); +} +createUserConversationRef.operationName = 'createUserConversation'; +exports.createUserConversationRef = createUserConversationRef; + +exports.createUserConversation = function createUserConversation(dcOrVars, vars) { + return executeMutation(createUserConversationRef(dcOrVars, vars)); +}; + +const updateUserConversationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateUserConversation', inputVars); +} +updateUserConversationRef.operationName = 'updateUserConversation'; +exports.updateUserConversationRef = updateUserConversationRef; + +exports.updateUserConversation = function updateUserConversation(dcOrVars, vars) { + return executeMutation(updateUserConversationRef(dcOrVars, vars)); +}; + +const markConversationAsReadRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'markConversationAsRead', inputVars); +} +markConversationAsReadRef.operationName = 'markConversationAsRead'; +exports.markConversationAsReadRef = markConversationAsReadRef; + +exports.markConversationAsRead = function markConversationAsRead(dcOrVars, vars) { + return executeMutation(markConversationAsReadRef(dcOrVars, vars)); +}; + +const incrementUnreadForUserRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'incrementUnreadForUser', inputVars); +} +incrementUnreadForUserRef.operationName = 'incrementUnreadForUser'; +exports.incrementUnreadForUserRef = incrementUnreadForUserRef; + +exports.incrementUnreadForUser = function incrementUnreadForUser(dcOrVars, vars) { + return executeMutation(incrementUnreadForUserRef(dcOrVars, vars)); +}; + +const deleteUserConversationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteUserConversation', inputVars); +} +deleteUserConversationRef.operationName = 'deleteUserConversation'; +exports.deleteUserConversationRef = deleteUserConversationRef; + +exports.deleteUserConversation = function deleteUserConversation(dcOrVars, vars) { + return executeMutation(deleteUserConversationRef(dcOrVars, vars)); +}; + +const listAssignmentsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAssignments', inputVars); +} +listAssignmentsRef.operationName = 'listAssignments'; +exports.listAssignmentsRef = listAssignmentsRef; + +exports.listAssignments = function listAssignments(dcOrVars, vars) { + return executeQuery(listAssignmentsRef(dcOrVars, vars)); +}; + +const getAssignmentByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getAssignmentById', inputVars); +} +getAssignmentByIdRef.operationName = 'getAssignmentById'; +exports.getAssignmentByIdRef = getAssignmentByIdRef; + +exports.getAssignmentById = function getAssignmentById(dcOrVars, vars) { + return executeQuery(getAssignmentByIdRef(dcOrVars, vars)); +}; + +const listAssignmentsByWorkforceIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAssignmentsByWorkforceId', inputVars); +} +listAssignmentsByWorkforceIdRef.operationName = 'listAssignmentsByWorkforceId'; +exports.listAssignmentsByWorkforceIdRef = listAssignmentsByWorkforceIdRef; + +exports.listAssignmentsByWorkforceId = function listAssignmentsByWorkforceId(dcOrVars, vars) { + return executeQuery(listAssignmentsByWorkforceIdRef(dcOrVars, vars)); +}; + +const listAssignmentsByWorkforceIdsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAssignmentsByWorkforceIds', inputVars); +} +listAssignmentsByWorkforceIdsRef.operationName = 'listAssignmentsByWorkforceIds'; +exports.listAssignmentsByWorkforceIdsRef = listAssignmentsByWorkforceIdsRef; + +exports.listAssignmentsByWorkforceIds = function listAssignmentsByWorkforceIds(dcOrVars, vars) { + return executeQuery(listAssignmentsByWorkforceIdsRef(dcOrVars, vars)); +}; + +const listAssignmentsByShiftRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAssignmentsByShiftRole', inputVars); +} +listAssignmentsByShiftRoleRef.operationName = 'listAssignmentsByShiftRole'; +exports.listAssignmentsByShiftRoleRef = listAssignmentsByShiftRoleRef; + +exports.listAssignmentsByShiftRole = function listAssignmentsByShiftRole(dcOrVars, vars) { + return executeQuery(listAssignmentsByShiftRoleRef(dcOrVars, vars)); +}; + +const filterAssignmentsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterAssignments', inputVars); +} +filterAssignmentsRef.operationName = 'filterAssignments'; +exports.filterAssignmentsRef = filterAssignmentsRef; + +exports.filterAssignments = function filterAssignments(dcOrVars, vars) { + return executeQuery(filterAssignmentsRef(dcOrVars, vars)); +}; + +const createAttireOptionRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createAttireOption', inputVars); +} +createAttireOptionRef.operationName = 'createAttireOption'; +exports.createAttireOptionRef = createAttireOptionRef; + +exports.createAttireOption = function createAttireOption(dcOrVars, vars) { + return executeMutation(createAttireOptionRef(dcOrVars, vars)); +}; + +const updateAttireOptionRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateAttireOption', inputVars); +} +updateAttireOptionRef.operationName = 'updateAttireOption'; +exports.updateAttireOptionRef = updateAttireOptionRef; + +exports.updateAttireOption = function updateAttireOption(dcOrVars, vars) { + return executeMutation(updateAttireOptionRef(dcOrVars, vars)); +}; + +const deleteAttireOptionRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteAttireOption', inputVars); +} +deleteAttireOptionRef.operationName = 'deleteAttireOption'; +exports.deleteAttireOptionRef = deleteAttireOptionRef; + +exports.deleteAttireOption = function deleteAttireOption(dcOrVars, vars) { + return executeMutation(deleteAttireOptionRef(dcOrVars, vars)); +}; + +const createCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createCourse', inputVars); +} +createCourseRef.operationName = 'createCourse'; +exports.createCourseRef = createCourseRef; + +exports.createCourse = function createCourse(dcOrVars, vars) { + return executeMutation(createCourseRef(dcOrVars, vars)); +}; + +const updateCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateCourse', inputVars); +} +updateCourseRef.operationName = 'updateCourse'; +exports.updateCourseRef = updateCourseRef; + +exports.updateCourse = function updateCourse(dcOrVars, vars) { + return executeMutation(updateCourseRef(dcOrVars, vars)); +}; + +const deleteCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteCourse', inputVars); +} +deleteCourseRef.operationName = 'deleteCourse'; +exports.deleteCourseRef = deleteCourseRef; + +exports.deleteCourse = function deleteCourse(dcOrVars, vars) { + return executeMutation(deleteCourseRef(dcOrVars, vars)); +}; + +const createEmergencyContactRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createEmergencyContact', inputVars); +} +createEmergencyContactRef.operationName = 'createEmergencyContact'; +exports.createEmergencyContactRef = createEmergencyContactRef; + +exports.createEmergencyContact = function createEmergencyContact(dcOrVars, vars) { + return executeMutation(createEmergencyContactRef(dcOrVars, vars)); +}; + +const updateEmergencyContactRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateEmergencyContact', inputVars); +} +updateEmergencyContactRef.operationName = 'updateEmergencyContact'; +exports.updateEmergencyContactRef = updateEmergencyContactRef; + +exports.updateEmergencyContact = function updateEmergencyContact(dcOrVars, vars) { + return executeMutation(updateEmergencyContactRef(dcOrVars, vars)); +}; + +const deleteEmergencyContactRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteEmergencyContact', inputVars); +} +deleteEmergencyContactRef.operationName = 'deleteEmergencyContact'; +exports.deleteEmergencyContactRef = deleteEmergencyContactRef; + +exports.deleteEmergencyContact = function deleteEmergencyContact(dcOrVars, vars) { + return executeMutation(deleteEmergencyContactRef(dcOrVars, vars)); +}; + +const listInvoiceTemplatesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoiceTemplates', inputVars); +} +listInvoiceTemplatesRef.operationName = 'listInvoiceTemplates'; +exports.listInvoiceTemplatesRef = listInvoiceTemplatesRef; + +exports.listInvoiceTemplates = function listInvoiceTemplates(dcOrVars, vars) { + return executeQuery(listInvoiceTemplatesRef(dcOrVars, vars)); +}; + +const getInvoiceTemplateByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getInvoiceTemplateById', inputVars); +} +getInvoiceTemplateByIdRef.operationName = 'getInvoiceTemplateById'; +exports.getInvoiceTemplateByIdRef = getInvoiceTemplateByIdRef; + +exports.getInvoiceTemplateById = function getInvoiceTemplateById(dcOrVars, vars) { + return executeQuery(getInvoiceTemplateByIdRef(dcOrVars, vars)); +}; + +const listInvoiceTemplatesByOwnerIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoiceTemplatesByOwnerId', inputVars); +} +listInvoiceTemplatesByOwnerIdRef.operationName = 'listInvoiceTemplatesByOwnerId'; +exports.listInvoiceTemplatesByOwnerIdRef = listInvoiceTemplatesByOwnerIdRef; + +exports.listInvoiceTemplatesByOwnerId = function listInvoiceTemplatesByOwnerId(dcOrVars, vars) { + return executeQuery(listInvoiceTemplatesByOwnerIdRef(dcOrVars, vars)); +}; + +const listInvoiceTemplatesByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoiceTemplatesByVendorId', inputVars); +} +listInvoiceTemplatesByVendorIdRef.operationName = 'listInvoiceTemplatesByVendorId'; +exports.listInvoiceTemplatesByVendorIdRef = listInvoiceTemplatesByVendorIdRef; + +exports.listInvoiceTemplatesByVendorId = function listInvoiceTemplatesByVendorId(dcOrVars, vars) { + return executeQuery(listInvoiceTemplatesByVendorIdRef(dcOrVars, vars)); +}; + +const listInvoiceTemplatesByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoiceTemplatesByBusinessId', inputVars); +} +listInvoiceTemplatesByBusinessIdRef.operationName = 'listInvoiceTemplatesByBusinessId'; +exports.listInvoiceTemplatesByBusinessIdRef = listInvoiceTemplatesByBusinessIdRef; + +exports.listInvoiceTemplatesByBusinessId = function listInvoiceTemplatesByBusinessId(dcOrVars, vars) { + return executeQuery(listInvoiceTemplatesByBusinessIdRef(dcOrVars, vars)); +}; + +const listInvoiceTemplatesByOrderIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoiceTemplatesByOrderId', inputVars); +} +listInvoiceTemplatesByOrderIdRef.operationName = 'listInvoiceTemplatesByOrderId'; +exports.listInvoiceTemplatesByOrderIdRef = listInvoiceTemplatesByOrderIdRef; + +exports.listInvoiceTemplatesByOrderId = function listInvoiceTemplatesByOrderId(dcOrVars, vars) { + return executeQuery(listInvoiceTemplatesByOrderIdRef(dcOrVars, vars)); +}; + +const searchInvoiceTemplatesByOwnerAndNameRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'searchInvoiceTemplatesByOwnerAndName', inputVars); +} +searchInvoiceTemplatesByOwnerAndNameRef.operationName = 'searchInvoiceTemplatesByOwnerAndName'; +exports.searchInvoiceTemplatesByOwnerAndNameRef = searchInvoiceTemplatesByOwnerAndNameRef; + +exports.searchInvoiceTemplatesByOwnerAndName = function searchInvoiceTemplatesByOwnerAndName(dcOrVars, vars) { + return executeQuery(searchInvoiceTemplatesByOwnerAndNameRef(dcOrVars, vars)); +}; + +const createStaffCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createStaffCourse', inputVars); +} +createStaffCourseRef.operationName = 'createStaffCourse'; +exports.createStaffCourseRef = createStaffCourseRef; + +exports.createStaffCourse = function createStaffCourse(dcOrVars, vars) { + return executeMutation(createStaffCourseRef(dcOrVars, vars)); +}; + +const updateStaffCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateStaffCourse', inputVars); +} +updateStaffCourseRef.operationName = 'updateStaffCourse'; +exports.updateStaffCourseRef = updateStaffCourseRef; + +exports.updateStaffCourse = function updateStaffCourse(dcOrVars, vars) { + return executeMutation(updateStaffCourseRef(dcOrVars, vars)); +}; + +const deleteStaffCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteStaffCourse', inputVars); +} +deleteStaffCourseRef.operationName = 'deleteStaffCourse'; +exports.deleteStaffCourseRef = deleteStaffCourseRef; + +exports.deleteStaffCourse = function deleteStaffCourse(dcOrVars, vars) { + return executeMutation(deleteStaffCourseRef(dcOrVars, vars)); +}; + +const getStaffDocumentByKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffDocumentByKey', inputVars); +} +getStaffDocumentByKeyRef.operationName = 'getStaffDocumentByKey'; +exports.getStaffDocumentByKeyRef = getStaffDocumentByKeyRef; + +exports.getStaffDocumentByKey = function getStaffDocumentByKey(dcOrVars, vars) { + return executeQuery(getStaffDocumentByKeyRef(dcOrVars, vars)); +}; + +const listStaffDocumentsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffDocumentsByStaffId', inputVars); +} +listStaffDocumentsByStaffIdRef.operationName = 'listStaffDocumentsByStaffId'; +exports.listStaffDocumentsByStaffIdRef = listStaffDocumentsByStaffIdRef; + +exports.listStaffDocumentsByStaffId = function listStaffDocumentsByStaffId(dcOrVars, vars) { + return executeQuery(listStaffDocumentsByStaffIdRef(dcOrVars, vars)); +}; + +const listStaffDocumentsByDocumentTypeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffDocumentsByDocumentType', inputVars); +} +listStaffDocumentsByDocumentTypeRef.operationName = 'listStaffDocumentsByDocumentType'; +exports.listStaffDocumentsByDocumentTypeRef = listStaffDocumentsByDocumentTypeRef; + +exports.listStaffDocumentsByDocumentType = function listStaffDocumentsByDocumentType(dcOrVars, vars) { + return executeQuery(listStaffDocumentsByDocumentTypeRef(dcOrVars, vars)); +}; + +const listStaffDocumentsByStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffDocumentsByStatus', inputVars); +} +listStaffDocumentsByStatusRef.operationName = 'listStaffDocumentsByStatus'; +exports.listStaffDocumentsByStatusRef = listStaffDocumentsByStatusRef; + +exports.listStaffDocumentsByStatus = function listStaffDocumentsByStatus(dcOrVars, vars) { + return executeQuery(listStaffDocumentsByStatusRef(dcOrVars, vars)); +}; + +const createTaskRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTask', inputVars); +} +createTaskRef.operationName = 'createTask'; +exports.createTaskRef = createTaskRef; + +exports.createTask = function createTask(dcOrVars, vars) { + return executeMutation(createTaskRef(dcOrVars, vars)); +}; + +const updateTaskRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTask', inputVars); +} +updateTaskRef.operationName = 'updateTask'; +exports.updateTaskRef = updateTaskRef; + +exports.updateTask = function updateTask(dcOrVars, vars) { + return executeMutation(updateTaskRef(dcOrVars, vars)); +}; + +const deleteTaskRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTask', inputVars); +} +deleteTaskRef.operationName = 'deleteTask'; +exports.deleteTaskRef = deleteTaskRef; + +exports.deleteTask = function deleteTask(dcOrVars, vars) { + return executeMutation(deleteTaskRef(dcOrVars, vars)); +}; + +const listAccountsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAccounts'); +} +listAccountsRef.operationName = 'listAccounts'; +exports.listAccountsRef = listAccountsRef; + +exports.listAccounts = function listAccounts(dc) { + return executeQuery(listAccountsRef(dc)); +}; + +const getAccountByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getAccountById', inputVars); +} +getAccountByIdRef.operationName = 'getAccountById'; +exports.getAccountByIdRef = getAccountByIdRef; + +exports.getAccountById = function getAccountById(dcOrVars, vars) { + return executeQuery(getAccountByIdRef(dcOrVars, vars)); +}; + +const getAccountsByOwnerIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getAccountsByOwnerId', inputVars); +} +getAccountsByOwnerIdRef.operationName = 'getAccountsByOwnerId'; +exports.getAccountsByOwnerIdRef = getAccountsByOwnerIdRef; + +exports.getAccountsByOwnerId = function getAccountsByOwnerId(dcOrVars, vars) { + return executeQuery(getAccountsByOwnerIdRef(dcOrVars, vars)); +}; + +const filterAccountsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterAccounts', inputVars); +} +filterAccountsRef.operationName = 'filterAccounts'; +exports.filterAccountsRef = filterAccountsRef; + +exports.filterAccounts = function filterAccounts(dcOrVars, vars) { + return executeQuery(filterAccountsRef(dcOrVars, vars)); +}; + +const listApplicationsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listApplications'); +} +listApplicationsRef.operationName = 'listApplications'; +exports.listApplicationsRef = listApplicationsRef; + +exports.listApplications = function listApplications(dc) { + return executeQuery(listApplicationsRef(dc)); +}; + +const getApplicationByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getApplicationById', inputVars); +} +getApplicationByIdRef.operationName = 'getApplicationById'; +exports.getApplicationByIdRef = getApplicationByIdRef; + +exports.getApplicationById = function getApplicationById(dcOrVars, vars) { + return executeQuery(getApplicationByIdRef(dcOrVars, vars)); +}; + +const getApplicationsByShiftIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getApplicationsByShiftId', inputVars); +} +getApplicationsByShiftIdRef.operationName = 'getApplicationsByShiftId'; +exports.getApplicationsByShiftIdRef = getApplicationsByShiftIdRef; + +exports.getApplicationsByShiftId = function getApplicationsByShiftId(dcOrVars, vars) { + return executeQuery(getApplicationsByShiftIdRef(dcOrVars, vars)); +}; + +const getApplicationsByShiftIdAndStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getApplicationsByShiftIdAndStatus', inputVars); +} +getApplicationsByShiftIdAndStatusRef.operationName = 'getApplicationsByShiftIdAndStatus'; +exports.getApplicationsByShiftIdAndStatusRef = getApplicationsByShiftIdAndStatusRef; + +exports.getApplicationsByShiftIdAndStatus = function getApplicationsByShiftIdAndStatus(dcOrVars, vars) { + return executeQuery(getApplicationsByShiftIdAndStatusRef(dcOrVars, vars)); +}; + +const getApplicationsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getApplicationsByStaffId', inputVars); +} +getApplicationsByStaffIdRef.operationName = 'getApplicationsByStaffId'; +exports.getApplicationsByStaffIdRef = getApplicationsByStaffIdRef; + +exports.getApplicationsByStaffId = function getApplicationsByStaffId(dcOrVars, vars) { + return executeQuery(getApplicationsByStaffIdRef(dcOrVars, vars)); +}; + +const vaidateDayStaffApplicationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'vaidateDayStaffApplication', inputVars); +} +vaidateDayStaffApplicationRef.operationName = 'vaidateDayStaffApplication'; +exports.vaidateDayStaffApplicationRef = vaidateDayStaffApplicationRef; + +exports.vaidateDayStaffApplication = function vaidateDayStaffApplication(dcOrVars, vars) { + return executeQuery(vaidateDayStaffApplicationRef(dcOrVars, vars)); +}; + +const getApplicationByStaffShiftAndRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getApplicationByStaffShiftAndRole', inputVars); +} +getApplicationByStaffShiftAndRoleRef.operationName = 'getApplicationByStaffShiftAndRole'; +exports.getApplicationByStaffShiftAndRoleRef = getApplicationByStaffShiftAndRoleRef; + +exports.getApplicationByStaffShiftAndRole = function getApplicationByStaffShiftAndRole(dcOrVars, vars) { + return executeQuery(getApplicationByStaffShiftAndRoleRef(dcOrVars, vars)); +}; + +const listAcceptedApplicationsByShiftRoleKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAcceptedApplicationsByShiftRoleKey', inputVars); +} +listAcceptedApplicationsByShiftRoleKeyRef.operationName = 'listAcceptedApplicationsByShiftRoleKey'; +exports.listAcceptedApplicationsByShiftRoleKeyRef = listAcceptedApplicationsByShiftRoleKeyRef; + +exports.listAcceptedApplicationsByShiftRoleKey = function listAcceptedApplicationsByShiftRoleKey(dcOrVars, vars) { + return executeQuery(listAcceptedApplicationsByShiftRoleKeyRef(dcOrVars, vars)); +}; + +const listAcceptedApplicationsByBusinessForDayRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAcceptedApplicationsByBusinessForDay', inputVars); +} +listAcceptedApplicationsByBusinessForDayRef.operationName = 'listAcceptedApplicationsByBusinessForDay'; +exports.listAcceptedApplicationsByBusinessForDayRef = listAcceptedApplicationsByBusinessForDayRef; + +exports.listAcceptedApplicationsByBusinessForDay = function listAcceptedApplicationsByBusinessForDay(dcOrVars, vars) { + return executeQuery(listAcceptedApplicationsByBusinessForDayRef(dcOrVars, vars)); +}; + +const listStaffsApplicationsByBusinessForDayRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffsApplicationsByBusinessForDay', inputVars); +} +listStaffsApplicationsByBusinessForDayRef.operationName = 'listStaffsApplicationsByBusinessForDay'; +exports.listStaffsApplicationsByBusinessForDayRef = listStaffsApplicationsByBusinessForDayRef; + +exports.listStaffsApplicationsByBusinessForDay = function listStaffsApplicationsByBusinessForDay(dcOrVars, vars) { + return executeQuery(listStaffsApplicationsByBusinessForDayRef(dcOrVars, vars)); +}; + +const listCompletedApplicationsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listCompletedApplicationsByStaffId', inputVars); +} +listCompletedApplicationsByStaffIdRef.operationName = 'listCompletedApplicationsByStaffId'; +exports.listCompletedApplicationsByStaffIdRef = listCompletedApplicationsByStaffIdRef; + +exports.listCompletedApplicationsByStaffId = function listCompletedApplicationsByStaffId(dcOrVars, vars) { + return executeQuery(listCompletedApplicationsByStaffIdRef(dcOrVars, vars)); +}; + +const listAttireOptionsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listAttireOptions'); +} +listAttireOptionsRef.operationName = 'listAttireOptions'; +exports.listAttireOptionsRef = listAttireOptionsRef; + +exports.listAttireOptions = function listAttireOptions(dc) { + return executeQuery(listAttireOptionsRef(dc)); +}; + +const getAttireOptionByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getAttireOptionById', inputVars); +} +getAttireOptionByIdRef.operationName = 'getAttireOptionById'; +exports.getAttireOptionByIdRef = getAttireOptionByIdRef; + +exports.getAttireOptionById = function getAttireOptionById(dcOrVars, vars) { + return executeQuery(getAttireOptionByIdRef(dcOrVars, vars)); +}; + +const filterAttireOptionsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterAttireOptions', inputVars); +} +filterAttireOptionsRef.operationName = 'filterAttireOptions'; +exports.filterAttireOptionsRef = filterAttireOptionsRef; + +exports.filterAttireOptions = function filterAttireOptions(dcOrVars, vars) { + return executeQuery(filterAttireOptionsRef(dcOrVars, vars)); +}; + +const createCertificateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'CreateCertificate', inputVars); +} +createCertificateRef.operationName = 'CreateCertificate'; +exports.createCertificateRef = createCertificateRef; + +exports.createCertificate = function createCertificate(dcOrVars, vars) { + return executeMutation(createCertificateRef(dcOrVars, vars)); +}; + +const updateCertificateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'UpdateCertificate', inputVars); +} +updateCertificateRef.operationName = 'UpdateCertificate'; +exports.updateCertificateRef = updateCertificateRef; + +exports.updateCertificate = function updateCertificate(dcOrVars, vars) { + return executeMutation(updateCertificateRef(dcOrVars, vars)); +}; + +const deleteCertificateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'DeleteCertificate', inputVars); +} +deleteCertificateRef.operationName = 'DeleteCertificate'; +exports.deleteCertificateRef = deleteCertificateRef; + +exports.deleteCertificate = function deleteCertificate(dcOrVars, vars) { + return executeMutation(deleteCertificateRef(dcOrVars, vars)); +}; + +const listCustomRateCardsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listCustomRateCards'); +} +listCustomRateCardsRef.operationName = 'listCustomRateCards'; +exports.listCustomRateCardsRef = listCustomRateCardsRef; + +exports.listCustomRateCards = function listCustomRateCards(dc) { + return executeQuery(listCustomRateCardsRef(dc)); +}; + +const getCustomRateCardByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getCustomRateCardById', inputVars); +} +getCustomRateCardByIdRef.operationName = 'getCustomRateCardById'; +exports.getCustomRateCardByIdRef = getCustomRateCardByIdRef; + +exports.getCustomRateCardById = function getCustomRateCardById(dcOrVars, vars) { + return executeQuery(getCustomRateCardByIdRef(dcOrVars, vars)); +}; + +const createRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createRole', inputVars); +} +createRoleRef.operationName = 'createRole'; +exports.createRoleRef = createRoleRef; + +exports.createRole = function createRole(dcOrVars, vars) { + return executeMutation(createRoleRef(dcOrVars, vars)); +}; + +const updateRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateRole', inputVars); +} +updateRoleRef.operationName = 'updateRole'; +exports.updateRoleRef = updateRoleRef; + +exports.updateRole = function updateRole(dcOrVars, vars) { + return executeMutation(updateRoleRef(dcOrVars, vars)); +}; + +const deleteRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteRole', inputVars); +} +deleteRoleRef.operationName = 'deleteRole'; +exports.deleteRoleRef = deleteRoleRef; + +exports.deleteRole = function deleteRole(dcOrVars, vars) { + return executeMutation(deleteRoleRef(dcOrVars, vars)); +}; + +const listRoleCategoriesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRoleCategories'); +} +listRoleCategoriesRef.operationName = 'listRoleCategories'; +exports.listRoleCategoriesRef = listRoleCategoriesRef; + +exports.listRoleCategories = function listRoleCategories(dc) { + return executeQuery(listRoleCategoriesRef(dc)); +}; + +const getRoleCategoryByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getRoleCategoryById', inputVars); +} +getRoleCategoryByIdRef.operationName = 'getRoleCategoryById'; +exports.getRoleCategoryByIdRef = getRoleCategoryByIdRef; + +exports.getRoleCategoryById = function getRoleCategoryById(dcOrVars, vars) { + return executeQuery(getRoleCategoryByIdRef(dcOrVars, vars)); +}; + +const getRoleCategoriesByCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getRoleCategoriesByCategory', inputVars); +} +getRoleCategoriesByCategoryRef.operationName = 'getRoleCategoriesByCategory'; +exports.getRoleCategoriesByCategoryRef = getRoleCategoriesByCategoryRef; + +exports.getRoleCategoriesByCategory = function getRoleCategoriesByCategory(dcOrVars, vars) { + return executeQuery(getRoleCategoriesByCategoryRef(dcOrVars, vars)); +}; + +const listStaffAvailabilitiesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffAvailabilities', inputVars); +} +listStaffAvailabilitiesRef.operationName = 'listStaffAvailabilities'; +exports.listStaffAvailabilitiesRef = listStaffAvailabilitiesRef; + +exports.listStaffAvailabilities = function listStaffAvailabilities(dcOrVars, vars) { + return executeQuery(listStaffAvailabilitiesRef(dcOrVars, vars)); +}; + +const listStaffAvailabilitiesByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffAvailabilitiesByStaffId', inputVars); +} +listStaffAvailabilitiesByStaffIdRef.operationName = 'listStaffAvailabilitiesByStaffId'; +exports.listStaffAvailabilitiesByStaffIdRef = listStaffAvailabilitiesByStaffIdRef; + +exports.listStaffAvailabilitiesByStaffId = function listStaffAvailabilitiesByStaffId(dcOrVars, vars) { + return executeQuery(listStaffAvailabilitiesByStaffIdRef(dcOrVars, vars)); +}; + +const getStaffAvailabilityByKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffAvailabilityByKey', inputVars); +} +getStaffAvailabilityByKeyRef.operationName = 'getStaffAvailabilityByKey'; +exports.getStaffAvailabilityByKeyRef = getStaffAvailabilityByKeyRef; + +exports.getStaffAvailabilityByKey = function getStaffAvailabilityByKey(dcOrVars, vars) { + return executeQuery(getStaffAvailabilityByKeyRef(dcOrVars, vars)); +}; + +const listStaffAvailabilitiesByDayRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffAvailabilitiesByDay', inputVars); +} +listStaffAvailabilitiesByDayRef.operationName = 'listStaffAvailabilitiesByDay'; +exports.listStaffAvailabilitiesByDayRef = listStaffAvailabilitiesByDayRef; + +exports.listStaffAvailabilitiesByDay = function listStaffAvailabilitiesByDay(dcOrVars, vars) { + return executeQuery(listStaffAvailabilitiesByDayRef(dcOrVars, vars)); +}; + +const listRecentPaymentsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPayments', inputVars); +} +listRecentPaymentsRef.operationName = 'listRecentPayments'; +exports.listRecentPaymentsRef = listRecentPaymentsRef; + +exports.listRecentPayments = function listRecentPayments(dcOrVars, vars) { + return executeQuery(listRecentPaymentsRef(dcOrVars, vars)); +}; + +const getRecentPaymentByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getRecentPaymentById', inputVars); +} +getRecentPaymentByIdRef.operationName = 'getRecentPaymentById'; +exports.getRecentPaymentByIdRef = getRecentPaymentByIdRef; + +exports.getRecentPaymentById = function getRecentPaymentById(dcOrVars, vars) { + return executeQuery(getRecentPaymentByIdRef(dcOrVars, vars)); +}; + +const listRecentPaymentsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPaymentsByStaffId', inputVars); +} +listRecentPaymentsByStaffIdRef.operationName = 'listRecentPaymentsByStaffId'; +exports.listRecentPaymentsByStaffIdRef = listRecentPaymentsByStaffIdRef; + +exports.listRecentPaymentsByStaffId = function listRecentPaymentsByStaffId(dcOrVars, vars) { + return executeQuery(listRecentPaymentsByStaffIdRef(dcOrVars, vars)); +}; + +const listRecentPaymentsByApplicationIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPaymentsByApplicationId', inputVars); +} +listRecentPaymentsByApplicationIdRef.operationName = 'listRecentPaymentsByApplicationId'; +exports.listRecentPaymentsByApplicationIdRef = listRecentPaymentsByApplicationIdRef; + +exports.listRecentPaymentsByApplicationId = function listRecentPaymentsByApplicationId(dcOrVars, vars) { + return executeQuery(listRecentPaymentsByApplicationIdRef(dcOrVars, vars)); +}; + +const listRecentPaymentsByInvoiceIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPaymentsByInvoiceId', inputVars); +} +listRecentPaymentsByInvoiceIdRef.operationName = 'listRecentPaymentsByInvoiceId'; +exports.listRecentPaymentsByInvoiceIdRef = listRecentPaymentsByInvoiceIdRef; + +exports.listRecentPaymentsByInvoiceId = function listRecentPaymentsByInvoiceId(dcOrVars, vars) { + return executeQuery(listRecentPaymentsByInvoiceIdRef(dcOrVars, vars)); +}; + +const listRecentPaymentsByStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPaymentsByStatus', inputVars); +} +listRecentPaymentsByStatusRef.operationName = 'listRecentPaymentsByStatus'; +exports.listRecentPaymentsByStatusRef = listRecentPaymentsByStatusRef; + +exports.listRecentPaymentsByStatus = function listRecentPaymentsByStatus(dcOrVars, vars) { + return executeQuery(listRecentPaymentsByStatusRef(dcOrVars, vars)); +}; + +const listRecentPaymentsByInvoiceIdsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPaymentsByInvoiceIds', inputVars); +} +listRecentPaymentsByInvoiceIdsRef.operationName = 'listRecentPaymentsByInvoiceIds'; +exports.listRecentPaymentsByInvoiceIdsRef = listRecentPaymentsByInvoiceIdsRef; + +exports.listRecentPaymentsByInvoiceIds = function listRecentPaymentsByInvoiceIds(dcOrVars, vars) { + return executeQuery(listRecentPaymentsByInvoiceIdsRef(dcOrVars, vars)); +}; + +const listRecentPaymentsByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRecentPaymentsByBusinessId', inputVars); +} +listRecentPaymentsByBusinessIdRef.operationName = 'listRecentPaymentsByBusinessId'; +exports.listRecentPaymentsByBusinessIdRef = listRecentPaymentsByBusinessIdRef; + +exports.listRecentPaymentsByBusinessId = function listRecentPaymentsByBusinessId(dcOrVars, vars) { + return executeQuery(listRecentPaymentsByBusinessIdRef(dcOrVars, vars)); +}; + +const listBusinessesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listBusinesses'); +} +listBusinessesRef.operationName = 'listBusinesses'; +exports.listBusinessesRef = listBusinessesRef; + +exports.listBusinesses = function listBusinesses(dc) { + return executeQuery(listBusinessesRef(dc)); +}; + +const getBusinessesByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getBusinessesByUserId', inputVars); +} +getBusinessesByUserIdRef.operationName = 'getBusinessesByUserId'; +exports.getBusinessesByUserIdRef = getBusinessesByUserIdRef; + +exports.getBusinessesByUserId = function getBusinessesByUserId(dcOrVars, vars) { + return executeQuery(getBusinessesByUserIdRef(dcOrVars, vars)); +}; + +const getBusinessByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getBusinessById', inputVars); +} +getBusinessByIdRef.operationName = 'getBusinessById'; +exports.getBusinessByIdRef = getBusinessByIdRef; + +exports.getBusinessById = function getBusinessById(dcOrVars, vars) { + return executeQuery(getBusinessByIdRef(dcOrVars, vars)); +}; + +const createClientFeedbackRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createClientFeedback', inputVars); +} +createClientFeedbackRef.operationName = 'createClientFeedback'; +exports.createClientFeedbackRef = createClientFeedbackRef; + +exports.createClientFeedback = function createClientFeedback(dcOrVars, vars) { + return executeMutation(createClientFeedbackRef(dcOrVars, vars)); +}; + +const updateClientFeedbackRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateClientFeedback', inputVars); +} +updateClientFeedbackRef.operationName = 'updateClientFeedback'; +exports.updateClientFeedbackRef = updateClientFeedbackRef; + +exports.updateClientFeedback = function updateClientFeedback(dcOrVars, vars) { + return executeMutation(updateClientFeedbackRef(dcOrVars, vars)); +}; + +const deleteClientFeedbackRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteClientFeedback', inputVars); +} +deleteClientFeedbackRef.operationName = 'deleteClientFeedback'; +exports.deleteClientFeedbackRef = deleteClientFeedbackRef; + +exports.deleteClientFeedback = function deleteClientFeedback(dcOrVars, vars) { + return executeMutation(deleteClientFeedbackRef(dcOrVars, vars)); +}; + +const listConversationsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listConversations', inputVars); +} +listConversationsRef.operationName = 'listConversations'; +exports.listConversationsRef = listConversationsRef; + +exports.listConversations = function listConversations(dcOrVars, vars) { + return executeQuery(listConversationsRef(dcOrVars, vars)); +}; + +const getConversationByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getConversationById', inputVars); +} +getConversationByIdRef.operationName = 'getConversationById'; +exports.getConversationByIdRef = getConversationByIdRef; + +exports.getConversationById = function getConversationById(dcOrVars, vars) { + return executeQuery(getConversationByIdRef(dcOrVars, vars)); +}; + +const listConversationsByTypeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listConversationsByType', inputVars); +} +listConversationsByTypeRef.operationName = 'listConversationsByType'; +exports.listConversationsByTypeRef = listConversationsByTypeRef; + +exports.listConversationsByType = function listConversationsByType(dcOrVars, vars) { + return executeQuery(listConversationsByTypeRef(dcOrVars, vars)); +}; + +const listConversationsByStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listConversationsByStatus', inputVars); +} +listConversationsByStatusRef.operationName = 'listConversationsByStatus'; +exports.listConversationsByStatusRef = listConversationsByStatusRef; + +exports.listConversationsByStatus = function listConversationsByStatus(dcOrVars, vars) { + return executeQuery(listConversationsByStatusRef(dcOrVars, vars)); +}; + +const filterConversationsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterConversations', inputVars); +} +filterConversationsRef.operationName = 'filterConversations'; +exports.filterConversationsRef = filterConversationsRef; + +exports.filterConversations = function filterConversations(dcOrVars, vars) { + return executeQuery(filterConversationsRef(dcOrVars, vars)); +}; + +const listOrdersRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listOrders', inputVars); +} +listOrdersRef.operationName = 'listOrders'; +exports.listOrdersRef = listOrdersRef; + +exports.listOrders = function listOrders(dcOrVars, vars) { + return executeQuery(listOrdersRef(dcOrVars, vars)); +}; + +const getOrderByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getOrderById', inputVars); +} +getOrderByIdRef.operationName = 'getOrderById'; +exports.getOrderByIdRef = getOrderByIdRef; + +exports.getOrderById = function getOrderById(dcOrVars, vars) { + return executeQuery(getOrderByIdRef(dcOrVars, vars)); +}; + +const getOrdersByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getOrdersByBusinessId', inputVars); +} +getOrdersByBusinessIdRef.operationName = 'getOrdersByBusinessId'; +exports.getOrdersByBusinessIdRef = getOrdersByBusinessIdRef; + +exports.getOrdersByBusinessId = function getOrdersByBusinessId(dcOrVars, vars) { + return executeQuery(getOrdersByBusinessIdRef(dcOrVars, vars)); +}; + +const getOrdersByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getOrdersByVendorId', inputVars); +} +getOrdersByVendorIdRef.operationName = 'getOrdersByVendorId'; +exports.getOrdersByVendorIdRef = getOrdersByVendorIdRef; + +exports.getOrdersByVendorId = function getOrdersByVendorId(dcOrVars, vars) { + return executeQuery(getOrdersByVendorIdRef(dcOrVars, vars)); +}; + +const getOrdersByStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getOrdersByStatus', inputVars); +} +getOrdersByStatusRef.operationName = 'getOrdersByStatus'; +exports.getOrdersByStatusRef = getOrdersByStatusRef; + +exports.getOrdersByStatus = function getOrdersByStatus(dcOrVars, vars) { + return executeQuery(getOrdersByStatusRef(dcOrVars, vars)); +}; + +const getOrdersByDateRangeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getOrdersByDateRange', inputVars); +} +getOrdersByDateRangeRef.operationName = 'getOrdersByDateRange'; +exports.getOrdersByDateRangeRef = getOrdersByDateRangeRef; + +exports.getOrdersByDateRange = function getOrdersByDateRange(dcOrVars, vars) { + return executeQuery(getOrdersByDateRangeRef(dcOrVars, vars)); +}; + +const getRapidOrdersRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getRapidOrders', inputVars); +} +getRapidOrdersRef.operationName = 'getRapidOrders'; +exports.getRapidOrdersRef = getRapidOrdersRef; + +exports.getRapidOrders = function getRapidOrders(dcOrVars, vars) { + return executeQuery(getRapidOrdersRef(dcOrVars, vars)); +}; + +const listOrdersByBusinessAndTeamHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listOrdersByBusinessAndTeamHub', inputVars); +} +listOrdersByBusinessAndTeamHubRef.operationName = 'listOrdersByBusinessAndTeamHub'; +exports.listOrdersByBusinessAndTeamHubRef = listOrdersByBusinessAndTeamHubRef; + +exports.listOrdersByBusinessAndTeamHub = function listOrdersByBusinessAndTeamHub(dcOrVars, vars) { + return executeQuery(listOrdersByBusinessAndTeamHubRef(dcOrVars, vars)); +}; + +const listStaffRolesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffRoles', inputVars); +} +listStaffRolesRef.operationName = 'listStaffRoles'; +exports.listStaffRolesRef = listStaffRolesRef; + +exports.listStaffRoles = function listStaffRoles(dcOrVars, vars) { + return executeQuery(listStaffRolesRef(dcOrVars, vars)); +}; + +const getStaffRoleByKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffRoleByKey', inputVars); +} +getStaffRoleByKeyRef.operationName = 'getStaffRoleByKey'; +exports.getStaffRoleByKeyRef = getStaffRoleByKeyRef; + +exports.getStaffRoleByKey = function getStaffRoleByKey(dcOrVars, vars) { + return executeQuery(getStaffRoleByKeyRef(dcOrVars, vars)); +}; + +const listStaffRolesByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffRolesByStaffId', inputVars); +} +listStaffRolesByStaffIdRef.operationName = 'listStaffRolesByStaffId'; +exports.listStaffRolesByStaffIdRef = listStaffRolesByStaffIdRef; + +exports.listStaffRolesByStaffId = function listStaffRolesByStaffId(dcOrVars, vars) { + return executeQuery(listStaffRolesByStaffIdRef(dcOrVars, vars)); +}; + +const listStaffRolesByRoleIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffRolesByRoleId', inputVars); +} +listStaffRolesByRoleIdRef.operationName = 'listStaffRolesByRoleId'; +exports.listStaffRolesByRoleIdRef = listStaffRolesByRoleIdRef; + +exports.listStaffRolesByRoleId = function listStaffRolesByRoleId(dcOrVars, vars) { + return executeQuery(listStaffRolesByRoleIdRef(dcOrVars, vars)); +}; + +const filterStaffRolesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterStaffRoles', inputVars); +} +filterStaffRolesRef.operationName = 'filterStaffRoles'; +exports.filterStaffRolesRef = filterStaffRolesRef; + +exports.filterStaffRoles = function filterStaffRoles(dcOrVars, vars) { + return executeQuery(filterStaffRolesRef(dcOrVars, vars)); +}; + +const listTaskCommentsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTaskComments'); +} +listTaskCommentsRef.operationName = 'listTaskComments'; +exports.listTaskCommentsRef = listTaskCommentsRef; + +exports.listTaskComments = function listTaskComments(dc) { + return executeQuery(listTaskCommentsRef(dc)); +}; + +const getTaskCommentByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTaskCommentById', inputVars); +} +getTaskCommentByIdRef.operationName = 'getTaskCommentById'; +exports.getTaskCommentByIdRef = getTaskCommentByIdRef; + +exports.getTaskCommentById = function getTaskCommentById(dcOrVars, vars) { + return executeQuery(getTaskCommentByIdRef(dcOrVars, vars)); +}; + +const getTaskCommentsByTaskIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTaskCommentsByTaskId', inputVars); +} +getTaskCommentsByTaskIdRef.operationName = 'getTaskCommentsByTaskId'; +exports.getTaskCommentsByTaskIdRef = getTaskCommentsByTaskIdRef; + +exports.getTaskCommentsByTaskId = function getTaskCommentsByTaskId(dcOrVars, vars) { + return executeQuery(getTaskCommentsByTaskIdRef(dcOrVars, vars)); +}; + +const createBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createBusiness', inputVars); +} +createBusinessRef.operationName = 'createBusiness'; +exports.createBusinessRef = createBusinessRef; + +exports.createBusiness = function createBusiness(dcOrVars, vars) { + return executeMutation(createBusinessRef(dcOrVars, vars)); +}; + +const updateBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateBusiness', inputVars); +} +updateBusinessRef.operationName = 'updateBusiness'; +exports.updateBusinessRef = updateBusinessRef; + +exports.updateBusiness = function updateBusiness(dcOrVars, vars) { + return executeMutation(updateBusinessRef(dcOrVars, vars)); +}; + +const deleteBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteBusiness', inputVars); +} +deleteBusinessRef.operationName = 'deleteBusiness'; +exports.deleteBusinessRef = deleteBusinessRef; + +exports.deleteBusiness = function deleteBusiness(dcOrVars, vars) { + return executeMutation(deleteBusinessRef(dcOrVars, vars)); +}; + +const createConversationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createConversation', inputVars); +} +createConversationRef.operationName = 'createConversation'; +exports.createConversationRef = createConversationRef; + +exports.createConversation = function createConversation(dcOrVars, vars) { + return executeMutation(createConversationRef(dcOrVars, vars)); +}; + +const updateConversationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateConversation', inputVars); +} +updateConversationRef.operationName = 'updateConversation'; +exports.updateConversationRef = updateConversationRef; + +exports.updateConversation = function updateConversation(dcOrVars, vars) { + return executeMutation(updateConversationRef(dcOrVars, vars)); +}; + +const updateConversationLastMessageRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateConversationLastMessage', inputVars); +} +updateConversationLastMessageRef.operationName = 'updateConversationLastMessage'; +exports.updateConversationLastMessageRef = updateConversationLastMessageRef; + +exports.updateConversationLastMessage = function updateConversationLastMessage(dcOrVars, vars) { + return executeMutation(updateConversationLastMessageRef(dcOrVars, vars)); +}; + +const deleteConversationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteConversation', inputVars); +} +deleteConversationRef.operationName = 'deleteConversation'; +exports.deleteConversationRef = deleteConversationRef; + +exports.deleteConversation = function deleteConversation(dcOrVars, vars) { + return executeMutation(deleteConversationRef(dcOrVars, vars)); +}; + +const createCustomRateCardRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createCustomRateCard', inputVars); +} +createCustomRateCardRef.operationName = 'createCustomRateCard'; +exports.createCustomRateCardRef = createCustomRateCardRef; + +exports.createCustomRateCard = function createCustomRateCard(dcOrVars, vars) { + return executeMutation(createCustomRateCardRef(dcOrVars, vars)); +}; + +const updateCustomRateCardRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateCustomRateCard', inputVars); +} +updateCustomRateCardRef.operationName = 'updateCustomRateCard'; +exports.updateCustomRateCardRef = updateCustomRateCardRef; + +exports.updateCustomRateCard = function updateCustomRateCard(dcOrVars, vars) { + return executeMutation(updateCustomRateCardRef(dcOrVars, vars)); +}; + +const deleteCustomRateCardRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteCustomRateCard', inputVars); +} +deleteCustomRateCardRef.operationName = 'deleteCustomRateCard'; +exports.deleteCustomRateCardRef = deleteCustomRateCardRef; + +exports.deleteCustomRateCard = function deleteCustomRateCard(dcOrVars, vars) { + return executeMutation(deleteCustomRateCardRef(dcOrVars, vars)); +}; + +const listDocumentsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listDocuments'); +} +listDocumentsRef.operationName = 'listDocuments'; +exports.listDocumentsRef = listDocumentsRef; + +exports.listDocuments = function listDocuments(dc) { + return executeQuery(listDocumentsRef(dc)); +}; + +const getDocumentByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getDocumentById', inputVars); +} +getDocumentByIdRef.operationName = 'getDocumentById'; +exports.getDocumentByIdRef = getDocumentByIdRef; + +exports.getDocumentById = function getDocumentById(dcOrVars, vars) { + return executeQuery(getDocumentByIdRef(dcOrVars, vars)); +}; + +const filterDocumentsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterDocuments', inputVars); +} +filterDocumentsRef.operationName = 'filterDocuments'; +exports.filterDocumentsRef = filterDocumentsRef; + +exports.filterDocuments = function filterDocuments(dcOrVars, vars) { + return executeQuery(filterDocumentsRef(dcOrVars, vars)); +}; + +const createRecentPaymentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createRecentPayment', inputVars); +} +createRecentPaymentRef.operationName = 'createRecentPayment'; +exports.createRecentPaymentRef = createRecentPaymentRef; + +exports.createRecentPayment = function createRecentPayment(dcOrVars, vars) { + return executeMutation(createRecentPaymentRef(dcOrVars, vars)); +}; + +const updateRecentPaymentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateRecentPayment', inputVars); +} +updateRecentPaymentRef.operationName = 'updateRecentPayment'; +exports.updateRecentPaymentRef = updateRecentPaymentRef; + +exports.updateRecentPayment = function updateRecentPayment(dcOrVars, vars) { + return executeMutation(updateRecentPaymentRef(dcOrVars, vars)); +}; + +const deleteRecentPaymentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteRecentPayment', inputVars); +} +deleteRecentPaymentRef.operationName = 'deleteRecentPayment'; +exports.deleteRecentPaymentRef = deleteRecentPaymentRef; + +exports.deleteRecentPayment = function deleteRecentPayment(dcOrVars, vars) { + return executeMutation(deleteRecentPaymentRef(dcOrVars, vars)); +}; + +const listShiftsForCoverageRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForCoverage', inputVars); +} +listShiftsForCoverageRef.operationName = 'listShiftsForCoverage'; +exports.listShiftsForCoverageRef = listShiftsForCoverageRef; + +exports.listShiftsForCoverage = function listShiftsForCoverage(dcOrVars, vars) { + return executeQuery(listShiftsForCoverageRef(dcOrVars, vars)); +}; + +const listApplicationsForCoverageRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listApplicationsForCoverage', inputVars); +} +listApplicationsForCoverageRef.operationName = 'listApplicationsForCoverage'; +exports.listApplicationsForCoverageRef = listApplicationsForCoverageRef; + +exports.listApplicationsForCoverage = function listApplicationsForCoverage(dcOrVars, vars) { + return executeQuery(listApplicationsForCoverageRef(dcOrVars, vars)); +}; + +const listShiftsForDailyOpsByBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForDailyOpsByBusiness', inputVars); +} +listShiftsForDailyOpsByBusinessRef.operationName = 'listShiftsForDailyOpsByBusiness'; +exports.listShiftsForDailyOpsByBusinessRef = listShiftsForDailyOpsByBusinessRef; + +exports.listShiftsForDailyOpsByBusiness = function listShiftsForDailyOpsByBusiness(dcOrVars, vars) { + return executeQuery(listShiftsForDailyOpsByBusinessRef(dcOrVars, vars)); +}; + +const listShiftsForDailyOpsByVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForDailyOpsByVendor', inputVars); +} +listShiftsForDailyOpsByVendorRef.operationName = 'listShiftsForDailyOpsByVendor'; +exports.listShiftsForDailyOpsByVendorRef = listShiftsForDailyOpsByVendorRef; + +exports.listShiftsForDailyOpsByVendor = function listShiftsForDailyOpsByVendor(dcOrVars, vars) { + return executeQuery(listShiftsForDailyOpsByVendorRef(dcOrVars, vars)); +}; + +const listApplicationsForDailyOpsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listApplicationsForDailyOps', inputVars); +} +listApplicationsForDailyOpsRef.operationName = 'listApplicationsForDailyOps'; +exports.listApplicationsForDailyOpsRef = listApplicationsForDailyOpsRef; + +exports.listApplicationsForDailyOps = function listApplicationsForDailyOps(dcOrVars, vars) { + return executeQuery(listApplicationsForDailyOpsRef(dcOrVars, vars)); +}; + +const listShiftsForForecastByBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForForecastByBusiness', inputVars); +} +listShiftsForForecastByBusinessRef.operationName = 'listShiftsForForecastByBusiness'; +exports.listShiftsForForecastByBusinessRef = listShiftsForForecastByBusinessRef; + +exports.listShiftsForForecastByBusiness = function listShiftsForForecastByBusiness(dcOrVars, vars) { + return executeQuery(listShiftsForForecastByBusinessRef(dcOrVars, vars)); +}; + +const listShiftsForForecastByVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForForecastByVendor', inputVars); +} +listShiftsForForecastByVendorRef.operationName = 'listShiftsForForecastByVendor'; +exports.listShiftsForForecastByVendorRef = listShiftsForForecastByVendorRef; + +exports.listShiftsForForecastByVendor = function listShiftsForForecastByVendor(dcOrVars, vars) { + return executeQuery(listShiftsForForecastByVendorRef(dcOrVars, vars)); +}; + +const listShiftsForNoShowRangeByBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForNoShowRangeByBusiness', inputVars); +} +listShiftsForNoShowRangeByBusinessRef.operationName = 'listShiftsForNoShowRangeByBusiness'; +exports.listShiftsForNoShowRangeByBusinessRef = listShiftsForNoShowRangeByBusinessRef; + +exports.listShiftsForNoShowRangeByBusiness = function listShiftsForNoShowRangeByBusiness(dcOrVars, vars) { + return executeQuery(listShiftsForNoShowRangeByBusinessRef(dcOrVars, vars)); +}; + +const listShiftsForNoShowRangeByVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForNoShowRangeByVendor', inputVars); +} +listShiftsForNoShowRangeByVendorRef.operationName = 'listShiftsForNoShowRangeByVendor'; +exports.listShiftsForNoShowRangeByVendorRef = listShiftsForNoShowRangeByVendorRef; + +exports.listShiftsForNoShowRangeByVendor = function listShiftsForNoShowRangeByVendor(dcOrVars, vars) { + return executeQuery(listShiftsForNoShowRangeByVendorRef(dcOrVars, vars)); +}; + +const listApplicationsForNoShowRangeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listApplicationsForNoShowRange', inputVars); +} +listApplicationsForNoShowRangeRef.operationName = 'listApplicationsForNoShowRange'; +exports.listApplicationsForNoShowRangeRef = listApplicationsForNoShowRangeRef; + +exports.listApplicationsForNoShowRange = function listApplicationsForNoShowRange(dcOrVars, vars) { + return executeQuery(listApplicationsForNoShowRangeRef(dcOrVars, vars)); +}; + +const listStaffForNoShowReportRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffForNoShowReport', inputVars); +} +listStaffForNoShowReportRef.operationName = 'listStaffForNoShowReport'; +exports.listStaffForNoShowReportRef = listStaffForNoShowReportRef; + +exports.listStaffForNoShowReport = function listStaffForNoShowReport(dcOrVars, vars) { + return executeQuery(listStaffForNoShowReportRef(dcOrVars, vars)); +}; + +const listInvoicesForSpendByBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesForSpendByBusiness', inputVars); +} +listInvoicesForSpendByBusinessRef.operationName = 'listInvoicesForSpendByBusiness'; +exports.listInvoicesForSpendByBusinessRef = listInvoicesForSpendByBusinessRef; + +exports.listInvoicesForSpendByBusiness = function listInvoicesForSpendByBusiness(dcOrVars, vars) { + return executeQuery(listInvoicesForSpendByBusinessRef(dcOrVars, vars)); +}; + +const listInvoicesForSpendByVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesForSpendByVendor', inputVars); +} +listInvoicesForSpendByVendorRef.operationName = 'listInvoicesForSpendByVendor'; +exports.listInvoicesForSpendByVendorRef = listInvoicesForSpendByVendorRef; + +exports.listInvoicesForSpendByVendor = function listInvoicesForSpendByVendor(dcOrVars, vars) { + return executeQuery(listInvoicesForSpendByVendorRef(dcOrVars, vars)); +}; + +const listInvoicesForSpendByOrderRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesForSpendByOrder', inputVars); +} +listInvoicesForSpendByOrderRef.operationName = 'listInvoicesForSpendByOrder'; +exports.listInvoicesForSpendByOrderRef = listInvoicesForSpendByOrderRef; + +exports.listInvoicesForSpendByOrder = function listInvoicesForSpendByOrder(dcOrVars, vars) { + return executeQuery(listInvoicesForSpendByOrderRef(dcOrVars, vars)); +}; + +const listTimesheetsForSpendRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTimesheetsForSpend', inputVars); +} +listTimesheetsForSpendRef.operationName = 'listTimesheetsForSpend'; +exports.listTimesheetsForSpendRef = listTimesheetsForSpendRef; + +exports.listTimesheetsForSpend = function listTimesheetsForSpend(dcOrVars, vars) { + return executeQuery(listTimesheetsForSpendRef(dcOrVars, vars)); +}; + +const listShiftsForPerformanceByBusinessRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForPerformanceByBusiness', inputVars); +} +listShiftsForPerformanceByBusinessRef.operationName = 'listShiftsForPerformanceByBusiness'; +exports.listShiftsForPerformanceByBusinessRef = listShiftsForPerformanceByBusinessRef; + +exports.listShiftsForPerformanceByBusiness = function listShiftsForPerformanceByBusiness(dcOrVars, vars) { + return executeQuery(listShiftsForPerformanceByBusinessRef(dcOrVars, vars)); +}; + +const listShiftsForPerformanceByVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftsForPerformanceByVendor', inputVars); +} +listShiftsForPerformanceByVendorRef.operationName = 'listShiftsForPerformanceByVendor'; +exports.listShiftsForPerformanceByVendorRef = listShiftsForPerformanceByVendorRef; + +exports.listShiftsForPerformanceByVendor = function listShiftsForPerformanceByVendor(dcOrVars, vars) { + return executeQuery(listShiftsForPerformanceByVendorRef(dcOrVars, vars)); +}; + +const listApplicationsForPerformanceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listApplicationsForPerformance', inputVars); +} +listApplicationsForPerformanceRef.operationName = 'listApplicationsForPerformance'; +exports.listApplicationsForPerformanceRef = listApplicationsForPerformanceRef; + +exports.listApplicationsForPerformance = function listApplicationsForPerformance(dcOrVars, vars) { + return executeQuery(listApplicationsForPerformanceRef(dcOrVars, vars)); +}; + +const listStaffForPerformanceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffForPerformance', inputVars); +} +listStaffForPerformanceRef.operationName = 'listStaffForPerformance'; +exports.listStaffForPerformanceRef = listStaffForPerformanceRef; + +exports.listStaffForPerformance = function listStaffForPerformance(dcOrVars, vars) { + return executeQuery(listStaffForPerformanceRef(dcOrVars, vars)); +}; + +const createUserRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'CreateUser', inputVars); +} +createUserRef.operationName = 'CreateUser'; +exports.createUserRef = createUserRef; + +exports.createUser = function createUser(dcOrVars, vars) { + return executeMutation(createUserRef(dcOrVars, vars)); +}; + +const updateUserRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'UpdateUser', inputVars); +} +updateUserRef.operationName = 'UpdateUser'; +exports.updateUserRef = updateUserRef; + +exports.updateUser = function updateUser(dcOrVars, vars) { + return executeMutation(updateUserRef(dcOrVars, vars)); +}; + +const deleteUserRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'DeleteUser', inputVars); +} +deleteUserRef.operationName = 'DeleteUser'; +exports.deleteUserRef = deleteUserRef; + +exports.deleteUser = function deleteUser(dcOrVars, vars) { + return executeMutation(deleteUserRef(dcOrVars, vars)); +}; + +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 createDocumentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createDocument', inputVars); +} +createDocumentRef.operationName = 'createDocument'; +exports.createDocumentRef = createDocumentRef; + +exports.createDocument = function createDocument(dcOrVars, vars) { + return executeMutation(createDocumentRef(dcOrVars, vars)); +}; + +const updateDocumentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateDocument', inputVars); +} +updateDocumentRef.operationName = 'updateDocument'; +exports.updateDocumentRef = updateDocumentRef; + +exports.updateDocument = function updateDocument(dcOrVars, vars) { + return executeMutation(updateDocumentRef(dcOrVars, vars)); +}; + +const deleteDocumentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteDocument', inputVars); +} +deleteDocumentRef.operationName = 'deleteDocument'; +exports.deleteDocumentRef = deleteDocumentRef; + +exports.deleteDocument = function deleteDocument(dcOrVars, vars) { + return executeMutation(deleteDocumentRef(dcOrVars, vars)); +}; + +const listRolesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRoles'); +} +listRolesRef.operationName = 'listRoles'; +exports.listRolesRef = listRolesRef; + +exports.listRoles = function listRoles(dc) { + return executeQuery(listRolesRef(dc)); +}; + +const getRoleByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getRoleById', inputVars); +} +getRoleByIdRef.operationName = 'getRoleById'; +exports.getRoleByIdRef = getRoleByIdRef; + +exports.getRoleById = function getRoleById(dcOrVars, vars) { + return executeQuery(getRoleByIdRef(dcOrVars, vars)); +}; + +const listRolesByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRolesByVendorId', inputVars); +} +listRolesByVendorIdRef.operationName = 'listRolesByVendorId'; +exports.listRolesByVendorIdRef = listRolesByVendorIdRef; + +exports.listRolesByVendorId = function listRolesByVendorId(dcOrVars, vars) { + return executeQuery(listRolesByVendorIdRef(dcOrVars, vars)); +}; + +const listRolesByroleCategoryIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listRolesByroleCategoryId', inputVars); +} +listRolesByroleCategoryIdRef.operationName = 'listRolesByroleCategoryId'; +exports.listRolesByroleCategoryIdRef = listRolesByroleCategoryIdRef; + +exports.listRolesByroleCategoryId = function listRolesByroleCategoryId(dcOrVars, vars) { + return executeQuery(listRolesByroleCategoryIdRef(dcOrVars, vars)); +}; + +const getShiftRoleByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getShiftRoleById', inputVars); +} +getShiftRoleByIdRef.operationName = 'getShiftRoleById'; +exports.getShiftRoleByIdRef = getShiftRoleByIdRef; + +exports.getShiftRoleById = function getShiftRoleById(dcOrVars, vars) { + return executeQuery(getShiftRoleByIdRef(dcOrVars, vars)); +}; + +const listShiftRolesByShiftIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByShiftId', inputVars); +} +listShiftRolesByShiftIdRef.operationName = 'listShiftRolesByShiftId'; +exports.listShiftRolesByShiftIdRef = listShiftRolesByShiftIdRef; + +exports.listShiftRolesByShiftId = function listShiftRolesByShiftId(dcOrVars, vars) { + return executeQuery(listShiftRolesByShiftIdRef(dcOrVars, vars)); +}; + +const listShiftRolesByRoleIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByRoleId', inputVars); +} +listShiftRolesByRoleIdRef.operationName = 'listShiftRolesByRoleId'; +exports.listShiftRolesByRoleIdRef = listShiftRolesByRoleIdRef; + +exports.listShiftRolesByRoleId = function listShiftRolesByRoleId(dcOrVars, vars) { + return executeQuery(listShiftRolesByRoleIdRef(dcOrVars, vars)); +}; + +const listShiftRolesByShiftIdAndTimeRangeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByShiftIdAndTimeRange', inputVars); +} +listShiftRolesByShiftIdAndTimeRangeRef.operationName = 'listShiftRolesByShiftIdAndTimeRange'; +exports.listShiftRolesByShiftIdAndTimeRangeRef = listShiftRolesByShiftIdAndTimeRangeRef; + +exports.listShiftRolesByShiftIdAndTimeRange = function listShiftRolesByShiftIdAndTimeRange(dcOrVars, vars) { + return executeQuery(listShiftRolesByShiftIdAndTimeRangeRef(dcOrVars, vars)); +}; + +const listShiftRolesByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByVendorId', inputVars); +} +listShiftRolesByVendorIdRef.operationName = 'listShiftRolesByVendorId'; +exports.listShiftRolesByVendorIdRef = listShiftRolesByVendorIdRef; + +exports.listShiftRolesByVendorId = function listShiftRolesByVendorId(dcOrVars, vars) { + return executeQuery(listShiftRolesByVendorIdRef(dcOrVars, vars)); +}; + +const listShiftRolesByBusinessAndDateRangeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByBusinessAndDateRange', inputVars); +} +listShiftRolesByBusinessAndDateRangeRef.operationName = 'listShiftRolesByBusinessAndDateRange'; +exports.listShiftRolesByBusinessAndDateRangeRef = listShiftRolesByBusinessAndDateRangeRef; + +exports.listShiftRolesByBusinessAndDateRange = function listShiftRolesByBusinessAndDateRange(dcOrVars, vars) { + return executeQuery(listShiftRolesByBusinessAndDateRangeRef(dcOrVars, vars)); +}; + +const listShiftRolesByBusinessAndOrderRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByBusinessAndOrder', inputVars); +} +listShiftRolesByBusinessAndOrderRef.operationName = 'listShiftRolesByBusinessAndOrder'; +exports.listShiftRolesByBusinessAndOrderRef = listShiftRolesByBusinessAndOrderRef; + +exports.listShiftRolesByBusinessAndOrder = function listShiftRolesByBusinessAndOrder(dcOrVars, vars) { + return executeQuery(listShiftRolesByBusinessAndOrderRef(dcOrVars, vars)); +}; + +const listShiftRolesByBusinessDateRangeCompletedOrdersRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByBusinessDateRangeCompletedOrders', inputVars); +} +listShiftRolesByBusinessDateRangeCompletedOrdersRef.operationName = 'listShiftRolesByBusinessDateRangeCompletedOrders'; +exports.listShiftRolesByBusinessDateRangeCompletedOrdersRef = listShiftRolesByBusinessDateRangeCompletedOrdersRef; + +exports.listShiftRolesByBusinessDateRangeCompletedOrders = function listShiftRolesByBusinessDateRangeCompletedOrders(dcOrVars, vars) { + return executeQuery(listShiftRolesByBusinessDateRangeCompletedOrdersRef(dcOrVars, vars)); +}; + +const listShiftRolesByBusinessAndDatesSummaryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listShiftRolesByBusinessAndDatesSummary', inputVars); +} +listShiftRolesByBusinessAndDatesSummaryRef.operationName = 'listShiftRolesByBusinessAndDatesSummary'; +exports.listShiftRolesByBusinessAndDatesSummaryRef = listShiftRolesByBusinessAndDatesSummaryRef; + +exports.listShiftRolesByBusinessAndDatesSummary = function listShiftRolesByBusinessAndDatesSummary(dcOrVars, vars) { + return executeQuery(listShiftRolesByBusinessAndDatesSummaryRef(dcOrVars, vars)); +}; + +const getCompletedShiftsByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getCompletedShiftsByBusinessId', inputVars); +} +getCompletedShiftsByBusinessIdRef.operationName = 'getCompletedShiftsByBusinessId'; +exports.getCompletedShiftsByBusinessIdRef = getCompletedShiftsByBusinessIdRef; + +exports.getCompletedShiftsByBusinessId = function getCompletedShiftsByBusinessId(dcOrVars, vars) { + return executeQuery(getCompletedShiftsByBusinessIdRef(dcOrVars, vars)); +}; + +const createTaskCommentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTaskComment', inputVars); +} +createTaskCommentRef.operationName = 'createTaskComment'; +exports.createTaskCommentRef = createTaskCommentRef; + +exports.createTaskComment = function createTaskComment(dcOrVars, vars) { + return executeMutation(createTaskCommentRef(dcOrVars, vars)); +}; + +const updateTaskCommentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTaskComment', inputVars); +} +updateTaskCommentRef.operationName = 'updateTaskComment'; +exports.updateTaskCommentRef = updateTaskCommentRef; + +exports.updateTaskComment = function updateTaskComment(dcOrVars, vars) { + return executeMutation(updateTaskCommentRef(dcOrVars, vars)); +}; + +const deleteTaskCommentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTaskComment', inputVars); +} +deleteTaskCommentRef.operationName = 'deleteTaskComment'; +exports.deleteTaskCommentRef = deleteTaskCommentRef; + +exports.deleteTaskComment = function deleteTaskComment(dcOrVars, vars) { + return executeMutation(deleteTaskCommentRef(dcOrVars, vars)); +}; + +const listTaxFormsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTaxForms', inputVars); +} +listTaxFormsRef.operationName = 'listTaxForms'; +exports.listTaxFormsRef = listTaxFormsRef; + +exports.listTaxForms = function listTaxForms(dcOrVars, vars) { + return executeQuery(listTaxFormsRef(dcOrVars, vars)); +}; + +const getTaxFormByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTaxFormById', inputVars); +} +getTaxFormByIdRef.operationName = 'getTaxFormById'; +exports.getTaxFormByIdRef = getTaxFormByIdRef; + +exports.getTaxFormById = function getTaxFormById(dcOrVars, vars) { + return executeQuery(getTaxFormByIdRef(dcOrVars, vars)); +}; + +const getTaxFormsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTaxFormsByStaffId', inputVars); +} +getTaxFormsByStaffIdRef.operationName = 'getTaxFormsByStaffId'; +exports.getTaxFormsByStaffIdRef = getTaxFormsByStaffIdRef; + +exports.getTaxFormsByStaffId = function getTaxFormsByStaffId(dcOrVars, vars) { + return executeQuery(getTaxFormsByStaffIdRef(dcOrVars, vars)); +}; + +const listTaxFormsWhereRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTaxFormsWhere', inputVars); +} +listTaxFormsWhereRef.operationName = 'listTaxFormsWhere'; +exports.listTaxFormsWhereRef = listTaxFormsWhereRef; + +exports.listTaxFormsWhere = function listTaxFormsWhere(dcOrVars, vars) { + return executeQuery(listTaxFormsWhereRef(dcOrVars, vars)); +}; + +const createVendorBenefitPlanRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createVendorBenefitPlan', inputVars); +} +createVendorBenefitPlanRef.operationName = 'createVendorBenefitPlan'; +exports.createVendorBenefitPlanRef = createVendorBenefitPlanRef; + +exports.createVendorBenefitPlan = function createVendorBenefitPlan(dcOrVars, vars) { + return executeMutation(createVendorBenefitPlanRef(dcOrVars, vars)); +}; + +const updateVendorBenefitPlanRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateVendorBenefitPlan', inputVars); +} +updateVendorBenefitPlanRef.operationName = 'updateVendorBenefitPlan'; +exports.updateVendorBenefitPlanRef = updateVendorBenefitPlanRef; + +exports.updateVendorBenefitPlan = function updateVendorBenefitPlan(dcOrVars, vars) { + return executeMutation(updateVendorBenefitPlanRef(dcOrVars, vars)); +}; + +const deleteVendorBenefitPlanRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteVendorBenefitPlan', inputVars); +} +deleteVendorBenefitPlanRef.operationName = 'deleteVendorBenefitPlan'; +exports.deleteVendorBenefitPlanRef = deleteVendorBenefitPlanRef; + +exports.deleteVendorBenefitPlan = function deleteVendorBenefitPlan(dcOrVars, vars) { + return executeMutation(deleteVendorBenefitPlanRef(dcOrVars, vars)); +}; + +const listFaqDatasRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listFaqDatas'); +} +listFaqDatasRef.operationName = 'listFaqDatas'; +exports.listFaqDatasRef = listFaqDatasRef; + +exports.listFaqDatas = function listFaqDatas(dc) { + return executeQuery(listFaqDatasRef(dc)); +}; + +const getFaqDataByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getFaqDataById', inputVars); +} +getFaqDataByIdRef.operationName = 'getFaqDataById'; +exports.getFaqDataByIdRef = getFaqDataByIdRef; + +exports.getFaqDataById = function getFaqDataById(dcOrVars, vars) { + return executeQuery(getFaqDataByIdRef(dcOrVars, vars)); +}; + +const filterFaqDatasRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterFaqDatas', inputVars); +} +filterFaqDatasRef.operationName = 'filterFaqDatas'; +exports.filterFaqDatasRef = filterFaqDatasRef; + +exports.filterFaqDatas = function filterFaqDatas(dcOrVars, vars) { + return executeQuery(filterFaqDatasRef(dcOrVars, vars)); +}; + +const createMessageRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createMessage', inputVars); +} +createMessageRef.operationName = 'createMessage'; +exports.createMessageRef = createMessageRef; + +exports.createMessage = function createMessage(dcOrVars, vars) { + return executeMutation(createMessageRef(dcOrVars, vars)); +}; + +const updateMessageRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateMessage', inputVars); +} +updateMessageRef.operationName = 'updateMessage'; +exports.updateMessageRef = updateMessageRef; + +exports.updateMessage = function updateMessage(dcOrVars, vars) { + return executeMutation(updateMessageRef(dcOrVars, vars)); +}; + +const deleteMessageRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteMessage', inputVars); +} +deleteMessageRef.operationName = 'deleteMessage'; +exports.deleteMessageRef = deleteMessageRef; + +exports.deleteMessage = function deleteMessage(dcOrVars, vars) { + return executeMutation(deleteMessageRef(dcOrVars, vars)); +}; + +const getStaffCourseByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffCourseById', inputVars); +} +getStaffCourseByIdRef.operationName = 'getStaffCourseById'; +exports.getStaffCourseByIdRef = getStaffCourseByIdRef; + +exports.getStaffCourseById = function getStaffCourseById(dcOrVars, vars) { + return executeQuery(getStaffCourseByIdRef(dcOrVars, vars)); +}; + +const listStaffCoursesByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffCoursesByStaffId', inputVars); +} +listStaffCoursesByStaffIdRef.operationName = 'listStaffCoursesByStaffId'; +exports.listStaffCoursesByStaffIdRef = listStaffCoursesByStaffIdRef; + +exports.listStaffCoursesByStaffId = function listStaffCoursesByStaffId(dcOrVars, vars) { + return executeQuery(listStaffCoursesByStaffIdRef(dcOrVars, vars)); +}; + +const listStaffCoursesByCourseIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffCoursesByCourseId', inputVars); +} +listStaffCoursesByCourseIdRef.operationName = 'listStaffCoursesByCourseId'; +exports.listStaffCoursesByCourseIdRef = listStaffCoursesByCourseIdRef; + +exports.listStaffCoursesByCourseId = function listStaffCoursesByCourseId(dcOrVars, vars) { + return executeQuery(listStaffCoursesByCourseIdRef(dcOrVars, vars)); +}; + +const getStaffCourseByStaffAndCourseRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffCourseByStaffAndCourse', inputVars); +} +getStaffCourseByStaffAndCourseRef.operationName = 'getStaffCourseByStaffAndCourse'; +exports.getStaffCourseByStaffAndCourseRef = getStaffCourseByStaffAndCourseRef; + +exports.getStaffCourseByStaffAndCourse = function getStaffCourseByStaffAndCourse(dcOrVars, vars) { + return executeQuery(getStaffCourseByStaffAndCourseRef(dcOrVars, vars)); +}; + +const createWorkforceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createWorkforce', inputVars); +} +createWorkforceRef.operationName = 'createWorkforce'; +exports.createWorkforceRef = createWorkforceRef; + +exports.createWorkforce = function createWorkforce(dcOrVars, vars) { + return executeMutation(createWorkforceRef(dcOrVars, vars)); +}; + +const updateWorkforceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateWorkforce', inputVars); +} +updateWorkforceRef.operationName = 'updateWorkforce'; +exports.updateWorkforceRef = updateWorkforceRef; + +exports.updateWorkforce = function updateWorkforce(dcOrVars, vars) { + return executeMutation(updateWorkforceRef(dcOrVars, vars)); +}; + +const deactivateWorkforceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deactivateWorkforce', inputVars); +} +deactivateWorkforceRef.operationName = 'deactivateWorkforce'; +exports.deactivateWorkforceRef = deactivateWorkforceRef; + +exports.deactivateWorkforce = function deactivateWorkforce(dcOrVars, vars) { + return executeMutation(deactivateWorkforceRef(dcOrVars, vars)); +}; + +const listActivityLogsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listActivityLogs', inputVars); +} +listActivityLogsRef.operationName = 'listActivityLogs'; +exports.listActivityLogsRef = listActivityLogsRef; + +exports.listActivityLogs = function listActivityLogs(dcOrVars, vars) { + return executeQuery(listActivityLogsRef(dcOrVars, vars)); +}; + +const getActivityLogByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getActivityLogById', inputVars); +} +getActivityLogByIdRef.operationName = 'getActivityLogById'; +exports.getActivityLogByIdRef = getActivityLogByIdRef; + +exports.getActivityLogById = function getActivityLogById(dcOrVars, vars) { + return executeQuery(getActivityLogByIdRef(dcOrVars, vars)); +}; + +const listActivityLogsByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listActivityLogsByUserId', inputVars); +} +listActivityLogsByUserIdRef.operationName = 'listActivityLogsByUserId'; +exports.listActivityLogsByUserIdRef = listActivityLogsByUserIdRef; + +exports.listActivityLogsByUserId = function listActivityLogsByUserId(dcOrVars, vars) { + return executeQuery(listActivityLogsByUserIdRef(dcOrVars, vars)); +}; + +const listUnreadActivityLogsByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listUnreadActivityLogsByUserId', inputVars); +} +listUnreadActivityLogsByUserIdRef.operationName = 'listUnreadActivityLogsByUserId'; +exports.listUnreadActivityLogsByUserIdRef = listUnreadActivityLogsByUserIdRef; + +exports.listUnreadActivityLogsByUserId = function listUnreadActivityLogsByUserId(dcOrVars, vars) { + return executeQuery(listUnreadActivityLogsByUserIdRef(dcOrVars, vars)); +}; + +const filterActivityLogsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterActivityLogs', inputVars); +} +filterActivityLogsRef.operationName = 'filterActivityLogs'; +exports.filterActivityLogsRef = filterActivityLogsRef; + +exports.filterActivityLogs = function filterActivityLogs(dcOrVars, vars) { + return executeQuery(filterActivityLogsRef(dcOrVars, vars)); +}; + +const listBenefitsDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listBenefitsData', inputVars); +} +listBenefitsDataRef.operationName = 'listBenefitsData'; +exports.listBenefitsDataRef = listBenefitsDataRef; + +exports.listBenefitsData = function listBenefitsData(dcOrVars, vars) { + return executeQuery(listBenefitsDataRef(dcOrVars, vars)); +}; + +const getBenefitsDataByKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getBenefitsDataByKey', inputVars); +} +getBenefitsDataByKeyRef.operationName = 'getBenefitsDataByKey'; +exports.getBenefitsDataByKeyRef = getBenefitsDataByKeyRef; + +exports.getBenefitsDataByKey = function getBenefitsDataByKey(dcOrVars, vars) { + return executeQuery(getBenefitsDataByKeyRef(dcOrVars, vars)); +}; + +const listBenefitsDataByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listBenefitsDataByStaffId', inputVars); +} +listBenefitsDataByStaffIdRef.operationName = 'listBenefitsDataByStaffId'; +exports.listBenefitsDataByStaffIdRef = listBenefitsDataByStaffIdRef; + +exports.listBenefitsDataByStaffId = function listBenefitsDataByStaffId(dcOrVars, vars) { + return executeQuery(listBenefitsDataByStaffIdRef(dcOrVars, vars)); +}; + +const listBenefitsDataByVendorBenefitPlanIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listBenefitsDataByVendorBenefitPlanId', inputVars); +} +listBenefitsDataByVendorBenefitPlanIdRef.operationName = 'listBenefitsDataByVendorBenefitPlanId'; +exports.listBenefitsDataByVendorBenefitPlanIdRef = listBenefitsDataByVendorBenefitPlanIdRef; + +exports.listBenefitsDataByVendorBenefitPlanId = function listBenefitsDataByVendorBenefitPlanId(dcOrVars, vars) { + return executeQuery(listBenefitsDataByVendorBenefitPlanIdRef(dcOrVars, vars)); +}; + +const listBenefitsDataByVendorBenefitPlanIdsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listBenefitsDataByVendorBenefitPlanIds', inputVars); +} +listBenefitsDataByVendorBenefitPlanIdsRef.operationName = 'listBenefitsDataByVendorBenefitPlanIds'; +exports.listBenefitsDataByVendorBenefitPlanIdsRef = listBenefitsDataByVendorBenefitPlanIdsRef; + +exports.listBenefitsDataByVendorBenefitPlanIds = function listBenefitsDataByVendorBenefitPlanIds(dcOrVars, vars) { + return executeQuery(listBenefitsDataByVendorBenefitPlanIdsRef(dcOrVars, vars)); +}; + +const createFaqDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createFaqData', inputVars); +} +createFaqDataRef.operationName = 'createFaqData'; +exports.createFaqDataRef = createFaqDataRef; + +exports.createFaqData = function createFaqData(dcOrVars, vars) { + return executeMutation(createFaqDataRef(dcOrVars, vars)); +}; + +const updateFaqDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateFaqData', inputVars); +} +updateFaqDataRef.operationName = 'updateFaqData'; +exports.updateFaqDataRef = updateFaqDataRef; + +exports.updateFaqData = function updateFaqData(dcOrVars, vars) { + return executeMutation(updateFaqDataRef(dcOrVars, vars)); +}; + +const deleteFaqDataRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteFaqData', inputVars); +} +deleteFaqDataRef.operationName = 'deleteFaqData'; +exports.deleteFaqDataRef = deleteFaqDataRef; + +exports.deleteFaqData = function deleteFaqData(dcOrVars, vars) { + return executeMutation(deleteFaqDataRef(dcOrVars, vars)); +}; + +const createInvoiceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createInvoice', inputVars); +} +createInvoiceRef.operationName = 'createInvoice'; +exports.createInvoiceRef = createInvoiceRef; + +exports.createInvoice = function createInvoice(dcOrVars, vars) { + return executeMutation(createInvoiceRef(dcOrVars, vars)); +}; + +const updateInvoiceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateInvoice', inputVars); +} +updateInvoiceRef.operationName = 'updateInvoice'; +exports.updateInvoiceRef = updateInvoiceRef; + +exports.updateInvoice = function updateInvoice(dcOrVars, vars) { + return executeMutation(updateInvoiceRef(dcOrVars, vars)); +}; + +const deleteInvoiceRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteInvoice', inputVars); +} +deleteInvoiceRef.operationName = 'deleteInvoice'; +exports.deleteInvoiceRef = deleteInvoiceRef; + +exports.deleteInvoice = function deleteInvoice(dcOrVars, vars) { + return executeMutation(deleteInvoiceRef(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 getStaffByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffById', inputVars); +} +getStaffByIdRef.operationName = 'getStaffById'; +exports.getStaffByIdRef = getStaffByIdRef; + +exports.getStaffById = function getStaffById(dcOrVars, vars) { + return executeQuery(getStaffByIdRef(dcOrVars, vars)); +}; + +const getStaffByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffByUserId', inputVars); +} +getStaffByUserIdRef.operationName = 'getStaffByUserId'; +exports.getStaffByUserIdRef = getStaffByUserIdRef; + +exports.getStaffByUserId = function getStaffByUserId(dcOrVars, vars) { + return executeQuery(getStaffByUserIdRef(dcOrVars, vars)); +}; + +const filterStaffRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterStaff', inputVars); +} +filterStaffRef.operationName = 'filterStaff'; +exports.filterStaffRef = filterStaffRef; + +exports.filterStaff = function filterStaff(dcOrVars, vars) { + return executeQuery(filterStaffRef(dcOrVars, vars)); +}; + +const listTasksRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTasks'); +} +listTasksRef.operationName = 'listTasks'; +exports.listTasksRef = listTasksRef; + +exports.listTasks = function listTasks(dc) { + return executeQuery(listTasksRef(dc)); +}; + +const getTaskByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTaskById', inputVars); +} +getTaskByIdRef.operationName = 'getTaskById'; +exports.getTaskByIdRef = getTaskByIdRef; + +exports.getTaskById = function getTaskById(dcOrVars, vars) { + return executeQuery(getTaskByIdRef(dcOrVars, vars)); +}; + +const getTasksByOwnerIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTasksByOwnerId', inputVars); +} +getTasksByOwnerIdRef.operationName = 'getTasksByOwnerId'; +exports.getTasksByOwnerIdRef = getTasksByOwnerIdRef; + +exports.getTasksByOwnerId = function getTasksByOwnerId(dcOrVars, vars) { + return executeQuery(getTasksByOwnerIdRef(dcOrVars, vars)); +}; + +const filterTasksRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterTasks', inputVars); +} +filterTasksRef.operationName = 'filterTasks'; +exports.filterTasksRef = filterTasksRef; + +exports.filterTasks = function filterTasks(dcOrVars, vars) { + return executeQuery(filterTasksRef(dcOrVars, vars)); +}; + +const createTeamHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTeamHub', inputVars); +} +createTeamHubRef.operationName = 'createTeamHub'; +exports.createTeamHubRef = createTeamHubRef; + +exports.createTeamHub = function createTeamHub(dcOrVars, vars) { + return executeMutation(createTeamHubRef(dcOrVars, vars)); +}; + +const updateTeamHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTeamHub', inputVars); +} +updateTeamHubRef.operationName = 'updateTeamHub'; +exports.updateTeamHubRef = updateTeamHubRef; + +exports.updateTeamHub = function updateTeamHub(dcOrVars, vars) { + return executeMutation(updateTeamHubRef(dcOrVars, vars)); +}; + +const deleteTeamHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTeamHub', inputVars); +} +deleteTeamHubRef.operationName = 'deleteTeamHub'; +exports.deleteTeamHubRef = deleteTeamHubRef; + +exports.deleteTeamHub = function deleteTeamHub(dcOrVars, vars) { + return executeMutation(deleteTeamHubRef(dcOrVars, vars)); +}; + +const listTeamHubsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTeamHubs', inputVars); +} +listTeamHubsRef.operationName = 'listTeamHubs'; +exports.listTeamHubsRef = listTeamHubsRef; + +exports.listTeamHubs = function listTeamHubs(dcOrVars, vars) { + return executeQuery(listTeamHubsRef(dcOrVars, vars)); +}; + +const getTeamHubByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamHubById', inputVars); +} +getTeamHubByIdRef.operationName = 'getTeamHubById'; +exports.getTeamHubByIdRef = getTeamHubByIdRef; + +exports.getTeamHubById = function getTeamHubById(dcOrVars, vars) { + return executeQuery(getTeamHubByIdRef(dcOrVars, vars)); +}; + +const getTeamHubsByTeamIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamHubsByTeamId', inputVars); +} +getTeamHubsByTeamIdRef.operationName = 'getTeamHubsByTeamId'; +exports.getTeamHubsByTeamIdRef = getTeamHubsByTeamIdRef; + +exports.getTeamHubsByTeamId = function getTeamHubsByTeamId(dcOrVars, vars) { + return executeQuery(getTeamHubsByTeamIdRef(dcOrVars, vars)); +}; + +const listTeamHubsByOwnerIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTeamHubsByOwnerId', inputVars); +} +listTeamHubsByOwnerIdRef.operationName = 'listTeamHubsByOwnerId'; +exports.listTeamHubsByOwnerIdRef = listTeamHubsByOwnerIdRef; + +exports.listTeamHubsByOwnerId = function listTeamHubsByOwnerId(dcOrVars, vars) { + return executeQuery(listTeamHubsByOwnerIdRef(dcOrVars, vars)); +}; + +const listClientFeedbacksRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listClientFeedbacks', inputVars); +} +listClientFeedbacksRef.operationName = 'listClientFeedbacks'; +exports.listClientFeedbacksRef = listClientFeedbacksRef; + +exports.listClientFeedbacks = function listClientFeedbacks(dcOrVars, vars) { + return executeQuery(listClientFeedbacksRef(dcOrVars, vars)); +}; + +const getClientFeedbackByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getClientFeedbackById', inputVars); +} +getClientFeedbackByIdRef.operationName = 'getClientFeedbackById'; +exports.getClientFeedbackByIdRef = getClientFeedbackByIdRef; + +exports.getClientFeedbackById = function getClientFeedbackById(dcOrVars, vars) { + return executeQuery(getClientFeedbackByIdRef(dcOrVars, vars)); +}; + +const listClientFeedbacksByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listClientFeedbacksByBusinessId', inputVars); +} +listClientFeedbacksByBusinessIdRef.operationName = 'listClientFeedbacksByBusinessId'; +exports.listClientFeedbacksByBusinessIdRef = listClientFeedbacksByBusinessIdRef; + +exports.listClientFeedbacksByBusinessId = function listClientFeedbacksByBusinessId(dcOrVars, vars) { + return executeQuery(listClientFeedbacksByBusinessIdRef(dcOrVars, vars)); +}; + +const listClientFeedbacksByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listClientFeedbacksByVendorId', inputVars); +} +listClientFeedbacksByVendorIdRef.operationName = 'listClientFeedbacksByVendorId'; +exports.listClientFeedbacksByVendorIdRef = listClientFeedbacksByVendorIdRef; + +exports.listClientFeedbacksByVendorId = function listClientFeedbacksByVendorId(dcOrVars, vars) { + return executeQuery(listClientFeedbacksByVendorIdRef(dcOrVars, vars)); +}; + +const listClientFeedbacksByBusinessAndVendorRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listClientFeedbacksByBusinessAndVendor', inputVars); +} +listClientFeedbacksByBusinessAndVendorRef.operationName = 'listClientFeedbacksByBusinessAndVendor'; +exports.listClientFeedbacksByBusinessAndVendorRef = listClientFeedbacksByBusinessAndVendorRef; + +exports.listClientFeedbacksByBusinessAndVendor = function listClientFeedbacksByBusinessAndVendor(dcOrVars, vars) { + return executeQuery(listClientFeedbacksByBusinessAndVendorRef(dcOrVars, vars)); +}; + +const filterClientFeedbacksRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterClientFeedbacks', inputVars); +} +filterClientFeedbacksRef.operationName = 'filterClientFeedbacks'; +exports.filterClientFeedbacksRef = filterClientFeedbacksRef; + +exports.filterClientFeedbacks = function filterClientFeedbacks(dcOrVars, vars) { + return executeQuery(filterClientFeedbacksRef(dcOrVars, vars)); +}; + +const listClientFeedbackRatingsByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listClientFeedbackRatingsByVendorId', inputVars); +} +listClientFeedbackRatingsByVendorIdRef.operationName = 'listClientFeedbackRatingsByVendorId'; +exports.listClientFeedbackRatingsByVendorIdRef = listClientFeedbackRatingsByVendorIdRef; + +exports.listClientFeedbackRatingsByVendorId = function listClientFeedbackRatingsByVendorId(dcOrVars, vars) { + return executeQuery(listClientFeedbackRatingsByVendorIdRef(dcOrVars, vars)); +}; + +const createHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createHub', inputVars); +} +createHubRef.operationName = 'createHub'; +exports.createHubRef = createHubRef; + +exports.createHub = function createHub(dcOrVars, vars) { + return executeMutation(createHubRef(dcOrVars, vars)); +}; + +const updateHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateHub', inputVars); +} +updateHubRef.operationName = 'updateHub'; +exports.updateHubRef = updateHubRef; + +exports.updateHub = function updateHub(dcOrVars, vars) { + return executeMutation(updateHubRef(dcOrVars, vars)); +}; + +const deleteHubRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteHub', inputVars); +} +deleteHubRef.operationName = 'deleteHub'; +exports.deleteHubRef = deleteHubRef; + +exports.deleteHub = function deleteHub(dcOrVars, vars) { + return executeMutation(deleteHubRef(dcOrVars, vars)); +}; + +const createRoleCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createRoleCategory', inputVars); +} +createRoleCategoryRef.operationName = 'createRoleCategory'; +exports.createRoleCategoryRef = createRoleCategoryRef; + +exports.createRoleCategory = function createRoleCategory(dcOrVars, vars) { + return executeMutation(createRoleCategoryRef(dcOrVars, vars)); +}; + +const updateRoleCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateRoleCategory', inputVars); +} +updateRoleCategoryRef.operationName = 'updateRoleCategory'; +exports.updateRoleCategoryRef = updateRoleCategoryRef; + +exports.updateRoleCategory = function updateRoleCategory(dcOrVars, vars) { + return executeMutation(updateRoleCategoryRef(dcOrVars, vars)); +}; + +const deleteRoleCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteRoleCategory', inputVars); +} +deleteRoleCategoryRef.operationName = 'deleteRoleCategory'; +exports.deleteRoleCategoryRef = deleteRoleCategoryRef; + +exports.deleteRoleCategory = function deleteRoleCategory(dcOrVars, vars) { + return executeMutation(deleteRoleCategoryRef(dcOrVars, vars)); +}; + +const createStaffAvailabilityStatsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createStaffAvailabilityStats', inputVars); +} +createStaffAvailabilityStatsRef.operationName = 'createStaffAvailabilityStats'; +exports.createStaffAvailabilityStatsRef = createStaffAvailabilityStatsRef; + +exports.createStaffAvailabilityStats = function createStaffAvailabilityStats(dcOrVars, vars) { + return executeMutation(createStaffAvailabilityStatsRef(dcOrVars, vars)); +}; + +const updateStaffAvailabilityStatsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateStaffAvailabilityStats', inputVars); +} +updateStaffAvailabilityStatsRef.operationName = 'updateStaffAvailabilityStats'; +exports.updateStaffAvailabilityStatsRef = updateStaffAvailabilityStatsRef; + +exports.updateStaffAvailabilityStats = function updateStaffAvailabilityStats(dcOrVars, vars) { + return executeMutation(updateStaffAvailabilityStatsRef(dcOrVars, vars)); +}; + +const deleteStaffAvailabilityStatsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteStaffAvailabilityStats', inputVars); +} +deleteStaffAvailabilityStatsRef.operationName = 'deleteStaffAvailabilityStats'; +exports.deleteStaffAvailabilityStatsRef = deleteStaffAvailabilityStatsRef; + +exports.deleteStaffAvailabilityStats = function deleteStaffAvailabilityStats(dcOrVars, vars) { + return executeMutation(deleteStaffAvailabilityStatsRef(dcOrVars, vars)); +}; + +const listUsersRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listUsers'); +} +listUsersRef.operationName = 'listUsers'; +exports.listUsersRef = listUsersRef; + +exports.listUsers = function listUsers(dc) { + return executeQuery(listUsersRef(dc)); +}; + +const getUserByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getUserById', inputVars); +} +getUserByIdRef.operationName = 'getUserById'; +exports.getUserByIdRef = getUserByIdRef; + +exports.getUserById = function getUserById(dcOrVars, vars) { + return executeQuery(getUserByIdRef(dcOrVars, vars)); +}; + +const filterUsersRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterUsers', inputVars); +} +filterUsersRef.operationName = 'filterUsers'; +exports.filterUsersRef = filterUsersRef; + +exports.filterUsers = function filterUsers(dcOrVars, vars) { + return executeQuery(filterUsersRef(dcOrVars, vars)); +}; + +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 getVendorByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getVendorByUserId', inputVars); +} +getVendorByUserIdRef.operationName = 'getVendorByUserId'; +exports.getVendorByUserIdRef = getVendorByUserIdRef; + +exports.getVendorByUserId = function getVendorByUserId(dcOrVars, vars) { + return executeQuery(getVendorByUserIdRef(dcOrVars, vars)); +}; + +const listVendorsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listVendors'); +} +listVendorsRef.operationName = 'listVendors'; +exports.listVendorsRef = listVendorsRef; + +exports.listVendors = function listVendors(dc) { + return executeQuery(listVendorsRef(dc)); +}; + +const listCategoriesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listCategories'); +} +listCategoriesRef.operationName = 'listCategories'; +exports.listCategoriesRef = listCategoriesRef; + +exports.listCategories = function listCategories(dc) { + return executeQuery(listCategoriesRef(dc)); +}; + +const getCategoryByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getCategoryById', inputVars); +} +getCategoryByIdRef.operationName = 'getCategoryById'; +exports.getCategoryByIdRef = getCategoryByIdRef; + +exports.getCategoryById = function getCategoryById(dcOrVars, vars) { + return executeQuery(getCategoryByIdRef(dcOrVars, vars)); +}; + +const filterCategoriesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterCategories', inputVars); +} +filterCategoriesRef.operationName = 'filterCategories'; +exports.filterCategoriesRef = filterCategoriesRef; + +exports.filterCategories = function filterCategories(dcOrVars, vars) { + return executeQuery(filterCategoriesRef(dcOrVars, vars)); +}; + +const listMessagesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listMessages'); +} +listMessagesRef.operationName = 'listMessages'; +exports.listMessagesRef = listMessagesRef; + +exports.listMessages = function listMessages(dc) { + return executeQuery(listMessagesRef(dc)); +}; + +const getMessageByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getMessageById', inputVars); +} +getMessageByIdRef.operationName = 'getMessageById'; +exports.getMessageByIdRef = getMessageByIdRef; + +exports.getMessageById = function getMessageById(dcOrVars, vars) { + return executeQuery(getMessageByIdRef(dcOrVars, vars)); +}; + +const getMessagesByConversationIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getMessagesByConversationId', inputVars); +} +getMessagesByConversationIdRef.operationName = 'getMessagesByConversationId'; +exports.getMessagesByConversationIdRef = getMessagesByConversationIdRef; + +exports.getMessagesByConversationId = function getMessagesByConversationId(dcOrVars, vars) { + return executeQuery(getMessagesByConversationIdRef(dcOrVars, vars)); +}; + +const createShiftRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createShiftRole', inputVars); +} +createShiftRoleRef.operationName = 'createShiftRole'; +exports.createShiftRoleRef = createShiftRoleRef; + +exports.createShiftRole = function createShiftRole(dcOrVars, vars) { + return executeMutation(createShiftRoleRef(dcOrVars, vars)); +}; + +const updateShiftRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateShiftRole', inputVars); +} +updateShiftRoleRef.operationName = 'updateShiftRole'; +exports.updateShiftRoleRef = updateShiftRoleRef; + +exports.updateShiftRole = function updateShiftRole(dcOrVars, vars) { + return executeMutation(updateShiftRoleRef(dcOrVars, vars)); +}; + +const deleteShiftRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteShiftRole', inputVars); +} +deleteShiftRoleRef.operationName = 'deleteShiftRole'; +exports.deleteShiftRoleRef = deleteShiftRoleRef; + +exports.deleteShiftRole = function deleteShiftRole(dcOrVars, vars) { + return executeMutation(deleteShiftRoleRef(dcOrVars, vars)); +}; + +const createStaffRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createStaffRole', inputVars); +} +createStaffRoleRef.operationName = 'createStaffRole'; +exports.createStaffRoleRef = createStaffRoleRef; + +exports.createStaffRole = function createStaffRole(dcOrVars, vars) { + return executeMutation(createStaffRoleRef(dcOrVars, vars)); +}; + +const deleteStaffRoleRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteStaffRole', inputVars); +} +deleteStaffRoleRef.operationName = 'deleteStaffRole'; +exports.deleteStaffRoleRef = deleteStaffRoleRef; + +exports.deleteStaffRole = function deleteStaffRole(dcOrVars, vars) { + return executeMutation(deleteStaffRoleRef(dcOrVars, vars)); +}; + +const listUserConversationsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listUserConversations', inputVars); +} +listUserConversationsRef.operationName = 'listUserConversations'; +exports.listUserConversationsRef = listUserConversationsRef; + +exports.listUserConversations = function listUserConversations(dcOrVars, vars) { + return executeQuery(listUserConversationsRef(dcOrVars, vars)); +}; + +const getUserConversationByKeyRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getUserConversationByKey', inputVars); +} +getUserConversationByKeyRef.operationName = 'getUserConversationByKey'; +exports.getUserConversationByKeyRef = getUserConversationByKeyRef; + +exports.getUserConversationByKey = function getUserConversationByKey(dcOrVars, vars) { + return executeQuery(getUserConversationByKeyRef(dcOrVars, vars)); +}; + +const listUserConversationsByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listUserConversationsByUserId', inputVars); +} +listUserConversationsByUserIdRef.operationName = 'listUserConversationsByUserId'; +exports.listUserConversationsByUserIdRef = listUserConversationsByUserIdRef; + +exports.listUserConversationsByUserId = function listUserConversationsByUserId(dcOrVars, vars) { + return executeQuery(listUserConversationsByUserIdRef(dcOrVars, vars)); +}; + +const listUnreadUserConversationsByUserIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listUnreadUserConversationsByUserId', inputVars); +} +listUnreadUserConversationsByUserIdRef.operationName = 'listUnreadUserConversationsByUserId'; +exports.listUnreadUserConversationsByUserIdRef = listUnreadUserConversationsByUserIdRef; + +exports.listUnreadUserConversationsByUserId = function listUnreadUserConversationsByUserId(dcOrVars, vars) { + return executeQuery(listUnreadUserConversationsByUserIdRef(dcOrVars, vars)); +}; + +const listUserConversationsByConversationIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listUserConversationsByConversationId', inputVars); +} +listUserConversationsByConversationIdRef.operationName = 'listUserConversationsByConversationId'; +exports.listUserConversationsByConversationIdRef = listUserConversationsByConversationIdRef; + +exports.listUserConversationsByConversationId = function listUserConversationsByConversationId(dcOrVars, vars) { + return executeQuery(listUserConversationsByConversationIdRef(dcOrVars, vars)); +}; + +const filterUserConversationsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterUserConversations', inputVars); +} +filterUserConversationsRef.operationName = 'filterUserConversations'; +exports.filterUserConversationsRef = filterUserConversationsRef; + +exports.filterUserConversations = function filterUserConversations(dcOrVars, vars) { + return executeQuery(filterUserConversationsRef(dcOrVars, vars)); +}; + +const createAccountRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createAccount', inputVars); +} +createAccountRef.operationName = 'createAccount'; +exports.createAccountRef = createAccountRef; + +exports.createAccount = function createAccount(dcOrVars, vars) { + return executeMutation(createAccountRef(dcOrVars, vars)); +}; + +const updateAccountRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateAccount', inputVars); +} +updateAccountRef.operationName = 'updateAccount'; +exports.updateAccountRef = updateAccountRef; + +exports.updateAccount = function updateAccount(dcOrVars, vars) { + return executeMutation(updateAccountRef(dcOrVars, vars)); +}; + +const deleteAccountRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteAccount', inputVars); +} +deleteAccountRef.operationName = 'deleteAccount'; +exports.deleteAccountRef = deleteAccountRef; + +exports.deleteAccount = function deleteAccount(dcOrVars, vars) { + return executeMutation(deleteAccountRef(dcOrVars, vars)); +}; + +const createApplicationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createApplication', inputVars); +} +createApplicationRef.operationName = 'createApplication'; +exports.createApplicationRef = createApplicationRef; + +exports.createApplication = function createApplication(dcOrVars, vars) { + return executeMutation(createApplicationRef(dcOrVars, vars)); +}; + +const updateApplicationStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateApplicationStatus', inputVars); +} +updateApplicationStatusRef.operationName = 'updateApplicationStatus'; +exports.updateApplicationStatusRef = updateApplicationStatusRef; + +exports.updateApplicationStatus = function updateApplicationStatus(dcOrVars, vars) { + return executeMutation(updateApplicationStatusRef(dcOrVars, vars)); +}; + +const deleteApplicationRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteApplication', inputVars); +} +deleteApplicationRef.operationName = 'deleteApplication'; +exports.deleteApplicationRef = deleteApplicationRef; + +exports.deleteApplication = function deleteApplication(dcOrVars, vars) { + return executeMutation(deleteApplicationRef(dcOrVars, vars)); +}; + +const createAssignmentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'CreateAssignment', inputVars); +} +createAssignmentRef.operationName = 'CreateAssignment'; +exports.createAssignmentRef = createAssignmentRef; + +exports.createAssignment = function createAssignment(dcOrVars, vars) { + return executeMutation(createAssignmentRef(dcOrVars, vars)); +}; + +const updateAssignmentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'UpdateAssignment', inputVars); +} +updateAssignmentRef.operationName = 'UpdateAssignment'; +exports.updateAssignmentRef = updateAssignmentRef; + +exports.updateAssignment = function updateAssignment(dcOrVars, vars) { + return executeMutation(updateAssignmentRef(dcOrVars, vars)); +}; + +const deleteAssignmentRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'DeleteAssignment', inputVars); +} +deleteAssignmentRef.operationName = 'DeleteAssignment'; +exports.deleteAssignmentRef = deleteAssignmentRef; + +exports.deleteAssignment = function deleteAssignment(dcOrVars, vars) { + return executeMutation(deleteAssignmentRef(dcOrVars, vars)); +}; + +const listHubsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listHubs'); +} +listHubsRef.operationName = 'listHubs'; +exports.listHubsRef = listHubsRef; + +exports.listHubs = function listHubs(dc) { + return executeQuery(listHubsRef(dc)); +}; + +const getHubByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getHubById', inputVars); +} +getHubByIdRef.operationName = 'getHubById'; +exports.getHubByIdRef = getHubByIdRef; + +exports.getHubById = function getHubById(dcOrVars, vars) { + return executeQuery(getHubByIdRef(dcOrVars, vars)); +}; + +const getHubsByOwnerIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getHubsByOwnerId', inputVars); +} +getHubsByOwnerIdRef.operationName = 'getHubsByOwnerId'; +exports.getHubsByOwnerIdRef = getHubsByOwnerIdRef; + +exports.getHubsByOwnerId = function getHubsByOwnerId(dcOrVars, vars) { + return executeQuery(getHubsByOwnerIdRef(dcOrVars, vars)); +}; + +const filterHubsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterHubs', inputVars); +} +filterHubsRef.operationName = 'filterHubs'; +exports.filterHubsRef = filterHubsRef; + +exports.filterHubs = function filterHubs(dcOrVars, vars) { + return executeQuery(filterHubsRef(dcOrVars, vars)); +}; + +const listInvoicesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoices', inputVars); +} +listInvoicesRef.operationName = 'listInvoices'; +exports.listInvoicesRef = listInvoicesRef; + +exports.listInvoices = function listInvoices(dcOrVars, vars) { + return executeQuery(listInvoicesRef(dcOrVars, vars)); +}; + +const getInvoiceByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getInvoiceById', inputVars); +} +getInvoiceByIdRef.operationName = 'getInvoiceById'; +exports.getInvoiceByIdRef = getInvoiceByIdRef; + +exports.getInvoiceById = function getInvoiceById(dcOrVars, vars) { + return executeQuery(getInvoiceByIdRef(dcOrVars, vars)); +}; + +const listInvoicesByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesByVendorId', inputVars); +} +listInvoicesByVendorIdRef.operationName = 'listInvoicesByVendorId'; +exports.listInvoicesByVendorIdRef = listInvoicesByVendorIdRef; + +exports.listInvoicesByVendorId = function listInvoicesByVendorId(dcOrVars, vars) { + return executeQuery(listInvoicesByVendorIdRef(dcOrVars, vars)); +}; + +const listInvoicesByBusinessIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesByBusinessId', inputVars); +} +listInvoicesByBusinessIdRef.operationName = 'listInvoicesByBusinessId'; +exports.listInvoicesByBusinessIdRef = listInvoicesByBusinessIdRef; + +exports.listInvoicesByBusinessId = function listInvoicesByBusinessId(dcOrVars, vars) { + return executeQuery(listInvoicesByBusinessIdRef(dcOrVars, vars)); +}; + +const listInvoicesByOrderIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesByOrderId', inputVars); +} +listInvoicesByOrderIdRef.operationName = 'listInvoicesByOrderId'; +exports.listInvoicesByOrderIdRef = listInvoicesByOrderIdRef; + +exports.listInvoicesByOrderId = function listInvoicesByOrderId(dcOrVars, vars) { + return executeQuery(listInvoicesByOrderIdRef(dcOrVars, vars)); +}; + +const listInvoicesByStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listInvoicesByStatus', inputVars); +} +listInvoicesByStatusRef.operationName = 'listInvoicesByStatus'; +exports.listInvoicesByStatusRef = listInvoicesByStatusRef; + +exports.listInvoicesByStatus = function listInvoicesByStatus(dcOrVars, vars) { + return executeQuery(listInvoicesByStatusRef(dcOrVars, vars)); +}; + +const filterInvoicesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterInvoices', inputVars); +} +filterInvoicesRef.operationName = 'filterInvoices'; +exports.filterInvoicesRef = filterInvoicesRef; + +exports.filterInvoices = function filterInvoices(dcOrVars, vars) { + return executeQuery(filterInvoicesRef(dcOrVars, vars)); +}; + +const listOverdueInvoicesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listOverdueInvoices', inputVars); +} +listOverdueInvoicesRef.operationName = 'listOverdueInvoices'; +exports.listOverdueInvoicesRef = listOverdueInvoicesRef; + +exports.listOverdueInvoices = function listOverdueInvoices(dcOrVars, vars) { + return executeQuery(listOverdueInvoicesRef(dcOrVars, vars)); +}; + +const createInvoiceTemplateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createInvoiceTemplate', inputVars); +} +createInvoiceTemplateRef.operationName = 'createInvoiceTemplate'; +exports.createInvoiceTemplateRef = createInvoiceTemplateRef; + +exports.createInvoiceTemplate = function createInvoiceTemplate(dcOrVars, vars) { + return executeMutation(createInvoiceTemplateRef(dcOrVars, vars)); +}; + +const updateInvoiceTemplateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateInvoiceTemplate', inputVars); +} +updateInvoiceTemplateRef.operationName = 'updateInvoiceTemplate'; +exports.updateInvoiceTemplateRef = updateInvoiceTemplateRef; + +exports.updateInvoiceTemplate = function updateInvoiceTemplate(dcOrVars, vars) { + return executeMutation(updateInvoiceTemplateRef(dcOrVars, vars)); +}; + +const deleteInvoiceTemplateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteInvoiceTemplate', inputVars); +} +deleteInvoiceTemplateRef.operationName = 'deleteInvoiceTemplate'; +exports.deleteInvoiceTemplateRef = deleteInvoiceTemplateRef; + +exports.deleteInvoiceTemplate = function deleteInvoiceTemplate(dcOrVars, vars) { + return executeMutation(deleteInvoiceTemplateRef(dcOrVars, vars)); +}; + +const createStaffAvailabilityRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createStaffAvailability', inputVars); +} +createStaffAvailabilityRef.operationName = 'createStaffAvailability'; +exports.createStaffAvailabilityRef = createStaffAvailabilityRef; + +exports.createStaffAvailability = function createStaffAvailability(dcOrVars, vars) { + return executeMutation(createStaffAvailabilityRef(dcOrVars, vars)); +}; + +const updateStaffAvailabilityRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateStaffAvailability', inputVars); +} +updateStaffAvailabilityRef.operationName = 'updateStaffAvailability'; +exports.updateStaffAvailabilityRef = updateStaffAvailabilityRef; + +exports.updateStaffAvailability = function updateStaffAvailability(dcOrVars, vars) { + return executeMutation(updateStaffAvailabilityRef(dcOrVars, vars)); +}; + +const deleteStaffAvailabilityRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteStaffAvailability', inputVars); +} +deleteStaffAvailabilityRef.operationName = 'deleteStaffAvailability'; +exports.deleteStaffAvailabilityRef = deleteStaffAvailabilityRef; + +exports.deleteStaffAvailability = function deleteStaffAvailability(dcOrVars, vars) { + return executeMutation(deleteStaffAvailabilityRef(dcOrVars, vars)); +}; + +const createTeamMemberRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTeamMember', inputVars); +} +createTeamMemberRef.operationName = 'createTeamMember'; +exports.createTeamMemberRef = createTeamMemberRef; + +exports.createTeamMember = function createTeamMember(dcOrVars, vars) { + return executeMutation(createTeamMemberRef(dcOrVars, vars)); +}; + +const updateTeamMemberRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTeamMember', inputVars); +} +updateTeamMemberRef.operationName = 'updateTeamMember'; +exports.updateTeamMemberRef = updateTeamMemberRef; + +exports.updateTeamMember = function updateTeamMember(dcOrVars, vars) { + return executeMutation(updateTeamMemberRef(dcOrVars, vars)); +}; + +const updateTeamMemberInviteStatusRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTeamMemberInviteStatus', inputVars); +} +updateTeamMemberInviteStatusRef.operationName = 'updateTeamMemberInviteStatus'; +exports.updateTeamMemberInviteStatusRef = updateTeamMemberInviteStatusRef; + +exports.updateTeamMemberInviteStatus = function updateTeamMemberInviteStatus(dcOrVars, vars) { + return executeMutation(updateTeamMemberInviteStatusRef(dcOrVars, vars)); +}; + +const acceptInviteByCodeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'acceptInviteByCode', inputVars); +} +acceptInviteByCodeRef.operationName = 'acceptInviteByCode'; +exports.acceptInviteByCodeRef = acceptInviteByCodeRef; + +exports.acceptInviteByCode = function acceptInviteByCode(dcOrVars, vars) { + return executeMutation(acceptInviteByCodeRef(dcOrVars, vars)); +}; + +const cancelInviteByCodeRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'cancelInviteByCode', inputVars); +} +cancelInviteByCodeRef.operationName = 'cancelInviteByCode'; +exports.cancelInviteByCodeRef = cancelInviteByCodeRef; + +exports.cancelInviteByCode = function cancelInviteByCode(dcOrVars, vars) { + return executeMutation(cancelInviteByCodeRef(dcOrVars, vars)); +}; + +const deleteTeamMemberRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTeamMember', inputVars); +} +deleteTeamMemberRef.operationName = 'deleteTeamMember'; +exports.deleteTeamMemberRef = deleteTeamMemberRef; + +exports.deleteTeamMember = function deleteTeamMember(dcOrVars, vars) { + return executeMutation(deleteTeamMemberRef(dcOrVars, vars)); +}; + +const listCoursesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listCourses'); +} +listCoursesRef.operationName = 'listCourses'; +exports.listCoursesRef = listCoursesRef; + +exports.listCourses = function listCourses(dc) { + return executeQuery(listCoursesRef(dc)); +}; + +const getCourseByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getCourseById', inputVars); +} +getCourseByIdRef.operationName = 'getCourseById'; +exports.getCourseByIdRef = getCourseByIdRef; + +exports.getCourseById = function getCourseById(dcOrVars, vars) { + return executeQuery(getCourseByIdRef(dcOrVars, vars)); +}; + +const filterCoursesRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterCourses', inputVars); +} +filterCoursesRef.operationName = 'filterCourses'; +exports.filterCoursesRef = filterCoursesRef; + +exports.filterCourses = function filterCourses(dcOrVars, vars) { + return executeQuery(filterCoursesRef(dcOrVars, vars)); +}; + +const createLevelRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createLevel', inputVars); +} +createLevelRef.operationName = 'createLevel'; +exports.createLevelRef = createLevelRef; + +exports.createLevel = function createLevel(dcOrVars, vars) { + return executeMutation(createLevelRef(dcOrVars, vars)); +}; + +const updateLevelRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateLevel', inputVars); +} +updateLevelRef.operationName = 'updateLevel'; +exports.updateLevelRef = updateLevelRef; + +exports.updateLevel = function updateLevel(dcOrVars, vars) { + return executeMutation(updateLevelRef(dcOrVars, vars)); +}; + +const deleteLevelRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteLevel', inputVars); +} +deleteLevelRef.operationName = 'deleteLevel'; +exports.deleteLevelRef = deleteLevelRef; + +exports.deleteLevel = function deleteLevel(dcOrVars, vars) { + return executeMutation(deleteLevelRef(dcOrVars, vars)); +}; + +const createOrderRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createOrder', inputVars); +} +createOrderRef.operationName = 'createOrder'; +exports.createOrderRef = createOrderRef; + +exports.createOrder = function createOrder(dcOrVars, vars) { + return executeMutation(createOrderRef(dcOrVars, vars)); +}; + +const updateOrderRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateOrder', inputVars); +} +updateOrderRef.operationName = 'updateOrder'; +exports.updateOrderRef = updateOrderRef; + +exports.updateOrder = function updateOrder(dcOrVars, vars) { + return executeMutation(updateOrderRef(dcOrVars, vars)); +}; + +const deleteOrderRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteOrder', inputVars); +} +deleteOrderRef.operationName = 'deleteOrder'; +exports.deleteOrderRef = deleteOrderRef; + +exports.deleteOrder = function deleteOrder(dcOrVars, vars) { + return executeMutation(deleteOrderRef(dcOrVars, vars)); +}; + +const listVendorRatesRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listVendorRates'); +} +listVendorRatesRef.operationName = 'listVendorRates'; +exports.listVendorRatesRef = listVendorRatesRef; + +exports.listVendorRates = function listVendorRates(dc) { + return executeQuery(listVendorRatesRef(dc)); +}; + +const getVendorRateByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getVendorRateById', inputVars); +} +getVendorRateByIdRef.operationName = 'getVendorRateById'; +exports.getVendorRateByIdRef = getVendorRateByIdRef; + +exports.getVendorRateById = function getVendorRateById(dcOrVars, vars) { + return executeQuery(getVendorRateByIdRef(dcOrVars, vars)); +}; + +const getWorkforceByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getWorkforceById', inputVars); +} +getWorkforceByIdRef.operationName = 'getWorkforceById'; +exports.getWorkforceByIdRef = getWorkforceByIdRef; + +exports.getWorkforceById = function getWorkforceById(dcOrVars, vars) { + return executeQuery(getWorkforceByIdRef(dcOrVars, vars)); +}; + +const getWorkforceByVendorAndStaffRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getWorkforceByVendorAndStaff', inputVars); +} +getWorkforceByVendorAndStaffRef.operationName = 'getWorkforceByVendorAndStaff'; +exports.getWorkforceByVendorAndStaffRef = getWorkforceByVendorAndStaffRef; + +exports.getWorkforceByVendorAndStaff = function getWorkforceByVendorAndStaff(dcOrVars, vars) { + return executeQuery(getWorkforceByVendorAndStaffRef(dcOrVars, vars)); +}; + +const listWorkforceByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listWorkforceByVendorId', inputVars); +} +listWorkforceByVendorIdRef.operationName = 'listWorkforceByVendorId'; +exports.listWorkforceByVendorIdRef = listWorkforceByVendorIdRef; + +exports.listWorkforceByVendorId = function listWorkforceByVendorId(dcOrVars, vars) { + return executeQuery(listWorkforceByVendorIdRef(dcOrVars, vars)); +}; + +const listWorkforceByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listWorkforceByStaffId', inputVars); +} +listWorkforceByStaffIdRef.operationName = 'listWorkforceByStaffId'; +exports.listWorkforceByStaffIdRef = listWorkforceByStaffIdRef; + +exports.listWorkforceByStaffId = function listWorkforceByStaffId(dcOrVars, vars) { + return executeQuery(listWorkforceByStaffIdRef(dcOrVars, vars)); +}; + +const getWorkforceByVendorAndNumberRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getWorkforceByVendorAndNumber', inputVars); +} +getWorkforceByVendorAndNumberRef.operationName = 'getWorkforceByVendorAndNumber'; +exports.getWorkforceByVendorAndNumberRef = getWorkforceByVendorAndNumberRef; + +exports.getWorkforceByVendorAndNumber = function getWorkforceByVendorAndNumber(dcOrVars, vars) { + return executeQuery(getWorkforceByVendorAndNumberRef(dcOrVars, vars)); +}; + +const createCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createCategory', inputVars); +} +createCategoryRef.operationName = 'createCategory'; +exports.createCategoryRef = createCategoryRef; + +exports.createCategory = function createCategory(dcOrVars, vars) { + return executeMutation(createCategoryRef(dcOrVars, vars)); +}; + +const updateCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateCategory', inputVars); +} +updateCategoryRef.operationName = 'updateCategory'; +exports.updateCategoryRef = updateCategoryRef; + +exports.updateCategory = function updateCategory(dcOrVars, vars) { + return executeMutation(updateCategoryRef(dcOrVars, vars)); +}; + +const deleteCategoryRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteCategory', inputVars); +} +deleteCategoryRef.operationName = 'deleteCategory'; +exports.deleteCategoryRef = deleteCategoryRef; + +exports.deleteCategory = function deleteCategory(dcOrVars, vars) { + return executeMutation(deleteCategoryRef(dcOrVars, vars)); +}; + +const listStaffAvailabilityStatsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listStaffAvailabilityStats', inputVars); +} +listStaffAvailabilityStatsRef.operationName = 'listStaffAvailabilityStats'; +exports.listStaffAvailabilityStatsRef = listStaffAvailabilityStatsRef; + +exports.listStaffAvailabilityStats = function listStaffAvailabilityStats(dcOrVars, vars) { + return executeQuery(listStaffAvailabilityStatsRef(dcOrVars, vars)); +}; + +const getStaffAvailabilityStatsByStaffIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getStaffAvailabilityStatsByStaffId', inputVars); +} +getStaffAvailabilityStatsByStaffIdRef.operationName = 'getStaffAvailabilityStatsByStaffId'; +exports.getStaffAvailabilityStatsByStaffIdRef = getStaffAvailabilityStatsByStaffIdRef; + +exports.getStaffAvailabilityStatsByStaffId = function getStaffAvailabilityStatsByStaffId(dcOrVars, vars) { + return executeQuery(getStaffAvailabilityStatsByStaffIdRef(dcOrVars, vars)); +}; + +const filterStaffAvailabilityStatsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterStaffAvailabilityStats', inputVars); +} +filterStaffAvailabilityStatsRef.operationName = 'filterStaffAvailabilityStats'; +exports.filterStaffAvailabilityStatsRef = filterStaffAvailabilityStatsRef; + +exports.filterStaffAvailabilityStats = function filterStaffAvailabilityStats(dcOrVars, vars) { + return executeQuery(filterStaffAvailabilityStatsRef(dcOrVars, vars)); +}; + +const createTaxFormRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createTaxForm', inputVars); +} +createTaxFormRef.operationName = 'createTaxForm'; +exports.createTaxFormRef = createTaxFormRef; + +exports.createTaxForm = function createTaxForm(dcOrVars, vars) { + return executeMutation(createTaxFormRef(dcOrVars, vars)); +}; + +const updateTaxFormRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateTaxForm', inputVars); +} +updateTaxFormRef.operationName = 'updateTaxForm'; +exports.updateTaxFormRef = updateTaxFormRef; + +exports.updateTaxForm = function updateTaxForm(dcOrVars, vars) { + return executeMutation(updateTaxFormRef(dcOrVars, vars)); +}; + +const deleteTaxFormRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteTaxForm', inputVars); +} +deleteTaxFormRef.operationName = 'deleteTaxForm'; +exports.deleteTaxFormRef = deleteTaxFormRef; + +exports.deleteTaxForm = function deleteTaxForm(dcOrVars, vars) { + return executeMutation(deleteTaxFormRef(dcOrVars, vars)); +}; + +const listTeamHudDepartmentsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTeamHudDepartments', inputVars); +} +listTeamHudDepartmentsRef.operationName = 'listTeamHudDepartments'; +exports.listTeamHudDepartmentsRef = listTeamHudDepartmentsRef; + +exports.listTeamHudDepartments = function listTeamHudDepartments(dcOrVars, vars) { + return executeQuery(listTeamHudDepartmentsRef(dcOrVars, vars)); +}; + +const getTeamHudDepartmentByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamHudDepartmentById', inputVars); +} +getTeamHudDepartmentByIdRef.operationName = 'getTeamHudDepartmentById'; +exports.getTeamHudDepartmentByIdRef = getTeamHudDepartmentByIdRef; + +exports.getTeamHudDepartmentById = function getTeamHudDepartmentById(dcOrVars, vars) { + return executeQuery(getTeamHudDepartmentByIdRef(dcOrVars, vars)); +}; + +const listTeamHudDepartmentsByTeamHubIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTeamHudDepartmentsByTeamHubId', inputVars); +} +listTeamHudDepartmentsByTeamHubIdRef.operationName = 'listTeamHudDepartmentsByTeamHubId'; +exports.listTeamHudDepartmentsByTeamHubIdRef = listTeamHudDepartmentsByTeamHubIdRef; + +exports.listTeamHudDepartmentsByTeamHubId = function listTeamHudDepartmentsByTeamHubId(dcOrVars, vars) { + return executeQuery(listTeamHudDepartmentsByTeamHubIdRef(dcOrVars, vars)); +}; + +const createVendorRateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createVendorRate', inputVars); +} +createVendorRateRef.operationName = 'createVendorRate'; +exports.createVendorRateRef = createVendorRateRef; + +exports.createVendorRate = function createVendorRate(dcOrVars, vars) { + return executeMutation(createVendorRateRef(dcOrVars, vars)); +}; + +const updateVendorRateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateVendorRate', inputVars); +} +updateVendorRateRef.operationName = 'updateVendorRate'; +exports.updateVendorRateRef = updateVendorRateRef; + +exports.updateVendorRate = function updateVendorRate(dcOrVars, vars) { + return executeMutation(updateVendorRateRef(dcOrVars, vars)); +}; + +const deleteVendorRateRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteVendorRate', inputVars); +} +deleteVendorRateRef.operationName = 'deleteVendorRate'; +exports.deleteVendorRateRef = deleteVendorRateRef; + +exports.deleteVendorRate = function deleteVendorRate(dcOrVars, vars) { + return executeMutation(deleteVendorRateRef(dcOrVars, vars)); +}; + +const createActivityLogRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createActivityLog', inputVars); +} +createActivityLogRef.operationName = 'createActivityLog'; +exports.createActivityLogRef = createActivityLogRef; + +exports.createActivityLog = function createActivityLog(dcOrVars, vars) { + return executeMutation(createActivityLogRef(dcOrVars, vars)); +}; + +const updateActivityLogRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateActivityLog', inputVars); +} +updateActivityLogRef.operationName = 'updateActivityLog'; +exports.updateActivityLogRef = updateActivityLogRef; + +exports.updateActivityLog = function updateActivityLog(dcOrVars, vars) { + return executeMutation(updateActivityLogRef(dcOrVars, vars)); +}; + +const markActivityLogAsReadRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'markActivityLogAsRead', inputVars); +} +markActivityLogAsReadRef.operationName = 'markActivityLogAsRead'; +exports.markActivityLogAsReadRef = markActivityLogAsReadRef; + +exports.markActivityLogAsRead = function markActivityLogAsRead(dcOrVars, vars) { + return executeMutation(markActivityLogAsReadRef(dcOrVars, vars)); +}; + +const markActivityLogsAsReadRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'markActivityLogsAsRead', inputVars); +} +markActivityLogsAsReadRef.operationName = 'markActivityLogsAsRead'; +exports.markActivityLogsAsReadRef = markActivityLogsAsReadRef; + +exports.markActivityLogsAsRead = function markActivityLogsAsRead(dcOrVars, vars) { + return executeMutation(markActivityLogsAsReadRef(dcOrVars, vars)); +}; + +const deleteActivityLogRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteActivityLog', inputVars); +} +deleteActivityLogRef.operationName = 'deleteActivityLog'; +exports.deleteActivityLogRef = deleteActivityLogRef; + +exports.deleteActivityLog = function deleteActivityLog(dcOrVars, vars) { + return executeMutation(deleteActivityLogRef(dcOrVars, vars)); +}; + +const listLevelsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listLevels'); +} +listLevelsRef.operationName = 'listLevels'; +exports.listLevelsRef = listLevelsRef; + +exports.listLevels = function listLevels(dc) { + return executeQuery(listLevelsRef(dc)); +}; + +const getLevelByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getLevelById', inputVars); +} +getLevelByIdRef.operationName = 'getLevelById'; +exports.getLevelByIdRef = getLevelByIdRef; + +exports.getLevelById = function getLevelById(dcOrVars, vars) { + return executeQuery(getLevelByIdRef(dcOrVars, vars)); +}; + +const filterLevelsRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterLevels', inputVars); +} +filterLevelsRef.operationName = 'filterLevels'; +exports.filterLevelsRef = filterLevelsRef; + +exports.filterLevels = function filterLevels(dcOrVars, vars) { + return executeQuery(filterLevelsRef(dcOrVars, vars)); +}; + +const createShiftRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'createShift', inputVars); +} +createShiftRef.operationName = 'createShift'; +exports.createShiftRef = createShiftRef; + +exports.createShift = function createShift(dcOrVars, vars) { + return executeMutation(createShiftRef(dcOrVars, vars)); +}; + +const updateShiftRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'updateShift', inputVars); +} +updateShiftRef.operationName = 'updateShift'; +exports.updateShiftRef = updateShiftRef; + +exports.updateShift = function updateShift(dcOrVars, vars) { + return executeMutation(updateShiftRef(dcOrVars, vars)); +}; + +const deleteShiftRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'deleteShift', inputVars); +} +deleteShiftRef.operationName = 'deleteShift'; +exports.deleteShiftRef = deleteShiftRef; + +exports.deleteShift = function deleteShift(dcOrVars, vars) { + return executeMutation(deleteShiftRef(dcOrVars, vars)); +}; + +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 updateStaffRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'UpdateStaff', inputVars); +} +updateStaffRef.operationName = 'UpdateStaff'; +exports.updateStaffRef = updateStaffRef; + +exports.updateStaff = function updateStaff(dcOrVars, vars) { + return executeMutation(updateStaffRef(dcOrVars, vars)); +}; + +const deleteStaffRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return mutationRef(dcInstance, 'DeleteStaff', inputVars); +} +deleteStaffRef.operationName = 'DeleteStaff'; +exports.deleteStaffRef = deleteStaffRef; + +exports.deleteStaff = function deleteStaff(dcOrVars, vars) { + return executeMutation(deleteStaffRef(dcOrVars, vars)); +}; + +const listTeamsRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTeams'); +} +listTeamsRef.operationName = 'listTeams'; +exports.listTeamsRef = listTeamsRef; + +exports.listTeams = function listTeams(dc) { + return executeQuery(listTeamsRef(dc)); +}; + +const getTeamByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamById', inputVars); +} +getTeamByIdRef.operationName = 'getTeamById'; +exports.getTeamByIdRef = getTeamByIdRef; + +exports.getTeamById = function getTeamById(dcOrVars, vars) { + return executeQuery(getTeamByIdRef(dcOrVars, vars)); +}; + +const getTeamsByOwnerIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamsByOwnerId', inputVars); +} +getTeamsByOwnerIdRef.operationName = 'getTeamsByOwnerId'; +exports.getTeamsByOwnerIdRef = getTeamsByOwnerIdRef; + +exports.getTeamsByOwnerId = function getTeamsByOwnerId(dcOrVars, vars) { + return executeQuery(getTeamsByOwnerIdRef(dcOrVars, vars)); +}; + +const listTeamMembersRef = (dc) => { + const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listTeamMembers'); +} +listTeamMembersRef.operationName = 'listTeamMembers'; +exports.listTeamMembersRef = listTeamMembersRef; + +exports.listTeamMembers = function listTeamMembers(dc) { + return executeQuery(listTeamMembersRef(dc)); +}; + +const getTeamMemberByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamMemberById', inputVars); +} +getTeamMemberByIdRef.operationName = 'getTeamMemberById'; +exports.getTeamMemberByIdRef = getTeamMemberByIdRef; + +exports.getTeamMemberById = function getTeamMemberById(dcOrVars, vars) { + return executeQuery(getTeamMemberByIdRef(dcOrVars, vars)); +}; + +const getTeamMembersByTeamIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getTeamMembersByTeamId', inputVars); +} +getTeamMembersByTeamIdRef.operationName = 'getTeamMembersByTeamId'; +exports.getTeamMembersByTeamIdRef = getTeamMembersByTeamIdRef; + +exports.getTeamMembersByTeamId = function getTeamMembersByTeamId(dcOrVars, vars) { + return executeQuery(getTeamMembersByTeamIdRef(dcOrVars, vars)); +}; + +const listVendorBenefitPlansRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listVendorBenefitPlans', inputVars); +} +listVendorBenefitPlansRef.operationName = 'listVendorBenefitPlans'; +exports.listVendorBenefitPlansRef = listVendorBenefitPlansRef; + +exports.listVendorBenefitPlans = function listVendorBenefitPlans(dcOrVars, vars) { + return executeQuery(listVendorBenefitPlansRef(dcOrVars, vars)); +}; + +const getVendorBenefitPlanByIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'getVendorBenefitPlanById', inputVars); +} +getVendorBenefitPlanByIdRef.operationName = 'getVendorBenefitPlanById'; +exports.getVendorBenefitPlanByIdRef = getVendorBenefitPlanByIdRef; + +exports.getVendorBenefitPlanById = function getVendorBenefitPlanById(dcOrVars, vars) { + return executeQuery(getVendorBenefitPlanByIdRef(dcOrVars, vars)); +}; + +const listVendorBenefitPlansByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listVendorBenefitPlansByVendorId', inputVars); +} +listVendorBenefitPlansByVendorIdRef.operationName = 'listVendorBenefitPlansByVendorId'; +exports.listVendorBenefitPlansByVendorIdRef = listVendorBenefitPlansByVendorIdRef; + +exports.listVendorBenefitPlansByVendorId = function listVendorBenefitPlansByVendorId(dcOrVars, vars) { + return executeQuery(listVendorBenefitPlansByVendorIdRef(dcOrVars, vars)); +}; + +const listActiveVendorBenefitPlansByVendorIdRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'listActiveVendorBenefitPlansByVendorId', inputVars); +} +listActiveVendorBenefitPlansByVendorIdRef.operationName = 'listActiveVendorBenefitPlansByVendorId'; +exports.listActiveVendorBenefitPlansByVendorIdRef = listActiveVendorBenefitPlansByVendorIdRef; + +exports.listActiveVendorBenefitPlansByVendorId = function listActiveVendorBenefitPlansByVendorId(dcOrVars, vars) { + return executeQuery(listActiveVendorBenefitPlansByVendorIdRef(dcOrVars, vars)); +}; + +const filterVendorBenefitPlansRef = (dcOrVars, vars) => { + const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars); + dcInstance._useGeneratedSdk(); + return queryRef(dcInstance, 'filterVendorBenefitPlans', inputVars); +} +filterVendorBenefitPlansRef.operationName = 'filterVendorBenefitPlans'; +exports.filterVendorBenefitPlansRef = filterVendorBenefitPlansRef; + +exports.filterVendorBenefitPlans = function filterVendorBenefitPlans(dcOrVars, vars) { + return executeQuery(filterVendorBenefitPlansRef(dcOrVars, vars)); +}; diff --git a/apps/web/src/dataconnect-generated/index.d.ts b/apps/web/src/dataconnect-generated/index.d.ts new file mode 100644 index 00000000..356e8863 --- /dev/null +++ b/apps/web/src/dataconnect-generated/index.d.ts @@ -0,0 +1,14108 @@ +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 AccountType { + CHECKING = "CHECKING", + SAVINGS = "SAVINGS", +}; + +export enum ActivityIconType { + INVOICE = "INVOICE", + CHECK = "CHECK", + ALERT = "ALERT", + MESSAGE = "MESSAGE", + CALENDAR = "CALENDAR", +}; + +export enum ActivityType { + ORDER_CREATED = "ORDER_CREATED", + SHIFT_UPDATE = "SHIFT_UPDATE", + COMPLIANCE_ALERT = "COMPLIANCE_ALERT", + MESSAGE_RECEIVED = "MESSAGE_RECEIVED", + SYSTEM_UPDATE = "SYSTEM_UPDATE", +}; + +export enum ApplicationOrigin { + STAFF = "STAFF", + EMPLOYER = "EMPLOYER", +}; + +export enum ApplicationStatus { + PENDING = "PENDING", + REJECTED = "REJECTED", + CONFIRMED = "CONFIRMED", + CHECKED_IN = "CHECKED_IN", + CHECKED_OUT = "CHECKED_OUT", + LATE = "LATE", + NO_SHOW = "NO_SHOW", + COMPLETED = "COMPLETED", +}; + +export enum ApprovalStatus { + APPROVED = "APPROVED", +}; + +export enum AssignmentStatus { + PENDING = "PENDING", + CONFIRMED = "CONFIRMED", + OPEN = "OPEN", + COMPLETED = "COMPLETED", + CANCELED = "CANCELED", + ACTIVE = "ACTIVE", +}; + +export enum AvailabilitySlot { + MORNING = "MORNING", + AFTERNOON = "AFTERNOON", + EVENING = "EVENING", +}; + +export enum AvailabilityStatus { + CONFIRMED_AVAILABLE = "CONFIRMED_AVAILABLE", + UNKNOWN = "UNKNOWN", + BLOCKED = "BLOCKED", +}; + +export enum BackgroundCheckStatus { + PENDING = "PENDING", + CLEARED = "CLEARED", + FAILED = "FAILED", + EXPIRED = "EXPIRED", + NOT_REQUIRED = "NOT_REQUIRED", +}; + +export enum BreakDuration { + MIN_15 = "MIN_15", + MIN_30 = "MIN_30", + NO_BREAK = "NO_BREAK", +}; + +export enum BusinessArea { + BAY_AREA = "BAY_AREA", + SOUTHERN_CALIFORNIA = "SOUTHERN_CALIFORNIA", + NORTHERN_CALIFORNIA = "NORTHERN_CALIFORNIA", + CENTRAL_VALLEY = "CENTRAL_VALLEY", + OTHER = "OTHER", +}; + +export enum BusinessRateGroup { + STANDARD = "STANDARD", + PREMIUM = "PREMIUM", + ENTERPRISE = "ENTERPRISE", + CUSTOM = "CUSTOM", +}; + +export enum BusinessSector { + BON_APPETIT = "BON_APPETIT", + EUREST = "EUREST", + ARAMARK = "ARAMARK", + EPICUREAN_GROUP = "EPICUREAN_GROUP", + CHARTWELLS = "CHARTWELLS", + OTHER = "OTHER", +}; + +export enum BusinessStatus { + ACTIVE = "ACTIVE", + INACTIVE = "INACTIVE", + PENDING = "PENDING", +}; + +export enum CategoryType { + KITCHEN_AND_CULINARY = "KITCHEN_AND_CULINARY", + CONCESSIONS = "CONCESSIONS", + FACILITIES = "FACILITIES", + BARTENDING = "BARTENDING", + SECURITY = "SECURITY", + EVENT_STAFF = "EVENT_STAFF", + MANAGEMENT = "MANAGEMENT", + TECHNICAL = "TECHNICAL", + OTHER = "OTHER", +}; + +export enum CertificateStatus { + CURRENT = "CURRENT", + EXPIRING_SOON = "EXPIRING_SOON", + COMPLETED = "COMPLETED", + PENDING = "PENDING", + EXPIRED = "EXPIRED", + EXPIRING = "EXPIRING", + NOT_STARTED = "NOT_STARTED", +}; + +export enum CitizenshipStatus { + CITIZEN = "CITIZEN", + NONCITIZEN = "NONCITIZEN", + PERMANENT_RESIDENT = "PERMANENT_RESIDENT", + ALIEN = "ALIEN", +}; + +export enum ComplianceType { + BACKGROUND_CHECK = "BACKGROUND_CHECK", + FOOD_HANDLER = "FOOD_HANDLER", + RBS = "RBS", + LEGAL = "LEGAL", + OPERATIONAL = "OPERATIONAL", + SAFETY = "SAFETY", + TRAINING = "TRAINING", + LICENSE = "LICENSE", + OTHER = "OTHER", +}; + +export enum ConversationStatus { + ACTIVE = "ACTIVE", +}; + +export enum ConversationType { + CLIENT_VENDOR = "CLIENT_VENDOR", + GROUP_STAFF = "GROUP_STAFF", + STAFF_CLIENT = "STAFF_CLIENT", + STAFF_ADMIN = "STAFF_ADMIN", + VENDOR_ADMIN = "VENDOR_ADMIN", + CLIENT_ADMIN = "CLIENT_ADMIN", + GROUP_ORDER_STAFF = "GROUP_ORDER_STAFF", +}; + +export enum DayOfWeek { + SUNDAY = "SUNDAY", + MONDAY = "MONDAY", + TUESDAY = "TUESDAY", + WEDNESDAY = "WEDNESDAY", + THURSDAY = "THURSDAY", + FRIDAY = "FRIDAY", + SATURDAY = "SATURDAY", +}; + +export enum DepartmentType { + OPERATIONS = "OPERATIONS", + SALES = "SALES", + HR = "HR", + FINANCE = "FINANCE", + IT = "IT", + MARKETING = "MARKETING", + CUSTOMER_SERVICE = "CUSTOMER_SERVICE", + LOGISTICS = "LOGISTICS", +}; + +export enum DocumentStatus { + UPLOADED = "UPLOADED", + PENDING = "PENDING", + EXPIRING = "EXPIRING", + MISSING = "MISSING", + VERIFIED = "VERIFIED", +}; + +export enum DocumentType { + W4_FORM = "W4_FORM", + I9_FORM = "I9_FORM", + STATE_TAX_FORM = "STATE_TAX_FORM", + DIRECT_DEPOSIT = "DIRECT_DEPOSIT", + ID_COPY = "ID_COPY", + SSN_CARD = "SSN_CARD", + WORK_PERMIT = "WORK_PERMIT", +}; + +export enum EmploymentType { + FULL_TIME = "FULL_TIME", + PART_TIME = "PART_TIME", + ON_CALL = "ON_CALL", + WEEKENDS = "WEEKENDS", + SPECIFIC_DAYS = "SPECIFIC_DAYS", + SEASONAL = "SEASONAL", + MEDICAL_LEAVE = "MEDICAL_LEAVE", +}; + +export enum EnglishProficiency { + FLUENT = "FLUENT", + INTERMEDIATE = "INTERMEDIATE", + BASIC = "BASIC", + NONE = "NONE", +}; + +export enum InovicePaymentTerms { + NET_30 = "NET_30", + NET_45 = "NET_45", + NET_60 = "NET_60", +}; + +export enum InovicePaymentTermsTemp { + NET_30 = "NET_30", + NET_45 = "NET_45", + NET_60 = "NET_60", +}; + +export enum InvoiceStatus { + PAID = "PAID", + PENDING = "PENDING", + OVERDUE = "OVERDUE", + PENDING_REVIEW = "PENDING_REVIEW", + APPROVED = "APPROVED", + DISPUTED = "DISPUTED", + DRAFT = "DRAFT", +}; + +export enum MaritalStatus { + SINGLE = "SINGLE", + MARRIED = "MARRIED", + HEAD = "HEAD", +}; + +export enum OrderDuration { + WEEKLY = "WEEKLY", + MONTHLY = "MONTHLY", +}; + +export enum OrderStatus { + DRAFT = "DRAFT", + POSTED = "POSTED", + FILLED = "FILLED", + COMPLETED = "COMPLETED", + CANCELLED = "CANCELLED", + PENDING = "PENDING", + FULLY_STAFFED = "FULLY_STAFFED", + PARTIAL_STAFFED = "PARTIAL_STAFFED", +}; + +export enum OrderType { + ONE_TIME = "ONE_TIME", + PERMANENT = "PERMANENT", + RECURRING = "RECURRING", + RAPID = "RAPID", +}; + +export enum RecentPaymentStatus { + PAID = "PAID", + PENDING = "PENDING", + FAILED = "FAILED", +}; + +export enum RelationshipType { + FAMILY = "FAMILY", + SPOUSE = "SPOUSE", + FRIEND = "FRIEND", + OTHER = "OTHER", +}; + +export enum RoleCategoryType { + KITCHEN_AND_CULINARY = "KITCHEN_AND_CULINARY", + CONCESSIONS = "CONCESSIONS", + FACILITIES = "FACILITIES", + BARTENDING = "BARTENDING", + SECURITY = "SECURITY", + EVENT_STAFF = "EVENT_STAFF", + MANAGEMENT = "MANAGEMENT", + TECHNICAL = "TECHNICAL", + OTHER = "OTHER", +}; + +export enum RoleType { + SKILLED = "SKILLED", + BEGINNER = "BEGINNER", + CROSS_TRAINED = "CROSS_TRAINED", +}; + +export enum ShiftStatus { + DRAFT = "DRAFT", + FILLED = "FILLED", + PENDING = "PENDING", + ASSIGNED = "ASSIGNED", + CONFIRMED = "CONFIRMED", + OPEN = "OPEN", + IN_PROGRESS = "IN_PROGRESS", + COMPLETED = "COMPLETED", + CANCELED = "CANCELED", +}; + +export enum TaskPriority { + LOW = "LOW", + NORMAL = "NORMAL", + HIGH = "HIGH", +}; + +export enum TaskStatus { + PENDING = "PENDING", + IN_PROGRESS = "IN_PROGRESS", + COMPLETED = "COMPLETED", +}; + +export enum TaxFormStatus { + NOT_STARTED = "NOT_STARTED", + DRAFT = "DRAFT", + SUBMITTED = "SUBMITTED", + APPROVED = "APPROVED", + REJECTED = "REJECTED", +}; + +export enum TaxFormType { + I9 = "I9", + W4 = "W4", +}; + +export enum TeamMemberInviteStatus { + PENDING = "PENDING", + ACCEPTED = "ACCEPTED", + CANCELLED = "CANCELLED", +}; + +export enum TeamMemberRole { + OWNER = "OWNER", + ADMIN = "ADMIN", + MEMBER = "MEMBER", + MANAGER = "MANAGER", + VIEWER = "VIEWER", +}; + +export enum UserBaseRole { + ADMIN = "ADMIN", + USER = "USER", +}; + +export enum ValidationStatus { + APPROVED = "APPROVED", + PENDING_EXPERT_REVIEW = "PENDING_EXPERT_REVIEW", + REJECTED = "REJECTED", + AI_VERIFIED = "AI_VERIFIED", + AI_FLAGGED = "AI_FLAGGED", + MANUAL_REVIEW_NEEDED = "MANUAL_REVIEW_NEEDED", +}; + +export enum VendorTier { + PREFERRED = "PREFERRED", + APPROVED = "APPROVED", + STANDARD = "STANDARD", +}; + +export enum WorkforceEmploymentType { + W2 = "W2", + W1099 = "W1099", + TEMPORARY = "TEMPORARY", + CONTRACT = "CONTRACT", +}; + +export enum WorkforceStatus { + ACTIVE = "ACTIVE", + INACTIVE = "INACTIVE", +}; + + + +export interface AcceptInviteByCodeData { + teamMember_updateMany: number; +} + +export interface AcceptInviteByCodeVariables { + inviteCode: UUIDString; +} + +export interface Account_Key { + id: UUIDString; + __typename?: 'Account_Key'; +} + +export interface ActivityLog_Key { + id: UUIDString; + __typename?: 'ActivityLog_Key'; +} + +export interface Application_Key { + id: UUIDString; + __typename?: 'Application_Key'; +} + +export interface Assignment_Key { + id: UUIDString; + __typename?: 'Assignment_Key'; +} + +export interface AttireOption_Key { + id: UUIDString; + __typename?: 'AttireOption_Key'; +} + +export interface BenefitsData_Key { + vendorBenefitPlanId: UUIDString; + staffId: UUIDString; + __typename?: 'BenefitsData_Key'; +} + +export interface Business_Key { + id: UUIDString; + __typename?: 'Business_Key'; +} + +export interface CancelInviteByCodeData { + teamMember_updateMany: number; +} + +export interface CancelInviteByCodeVariables { + inviteCode: UUIDString; +} + +export interface Category_Key { + id: UUIDString; + __typename?: 'Category_Key'; +} + +export interface Certificate_Key { + id: UUIDString; + __typename?: 'Certificate_Key'; +} + +export interface ClientFeedback_Key { + id: UUIDString; + __typename?: 'ClientFeedback_Key'; +} + +export interface Conversation_Key { + id: UUIDString; + __typename?: 'Conversation_Key'; +} + +export interface Course_Key { + id: UUIDString; + __typename?: 'Course_Key'; +} + +export interface CreateAccountData { + account_insert: Account_Key; +} + +export interface CreateAccountVariables { + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; +} + +export interface CreateActivityLogData { + activityLog_insert: ActivityLog_Key; +} + +export interface CreateActivityLogVariables { + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; +} + +export interface CreateApplicationData { + application_insert: Application_Key; +} + +export interface CreateApplicationVariables { + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + roleId: UUIDString; +} + +export interface CreateAssignmentData { + assignment_insert: Assignment_Key; +} + +export interface CreateAssignmentVariables { + workforceId: UUIDString; + title?: string | null; + description?: string | null; + instructions?: string | null; + status?: AssignmentStatus | null; + tipsAvailable?: boolean | null; + travelTime?: boolean | null; + mealProvided?: boolean | null; + parkingAvailable?: boolean | null; + gasCompensation?: boolean | null; + managers?: unknown[] | null; + roleId: UUIDString; + shiftId: UUIDString; +} + +export interface CreateAttireOptionData { + attireOption_insert: AttireOption_Key; +} + +export interface CreateAttireOptionVariables { + itemId: string; + label: string; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; +} + +export interface CreateBenefitsDataData { + benefitsData_insert: BenefitsData_Key; +} + +export interface CreateBenefitsDataVariables { + vendorBenefitPlanId: UUIDString; + staffId: UUIDString; + current: number; +} + +export interface CreateBusinessData { + business_insert: Business_Key; +} + +export interface CreateBusinessVariables { + businessName: string; + contactName?: string | null; + userId: string; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup: BusinessRateGroup; + status: BusinessStatus; + notes?: string | null; +} + +export interface CreateCategoryData { + category_insert: Category_Key; +} + +export interface CreateCategoryVariables { + categoryId: string; + label: string; + icon?: string | null; +} + +export interface CreateCertificateData { + certificate_insert: Certificate_Key; +} + +export interface CreateCertificateVariables { + name: string; + description?: string | null; + expiry?: TimestampString | null; + status: CertificateStatus; + fileUrl?: string | null; + icon?: string | null; + certificationType?: ComplianceType | null; + issuer?: string | null; + staffId: UUIDString; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; +} + +export interface CreateClientFeedbackData { + clientFeedback_insert: ClientFeedback_Key; +} + +export interface CreateClientFeedbackVariables { + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdBy?: string | null; +} + +export interface CreateConversationData { + conversation_insert: Conversation_Key; +} + +export interface CreateConversationVariables { + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; +} + +export interface CreateCourseData { + course_insert: Course_Key; +} + +export interface CreateCourseVariables { + title?: string | null; + description?: string | null; + thumbnailUrl?: string | null; + durationMinutes?: number | null; + xpReward?: number | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; +} + +export interface CreateCustomRateCardData { + customRateCard_insert: CustomRateCard_Key; +} + +export interface CreateCustomRateCardVariables { + name: string; + baseBook?: string | null; + discount?: number | null; + isDefault?: boolean | null; +} + +export interface CreateDocumentData { + document_insert: Document_Key; +} + +export interface CreateDocumentVariables { + documentType: DocumentType; + name: string; + description?: string | null; +} + +export interface CreateEmergencyContactData { + emergencyContact_insert: EmergencyContact_Key; +} + +export interface CreateEmergencyContactVariables { + name: string; + phone: string; + relationship: RelationshipType; + staffId: UUIDString; +} + +export interface CreateFaqDataData { + faqData_insert: FaqData_Key; +} + +export interface CreateFaqDataVariables { + category: string; + questions?: unknown[] | null; +} + +export interface CreateHubData { + hub_insert: Hub_Key; +} + +export interface CreateHubVariables { + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; +} + +export interface CreateInvoiceData { + invoice_insert: Invoice_Key; +} + +export interface CreateInvoiceTemplateData { + invoiceTemplate_insert: InvoiceTemplate_Key; +} + +export interface CreateInvoiceTemplateVariables { + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; +} + +export interface CreateInvoiceVariables { + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; +} + +export interface CreateLevelData { + level_insert: Level_Key; +} + +export interface CreateLevelVariables { + name: string; + xpRequired: number; + icon?: string | null; + colors?: unknown | null; +} + +export interface CreateMemberTaskData { + memberTask_insert: MemberTask_Key; +} + +export interface CreateMemberTaskVariables { + teamMemberId: UUIDString; + taskId: UUIDString; +} + +export interface CreateMessageData { + message_insert: Message_Key; +} + +export interface CreateMessageVariables { + conversationId: UUIDString; + senderId: string; + content: string; + isSystem?: boolean | null; +} + +export interface CreateOrderData { + order_insert: Order_Key; +} + +export interface CreateOrderVariables { + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status?: OrderStatus | null; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + eventName?: string | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + teamHubId: UUIDString; + recurringDays?: unknown | null; + permanentStartDate?: TimestampString | null; + permanentDays?: unknown | null; + notes?: string | null; + detectedConflicts?: unknown | null; + poReference?: string | null; +} + +export interface CreateRecentPaymentData { + recentPayment_insert: RecentPayment_Key; +} + +export interface CreateRecentPaymentVariables { + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; +} + +export interface CreateRoleCategoryData { + roleCategory_insert: RoleCategory_Key; +} + +export interface CreateRoleCategoryVariables { + roleName: string; + category: RoleCategoryType; +} + +export interface CreateRoleData { + role_insert: Role_Key; +} + +export interface CreateRoleVariables { + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; +} + +export interface CreateShiftData { + shift_insert: Shift_Key; +} + +export interface CreateShiftRoleData { + shiftRole_insert: ShiftRole_Key; +} + +export interface CreateShiftRoleVariables { + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; +} + +export interface CreateShiftVariables { + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdBy?: string | null; +} + +export interface CreateStaffAvailabilityData { + staffAvailability_insert: StaffAvailability_Key; +} + +export interface CreateStaffAvailabilityStatsData { + staffAvailabilityStats_insert: StaffAvailabilityStats_Key; +} + +export interface CreateStaffAvailabilityStatsVariables { + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; +} + +export interface CreateStaffAvailabilityVariables { + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status?: AvailabilityStatus | null; + notes?: string | null; +} + +export interface CreateStaffCourseData { + staffCourse_insert: StaffCourse_Key; +} + +export interface CreateStaffCourseVariables { + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; +} + +export interface CreateStaffData { + staff_insert: Staff_Key; +} + +export interface CreateStaffDocumentData { + staffDocument_insert: StaffDocument_Key; +} + +export interface CreateStaffDocumentVariables { + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; +} + +export interface CreateStaffRoleData { + staffRole_insert: StaffRole_Key; +} + +export interface CreateStaffRoleVariables { + staffId: UUIDString; + roleId: UUIDString; + roleType?: RoleType | null; +} + +export interface CreateStaffVariables { + userId: string; + fullName: string; + level?: string | null; + role?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + ownerId?: UUIDString | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; +} + +export interface CreateTaskCommentData { + taskComment_insert: TaskComment_Key; +} + +export interface CreateTaskCommentVariables { + taskId: UUIDString; + teamMemberId: UUIDString; + comment: string; + isSystem?: boolean | null; +} + +export interface CreateTaskData { + task_insert: Task_Key; +} + +export interface CreateTaskVariables { + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + ownerId: UUIDString; +} + +export interface CreateTaxFormData { + taxForm_insert: TaxForm_Key; +} + +export interface CreateTaxFormVariables { + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + apt?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdBy?: string | null; +} + +export interface CreateTeamData { + team_insert: Team_Key; +} + +export interface CreateTeamHubData { + teamHub_insert: TeamHub_Key; +} + +export interface CreateTeamHubVariables { + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive?: boolean | null; + departments?: unknown | null; +} + +export interface CreateTeamHudDepartmentData { + teamHudDepartment_insert: TeamHudDepartment_Key; +} + +export interface CreateTeamHudDepartmentVariables { + name: string; + costCenter?: string | null; + teamHubId: UUIDString; +} + +export interface CreateTeamMemberData { + teamMember_insert: TeamMember_Key; +} + +export interface CreateTeamMemberVariables { + teamId: UUIDString; + role: TeamMemberRole; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + userId: string; + inviteStatus?: TeamMemberInviteStatus | null; +} + +export interface CreateTeamVariables { + teamName: string; + ownerId: UUIDString; + ownerName: string; + ownerRole: string; + email?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; +} + +export interface CreateUserConversationData { + userConversation_insert: UserConversation_Key; +} + +export interface CreateUserConversationVariables { + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; +} + +export interface CreateUserData { + user_insert: User_Key; +} + +export interface CreateUserVariables { + id: string; + email?: string | null; + fullName?: string | null; + role: UserBaseRole; + userRole?: string | null; + photoUrl?: string | null; +} + +export interface CreateVendorBenefitPlanData { + vendorBenefitPlan_insert: VendorBenefitPlan_Key; +} + +export interface CreateVendorBenefitPlanVariables { + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdBy?: string | null; +} + +export interface CreateVendorData { + vendor_insert: Vendor_Key; +} + +export interface CreateVendorRateData { + vendorRate_insert: VendorRate_Key; +} + +export interface CreateVendorRateVariables { + vendorId: UUIDString; + roleName?: string | null; + category?: CategoryType | null; + clientRate?: number | null; + employeeWage?: number | null; + markupPercentage?: number | null; + vendorFeePercentage?: number | null; + isActive?: boolean | null; + notes?: string | null; +} + +export interface CreateVendorVariables { + userId: string; + companyName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; +} + +export interface CreateWorkforceData { + workforce_insert: Workforce_Key; +} + +export interface CreateWorkforceVariables { + vendorId: UUIDString; + staffId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; +} + +export interface CustomRateCard_Key { + id: UUIDString; + __typename?: 'CustomRateCard_Key'; +} + +export interface DeactivateWorkforceData { + workforce_update?: Workforce_Key | null; +} + +export interface DeactivateWorkforceVariables { + id: UUIDString; +} + +export interface DeleteAccountData { + account_delete?: Account_Key | null; +} + +export interface DeleteAccountVariables { + id: UUIDString; +} + +export interface DeleteActivityLogData { + activityLog_delete?: ActivityLog_Key | null; +} + +export interface DeleteActivityLogVariables { + id: UUIDString; +} + +export interface DeleteApplicationData { + application_delete?: Application_Key | null; +} + +export interface DeleteApplicationVariables { + id: UUIDString; +} + +export interface DeleteAssignmentData { + assignment_delete?: Assignment_Key | null; +} + +export interface DeleteAssignmentVariables { + id: UUIDString; +} + +export interface DeleteAttireOptionData { + attireOption_delete?: AttireOption_Key | null; +} + +export interface DeleteAttireOptionVariables { + id: UUIDString; +} + +export interface DeleteBenefitsDataData { + benefitsData_delete?: BenefitsData_Key | null; +} + +export interface DeleteBenefitsDataVariables { + staffId: UUIDString; + vendorBenefitPlanId: UUIDString; +} + +export interface DeleteBusinessData { + business_delete?: Business_Key | null; +} + +export interface DeleteBusinessVariables { + id: UUIDString; +} + +export interface DeleteCategoryData { + category_delete?: Category_Key | null; +} + +export interface DeleteCategoryVariables { + id: UUIDString; +} + +export interface DeleteCertificateData { + certificate_delete?: Certificate_Key | null; +} + +export interface DeleteCertificateVariables { + id: UUIDString; +} + +export interface DeleteClientFeedbackData { + clientFeedback_delete?: ClientFeedback_Key | null; +} + +export interface DeleteClientFeedbackVariables { + id: UUIDString; +} + +export interface DeleteConversationData { + conversation_delete?: Conversation_Key | null; +} + +export interface DeleteConversationVariables { + id: UUIDString; +} + +export interface DeleteCourseData { + course_delete?: Course_Key | null; +} + +export interface DeleteCourseVariables { + id: UUIDString; +} + +export interface DeleteCustomRateCardData { + customRateCard_delete?: CustomRateCard_Key | null; +} + +export interface DeleteCustomRateCardVariables { + id: UUIDString; +} + +export interface DeleteDocumentData { + document_delete?: Document_Key | null; +} + +export interface DeleteDocumentVariables { + id: UUIDString; +} + +export interface DeleteEmergencyContactData { + emergencyContact_delete?: EmergencyContact_Key | null; +} + +export interface DeleteEmergencyContactVariables { + id: UUIDString; +} + +export interface DeleteFaqDataData { + faqData_delete?: FaqData_Key | null; +} + +export interface DeleteFaqDataVariables { + id: UUIDString; +} + +export interface DeleteHubData { + hub_delete?: Hub_Key | null; +} + +export interface DeleteHubVariables { + id: UUIDString; +} + +export interface DeleteInvoiceData { + invoice_delete?: Invoice_Key | null; +} + +export interface DeleteInvoiceTemplateData { + invoiceTemplate_delete?: InvoiceTemplate_Key | null; +} + +export interface DeleteInvoiceTemplateVariables { + id: UUIDString; +} + +export interface DeleteInvoiceVariables { + id: UUIDString; +} + +export interface DeleteLevelData { + level_delete?: Level_Key | null; +} + +export interface DeleteLevelVariables { + id: UUIDString; +} + +export interface DeleteMemberTaskData { + memberTask_delete?: MemberTask_Key | null; +} + +export interface DeleteMemberTaskVariables { + teamMemberId: UUIDString; + taskId: UUIDString; +} + +export interface DeleteMessageData { + message_delete?: Message_Key | null; +} + +export interface DeleteMessageVariables { + id: UUIDString; +} + +export interface DeleteOrderData { + order_delete?: Order_Key | null; +} + +export interface DeleteOrderVariables { + id: UUIDString; +} + +export interface DeleteRecentPaymentData { + recentPayment_delete?: RecentPayment_Key | null; +} + +export interface DeleteRecentPaymentVariables { + id: UUIDString; +} + +export interface DeleteRoleCategoryData { + roleCategory_delete?: RoleCategory_Key | null; +} + +export interface DeleteRoleCategoryVariables { + id: UUIDString; +} + +export interface DeleteRoleData { + role_delete?: Role_Key | null; +} + +export interface DeleteRoleVariables { + id: UUIDString; +} + +export interface DeleteShiftData { + shift_delete?: Shift_Key | null; +} + +export interface DeleteShiftRoleData { + shiftRole_delete?: ShiftRole_Key | null; +} + +export interface DeleteShiftRoleVariables { + shiftId: UUIDString; + roleId: UUIDString; +} + +export interface DeleteShiftVariables { + id: UUIDString; +} + +export interface DeleteStaffAvailabilityData { + staffAvailability_delete?: StaffAvailability_Key | null; +} + +export interface DeleteStaffAvailabilityStatsData { + staffAvailabilityStats_delete?: StaffAvailabilityStats_Key | null; +} + +export interface DeleteStaffAvailabilityStatsVariables { + staffId: UUIDString; +} + +export interface DeleteStaffAvailabilityVariables { + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; +} + +export interface DeleteStaffCourseData { + staffCourse_delete?: StaffCourse_Key | null; +} + +export interface DeleteStaffCourseVariables { + id: UUIDString; +} + +export interface DeleteStaffData { + staff_delete?: Staff_Key | null; +} + +export interface DeleteStaffDocumentData { + staffDocument_delete?: StaffDocument_Key | null; +} + +export interface DeleteStaffDocumentVariables { + staffId: UUIDString; + documentId: UUIDString; +} + +export interface DeleteStaffRoleData { + staffRole_delete?: StaffRole_Key | null; +} + +export interface DeleteStaffRoleVariables { + staffId: UUIDString; + roleId: UUIDString; +} + +export interface DeleteStaffVariables { + id: UUIDString; +} + +export interface DeleteTaskCommentData { + taskComment_delete?: TaskComment_Key | null; +} + +export interface DeleteTaskCommentVariables { + id: UUIDString; +} + +export interface DeleteTaskData { + task_delete?: Task_Key | null; +} + +export interface DeleteTaskVariables { + id: UUIDString; +} + +export interface DeleteTaxFormData { + taxForm_delete?: TaxForm_Key | null; +} + +export interface DeleteTaxFormVariables { + id: UUIDString; +} + +export interface DeleteTeamData { + team_delete?: Team_Key | null; +} + +export interface DeleteTeamHubData { + teamHub_delete?: TeamHub_Key | null; +} + +export interface DeleteTeamHubVariables { + id: UUIDString; +} + +export interface DeleteTeamHudDepartmentData { + teamHudDepartment_delete?: TeamHudDepartment_Key | null; +} + +export interface DeleteTeamHudDepartmentVariables { + id: UUIDString; +} + +export interface DeleteTeamMemberData { + teamMember_delete?: TeamMember_Key | null; +} + +export interface DeleteTeamMemberVariables { + id: UUIDString; +} + +export interface DeleteTeamVariables { + id: UUIDString; +} + +export interface DeleteUserConversationData { + userConversation_delete?: UserConversation_Key | null; +} + +export interface DeleteUserConversationVariables { + conversationId: UUIDString; + userId: string; +} + +export interface DeleteUserData { + user_delete?: User_Key | null; +} + +export interface DeleteUserVariables { + id: string; +} + +export interface DeleteVendorBenefitPlanData { + vendorBenefitPlan_delete?: VendorBenefitPlan_Key | null; +} + +export interface DeleteVendorBenefitPlanVariables { + id: UUIDString; +} + +export interface DeleteVendorData { + vendor_delete?: Vendor_Key | null; +} + +export interface DeleteVendorRateData { + vendorRate_delete?: VendorRate_Key | null; +} + +export interface DeleteVendorRateVariables { + id: UUIDString; +} + +export interface DeleteVendorVariables { + id: UUIDString; +} + +export interface Document_Key { + id: UUIDString; + __typename?: 'Document_Key'; +} + +export interface EmergencyContact_Key { + id: UUIDString; + __typename?: 'EmergencyContact_Key'; +} + +export interface FaqData_Key { + id: UUIDString; + __typename?: 'FaqData_Key'; +} + +export interface FilterAccountsData { + accounts: ({ + id: UUIDString; + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + expiryTime?: TimestampString | null; + routeNumber?: string | null; + } & Account_Key)[]; +} + +export interface FilterAccountsVariables { + bank?: string | null; + type?: AccountType | null; + isPrimary?: boolean | null; + ownerId?: UUIDString | null; +} + +export interface FilterActivityLogsData { + activityLogs: ({ + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key)[]; +} + +export interface FilterActivityLogsVariables { + userId?: string | null; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + isRead?: boolean | null; + activityType?: ActivityType | null; + iconType?: ActivityIconType | null; + offset?: number | null; + limit?: number | null; +} + +export interface FilterAssignmentsData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + role: { + id: UUIDString; + name: string; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + } & Shift_Key; + }; + } & Assignment_Key)[]; +} + +export interface FilterAssignmentsVariables { + shiftIds: UUIDString[]; + roleIds: UUIDString[]; + status?: AssignmentStatus | null; + offset?: number | null; + limit?: number | null; +} + +export interface FilterAttireOptionsData { + attireOptions: ({ + id: UUIDString; + itemId: string; + label: string; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; + } & AttireOption_Key)[]; +} + +export interface FilterAttireOptionsVariables { + itemId?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; +} + +export interface FilterCategoriesData { + categories: ({ + id: UUIDString; + categoryId: string; + label: string; + icon?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Category_Key)[]; +} + +export interface FilterCategoriesVariables { + categoryId?: string | null; + label?: string | null; +} + +export interface FilterClientFeedbacksData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} + +export interface FilterClientFeedbacksVariables { + businessId?: UUIDString | null; + vendorId?: UUIDString | null; + ratingMin?: number | null; + ratingMax?: number | null; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} + +export interface FilterConversationsData { + conversations: ({ + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key)[]; +} + +export interface FilterConversationsVariables { + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + lastMessageAfter?: TimestampString | null; + lastMessageBefore?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} + +export interface FilterCoursesData { + courses: ({ + id: UUIDString; + title?: string | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; + category: { + id: UUIDString; + label: string; + } & Category_Key; + } & Course_Key)[]; +} + +export interface FilterCoursesVariables { + categoryId?: UUIDString | null; + isCertification?: boolean | null; + levelRequired?: string | null; + completed?: boolean | null; +} + +export interface FilterDocumentsData { + documents: ({ + id: UUIDString; + documentType: DocumentType; + name: string; + description?: string | null; + createdAt?: TimestampString | null; + } & Document_Key)[]; +} + +export interface FilterDocumentsVariables { + documentType?: DocumentType | null; +} + +export interface FilterFaqDatasData { + faqDatas: ({ + id: UUIDString; + category: string; + questions?: unknown[] | null; + } & FaqData_Key)[]; +} + +export interface FilterFaqDatasVariables { + category?: string | null; +} + +export interface FilterHubsData { + hubs: ({ + id: UUIDString; + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; + } & Hub_Key)[]; +} + +export interface FilterHubsVariables { + ownerId?: UUIDString | null; + name?: string | null; + nfcTagId?: string | null; +} + +export interface FilterInvoicesData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} + +export interface FilterInvoicesVariables { + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + status?: InvoiceStatus | null; + issueDateFrom?: TimestampString | null; + issueDateTo?: TimestampString | null; + dueDateFrom?: TimestampString | null; + dueDateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} + +export interface FilterLevelsData { + levels: ({ + id: UUIDString; + name: string; + xpRequired: number; + icon?: string | null; + colors?: unknown | null; + } & Level_Key)[]; +} + +export interface FilterLevelsVariables { + name?: string | null; + xpRequired?: number | null; +} + +export interface FilterShiftsData { + shifts: ({ + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key)[]; +} + +export interface FilterShiftsVariables { + status?: ShiftStatus | null; + orderId?: UUIDString | null; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} + +export interface FilterStaffAvailabilityStatsData { + staffAvailabilityStatss: ({ + id: UUIDString; + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailabilityStats_Key)[]; +} + +export interface FilterStaffAvailabilityStatsVariables { + needWorkIndexMin?: number | null; + needWorkIndexMax?: number | null; + utilizationMin?: number | null; + utilizationMax?: number | null; + acceptanceRateMin?: number | null; + acceptanceRateMax?: number | null; + lastShiftAfter?: TimestampString | null; + lastShiftBefore?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} + +export interface FilterStaffData { + staffs: ({ + id: UUIDString; + userId: string; + fullName: string; + level?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + averageRating?: number | null; + reliabilityScore?: number | null; + totalShifts?: number | null; + ownerId?: UUIDString | null; + isRecommended?: boolean | null; + skills?: string[] | null; + industries?: string[] | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + } & Staff_Key)[]; +} + +export interface FilterStaffRolesData { + staffRoles: ({ + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + } & StaffRole_Key)[]; +} + +export interface FilterStaffRolesVariables { + staffId?: UUIDString | null; + roleId?: UUIDString | null; + offset?: number | null; + limit?: number | null; +} + +export interface FilterStaffVariables { + ownerId?: UUIDString | null; + fullName?: string | null; + level?: string | null; + email?: string | null; +} + +export interface FilterTasksData { + tasks: ({ + id: UUIDString; + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Task_Key)[]; +} + +export interface FilterTasksVariables { + status?: TaskStatus | null; + priority?: TaskPriority | null; +} + +export interface FilterUserConversationsData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key)[]; +} + +export interface FilterUserConversationsVariables { + userId?: string | null; + conversationId?: UUIDString | null; + unreadMin?: number | null; + unreadMax?: number | null; + lastReadAfter?: TimestampString | null; + lastReadBefore?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} + +export interface FilterUsersData { + users: ({ + id: string; + email?: string | null; + fullName?: string | null; + role: UserBaseRole; + userRole?: string | null; + photoUrl?: string | null; + } & User_Key)[]; +} + +export interface FilterUsersVariables { + id?: string | null; + email?: string | null; + role?: UserBaseRole | null; + userRole?: string | null; +} + +export interface FilterVendorBenefitPlansData { + vendorBenefitPlans: ({ + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key)[]; +} + +export interface FilterVendorBenefitPlansVariables { + vendorId?: UUIDString | null; + title?: string | null; + isActive?: boolean | null; + offset?: number | null; + limit?: number | null; +} + +export interface GetAccountByIdData { + account?: { + id: UUIDString; + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; + createdAt?: TimestampString | null; + } & Account_Key; +} + +export interface GetAccountByIdVariables { + id: UUIDString; +} + +export interface GetAccountsByOwnerIdData { + accounts: ({ + id: UUIDString; + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; + createdAt?: TimestampString | null; + } & Account_Key)[]; +} + +export interface GetAccountsByOwnerIdVariables { + ownerId: UUIDString; +} + +export interface GetActivityLogByIdData { + activityLog?: { + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key; +} + +export interface GetActivityLogByIdVariables { + id: UUIDString; +} + +export interface GetApplicationByIdData { + application?: { + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key; +} + +export interface GetApplicationByIdVariables { + id: UUIDString; +} + +export interface GetApplicationByStaffShiftAndRoleData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} + +export interface GetApplicationByStaffShiftAndRoleVariables { + staffId: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface GetApplicationsByShiftIdAndStatusData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} + +export interface GetApplicationsByShiftIdAndStatusVariables { + shiftId: UUIDString; + status: ApplicationStatus; + offset?: number | null; + limit?: number | null; +} + +export interface GetApplicationsByShiftIdData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} + +export interface GetApplicationsByShiftIdVariables { + shiftId: UUIDString; +} + +export interface GetApplicationsByStaffIdData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + durationDays?: number | null; + description?: string | null; + latitude?: number | null; + longitude?: number | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} + +export interface GetApplicationsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; + dayStart?: TimestampString | null; + dayEnd?: TimestampString | null; +} + +export interface GetAssignmentByIdData { + assignment?: { + id: UUIDString; + title?: string | null; + description?: string | null; + instructions?: string | null; + status?: AssignmentStatus | null; + tipsAvailable?: boolean | null; + travelTime?: boolean | null; + mealProvided?: boolean | null; + parkingAvailable?: boolean | null; + gasCompensation?: boolean | null; + managers?: unknown[] | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + workforce: { + id: UUIDString; + workforceNumber: string; + status?: WorkforceStatus | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + breakType?: BreakDuration | null; + uniform?: string | null; + department?: string | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + status?: ShiftStatus | null; + managers?: unknown[] | null; + order: { + id: UUIDString; + eventName?: string | null; + orderType: OrderType; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + }; + } & Assignment_Key; +} + +export interface GetAssignmentByIdVariables { + id: UUIDString; +} + +export interface GetAttireOptionByIdData { + attireOption?: { + id: UUIDString; + itemId: string; + label: string; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; + createdAt?: TimestampString | null; + } & AttireOption_Key; +} + +export interface GetAttireOptionByIdVariables { + id: UUIDString; +} + +export interface GetBenefitsDataByKeyData { + benefitsData?: { + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key; +} + +export interface GetBenefitsDataByKeyVariables { + staffId: UUIDString; + vendorBenefitPlanId: UUIDString; +} + +export interface GetBusinessByIdData { + business?: { + id: UUIDString; + businessName: string; + contactName?: string | null; + userId: string; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup: BusinessRateGroup; + status: BusinessStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & Business_Key; +} + +export interface GetBusinessByIdVariables { + id: UUIDString; +} + +export interface GetBusinessesByUserIdData { + businesses: ({ + id: UUIDString; + businessName: string; + contactName?: string | null; + userId: string; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup: BusinessRateGroup; + status: BusinessStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & Business_Key)[]; +} + +export interface GetBusinessesByUserIdVariables { + userId: string; +} + +export interface GetCategoryByIdData { + category?: { + id: UUIDString; + categoryId: string; + label: string; + icon?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Category_Key; +} + +export interface GetCategoryByIdVariables { + id: UUIDString; +} + +export interface GetCertificateByIdData { + certificate?: { + id: UUIDString; + name: string; + description?: string | null; + expiry?: TimestampString | null; + status: CertificateStatus; + fileUrl?: string | null; + icon?: string | null; + certificationType?: ComplianceType | null; + issuer?: string | null; + staffId: UUIDString; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; + updatedAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Certificate_Key; +} + +export interface GetCertificateByIdVariables { + id: UUIDString; +} + +export interface GetClientFeedbackByIdData { + clientFeedback?: { + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key; +} + +export interface GetClientFeedbackByIdVariables { + id: UUIDString; +} + +export interface GetCompletedShiftsByBusinessIdData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + workersNeeded?: number | null; + filled?: number | null; + createdAt?: TimestampString | null; + order: { + status: OrderStatus; + }; + } & Shift_Key)[]; +} + +export interface GetCompletedShiftsByBusinessIdVariables { + businessId: UUIDString; + dateFrom: TimestampString; + dateTo: TimestampString; + offset?: number | null; + limit?: number | null; +} + +export interface GetConversationByIdData { + conversation?: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; +} + +export interface GetConversationByIdVariables { + id: UUIDString; +} + +export interface GetCourseByIdData { + course?: { + id: UUIDString; + title?: string | null; + description?: string | null; + thumbnailUrl?: string | null; + durationMinutes?: number | null; + xpReward?: number | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; + createdAt?: TimestampString | null; + category: { + id: UUIDString; + label: string; + } & Category_Key; + } & Course_Key; +} + +export interface GetCourseByIdVariables { + id: UUIDString; +} + +export interface GetCustomRateCardByIdData { + customRateCard?: { + id: UUIDString; + name: string; + baseBook?: string | null; + discount?: number | null; + isDefault?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & CustomRateCard_Key; +} + +export interface GetCustomRateCardByIdVariables { + id: UUIDString; +} + +export interface GetDocumentByIdData { + document?: { + id: UUIDString; + documentType: DocumentType; + name: string; + description?: string | null; + createdAt?: TimestampString | null; + } & Document_Key; +} + +export interface GetDocumentByIdVariables { + id: UUIDString; +} + +export interface GetEmergencyContactByIdData { + emergencyContact?: { + id: UUIDString; + name: string; + phone: string; + relationship: RelationshipType; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & EmergencyContact_Key; +} + +export interface GetEmergencyContactByIdVariables { + id: UUIDString; +} + +export interface GetEmergencyContactsByStaffIdData { + emergencyContacts: ({ + id: UUIDString; + name: string; + phone: string; + relationship: RelationshipType; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & EmergencyContact_Key)[]; +} + +export interface GetEmergencyContactsByStaffIdVariables { + staffId: UUIDString; +} + +export interface GetFaqDataByIdData { + faqData?: { + id: UUIDString; + category: string; + questions?: unknown[] | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & FaqData_Key; +} + +export interface GetFaqDataByIdVariables { + id: UUIDString; +} + +export interface GetHubByIdData { + hub?: { + id: UUIDString; + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Hub_Key; +} + +export interface GetHubByIdVariables { + id: UUIDString; +} + +export interface GetHubsByOwnerIdData { + hubs: ({ + id: UUIDString; + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Hub_Key)[]; +} + +export interface GetHubsByOwnerIdVariables { + ownerId: UUIDString; +} + +export interface GetInvoiceByIdData { + invoice?: { + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key; +} + +export interface GetInvoiceByIdVariables { + id: UUIDString; +} + +export interface GetInvoiceTemplateByIdData { + invoiceTemplate?: { + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key; +} + +export interface GetInvoiceTemplateByIdVariables { + id: UUIDString; +} + +export interface GetLevelByIdData { + level?: { + id: UUIDString; + name: string; + xpRequired: number; + icon?: string | null; + colors?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Level_Key; +} + +export interface GetLevelByIdVariables { + id: UUIDString; +} + +export interface GetMemberTaskByIdKeyData { + memberTask?: { + id: UUIDString; + task: { + id: UUIDString; + taskName: string; + description?: string | null; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + priority: TaskPriority; + } & Task_Key; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + }; +} + +export interface GetMemberTaskByIdKeyVariables { + teamMemberId: UUIDString; + taskId: UUIDString; +} + +export interface GetMemberTasksByTaskIdData { + memberTasks: ({ + id: UUIDString; + task: { + id: UUIDString; + taskName: string; + description?: string | null; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + priority: TaskPriority; + } & Task_Key; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + })[]; +} + +export interface GetMemberTasksByTaskIdVariables { + taskId: UUIDString; +} + +export interface GetMessageByIdData { + message?: { + id: UUIDString; + conversationId: UUIDString; + senderId: string; + content: string; + isSystem?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + }; + } & Message_Key; +} + +export interface GetMessageByIdVariables { + id: UUIDString; +} + +export interface GetMessagesByConversationIdData { + messages: ({ + id: UUIDString; + conversationId: UUIDString; + senderId: string; + content: string; + isSystem?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + }; + } & Message_Key)[]; +} + +export interface GetMessagesByConversationIdVariables { + conversationId: UUIDString; +} + +export interface GetMyTasksData { + memberTasks: ({ + id: UUIDString; + task: { + id: UUIDString; + taskName: string; + description?: string | null; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + priority: TaskPriority; + } & Task_Key; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + })[]; +} + +export interface GetMyTasksVariables { + teamMemberId: UUIDString; +} + +export interface GetOrderByIdData { + order?: { + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; +} + +export interface GetOrderByIdVariables { + id: UUIDString; +} + +export interface GetOrdersByBusinessIdData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} + +export interface GetOrdersByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface GetOrdersByDateRangeData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} + +export interface GetOrdersByDateRangeVariables { + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; +} + +export interface GetOrdersByStatusData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} + +export interface GetOrdersByStatusVariables { + status: OrderStatus; + offset?: number | null; + limit?: number | null; +} + +export interface GetOrdersByVendorIdData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} + +export interface GetOrdersByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface GetRapidOrdersData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} + +export interface GetRapidOrdersVariables { + offset?: number | null; + limit?: number | null; +} + +export interface GetRecentPaymentByIdData { + recentPayment?: { + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + role: { + name: string; + costPerHour: number; + }; + shift: { + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + description?: string | null; + }; + }; + }; + invoice: { + status: InvoiceStatus; + invoiceNumber: string; + issueDate: TimestampString; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + }; + } & RecentPayment_Key; +} + +export interface GetRecentPaymentByIdVariables { + id: UUIDString; +} + +export interface GetRoleByIdData { + role?: { + id: UUIDString; + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; + createdAt?: TimestampString | null; + } & Role_Key; +} + +export interface GetRoleByIdVariables { + id: UUIDString; +} + +export interface GetRoleCategoriesByCategoryData { + roleCategories: ({ + id: UUIDString; + roleName: string; + category: RoleCategoryType; + } & RoleCategory_Key)[]; +} + +export interface GetRoleCategoriesByCategoryVariables { + category: RoleCategoryType; +} + +export interface GetRoleCategoryByIdData { + roleCategory?: { + id: UUIDString; + roleName: string; + category: RoleCategoryType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & RoleCategory_Key; +} + +export interface GetRoleCategoryByIdVariables { + id: UUIDString; +} + +export interface GetShiftByIdData { + shift?: { + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; +} + +export interface GetShiftByIdVariables { + id: UUIDString; +} + +export interface GetShiftRoleByIdData { + shiftRole?: { + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + order: { + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + hubName: string; + }; + }; + }; + } & ShiftRole_Key; +} + +export interface GetShiftRoleByIdVariables { + shiftId: UUIDString; + roleId: UUIDString; +} + +export interface GetShiftsByBusinessIdData { + shifts: ({ + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key)[]; +} + +export interface GetShiftsByBusinessIdVariables { + businessId: UUIDString; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} + +export interface GetShiftsByVendorIdData { + shifts: ({ + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key)[]; +} + +export interface GetShiftsByVendorIdVariables { + vendorId: UUIDString; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} + +export interface GetStaffAvailabilityByKeyData { + staffAvailability?: { + id: UUIDString; + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status: AvailabilityStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailability_Key; +} + +export interface GetStaffAvailabilityByKeyVariables { + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; +} + +export interface GetStaffAvailabilityStatsByStaffIdData { + staffAvailabilityStats?: { + id: UUIDString; + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailabilityStats_Key; +} + +export interface GetStaffAvailabilityStatsByStaffIdVariables { + staffId: UUIDString; +} + +export interface GetStaffByIdData { + staff?: { + id: UUIDString; + userId: string; + fullName: string; + role?: string | null; + level?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + ownerId?: UUIDString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + } & Staff_Key; +} + +export interface GetStaffByIdVariables { + id: UUIDString; +} + +export interface GetStaffByUserIdData { + staffs: ({ + id: UUIDString; + userId: string; + fullName: string; + level?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + ownerId?: UUIDString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + } & Staff_Key)[]; +} + +export interface GetStaffByUserIdVariables { + userId: string; +} + +export interface GetStaffCourseByIdData { + staffCourse?: { + id: UUIDString; + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & StaffCourse_Key; +} + +export interface GetStaffCourseByIdVariables { + id: UUIDString; +} + +export interface GetStaffCourseByStaffAndCourseData { + staffCourses: ({ + id: UUIDString; + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & StaffCourse_Key)[]; +} + +export interface GetStaffCourseByStaffAndCourseVariables { + staffId: UUIDString; + courseId: UUIDString; +} + +export interface GetStaffDocumentByKeyData { + staffDocument?: { + id: UUIDString; + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + document: { + id: UUIDString; + name: string; + documentType: DocumentType; + description?: string | null; + } & Document_Key; + } & StaffDocument_Key; +} + +export interface GetStaffDocumentByKeyVariables { + staffId: UUIDString; + documentId: UUIDString; +} + +export interface GetStaffRoleByKeyData { + staffRole?: { + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + staff: { + id: UUIDString; + fullName: string; + userId: string; + email?: string | null; + phone?: string | null; + } & Staff_Key; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + } & StaffRole_Key; +} + +export interface GetStaffRoleByKeyVariables { + staffId: UUIDString; + roleId: UUIDString; +} + +export interface GetTaskByIdData { + task?: { + id: UUIDString; + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Task_Key; +} + +export interface GetTaskByIdVariables { + id: UUIDString; +} + +export interface GetTaskCommentByIdData { + taskComment?: { + id: UUIDString; + taskId: UUIDString; + teamMemberId: UUIDString; + comment: string; + isSystem: boolean; + createdAt?: TimestampString | null; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + } & TaskComment_Key; +} + +export interface GetTaskCommentByIdVariables { + id: UUIDString; +} + +export interface GetTaskCommentsByTaskIdData { + taskComments: ({ + id: UUIDString; + taskId: UUIDString; + teamMemberId: UUIDString; + comment: string; + isSystem: boolean; + createdAt?: TimestampString | null; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + } & TaskComment_Key)[]; +} + +export interface GetTaskCommentsByTaskIdVariables { + taskId: UUIDString; +} + +export interface GetTasksByOwnerIdData { + tasks: ({ + id: UUIDString; + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Task_Key)[]; +} + +export interface GetTasksByOwnerIdVariables { + ownerId: UUIDString; +} + +export interface GetTaxFormByIdData { + taxForm?: { + id: UUIDString; + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + street?: string | null; + country?: string | null; + apt?: string | null; + state?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & TaxForm_Key; +} + +export interface GetTaxFormByIdVariables { + id: UUIDString; +} + +export interface GetTaxFormsByStaffIdData { + taxForms: ({ + id: UUIDString; + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + street?: string | null; + country?: string | null; + apt?: string | null; + state?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & TaxForm_Key)[]; +} + +export interface GetTaxFormsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface GetTeamByIdData { + team?: { + id: UUIDString; + teamName: string; + ownerId: UUIDString; + ownerName: string; + ownerRole: string; + email?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Team_Key; +} + +export interface GetTeamByIdVariables { + id: UUIDString; +} + +export interface GetTeamHubByIdData { + teamHub?: { + id: UUIDString; + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive: boolean; + departments?: unknown | null; + } & TeamHub_Key; +} + +export interface GetTeamHubByIdVariables { + id: UUIDString; +} + +export interface GetTeamHubsByTeamIdData { + teamHubs: ({ + id: UUIDString; + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive: boolean; + departments?: unknown | null; + } & TeamHub_Key)[]; +} + +export interface GetTeamHubsByTeamIdVariables { + teamId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface GetTeamHudDepartmentByIdData { + teamHudDepartment?: { + id: UUIDString; + name: string; + costCenter?: string | null; + teamHubId: UUIDString; + teamHub: { + id: UUIDString; + hubName: string; + } & TeamHub_Key; + createdAt?: TimestampString | null; + } & TeamHudDepartment_Key; +} + +export interface GetTeamHudDepartmentByIdVariables { + id: UUIDString; +} + +export interface GetTeamMemberByIdData { + teamMember?: { + id: UUIDString; + teamId: UUIDString; + role: TeamMemberRole; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + email?: string | null; + }; + teamHub?: { + hubName: string; + }; + } & TeamMember_Key; +} + +export interface GetTeamMemberByIdVariables { + id: UUIDString; +} + +export interface GetTeamMembersByTeamIdData { + teamMembers: ({ + id: UUIDString; + teamId: UUIDString; + role: TeamMemberRole; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + email?: string | null; + }; + teamHub?: { + hubName: string; + }; + } & TeamMember_Key)[]; +} + +export interface GetTeamMembersByTeamIdVariables { + teamId: UUIDString; +} + +export interface GetTeamsByOwnerIdData { + teams: ({ + id: UUIDString; + teamName: string; + ownerId: UUIDString; + ownerName: string; + ownerRole: string; + email?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Team_Key)[]; +} + +export interface GetTeamsByOwnerIdVariables { + ownerId: UUIDString; +} + +export interface GetUserByIdData { + user?: { + id: string; + email?: string | null; + fullName?: string | null; + role: UserBaseRole; + userRole?: string | null; + photoUrl?: string | null; + } & User_Key; +} + +export interface GetUserByIdVariables { + id: string; +} + +export interface GetUserConversationByKeyData { + userConversation?: { + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key; +} + +export interface GetUserConversationByKeyVariables { + conversationId: UUIDString; + userId: string; +} + +export interface GetVendorBenefitPlanByIdData { + vendorBenefitPlan?: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key; +} + +export interface GetVendorBenefitPlanByIdVariables { + id: UUIDString; +} + +export interface GetVendorByIdData { + vendor?: { + id: UUIDString; + userId: string; + companyName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Vendor_Key; +} + +export interface GetVendorByIdVariables { + id: UUIDString; +} + +export interface GetVendorByUserIdData { + vendors: ({ + id: UUIDString; + userId: string; + companyName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Vendor_Key)[]; +} + +export interface GetVendorByUserIdVariables { + userId: string; +} + +export interface GetVendorRateByIdData { + vendorRate?: { + id: UUIDString; + vendorId: UUIDString; + roleName?: string | null; + category?: CategoryType | null; + clientRate?: number | null; + employeeWage?: number | null; + markupPercentage?: number | null; + vendorFeePercentage?: number | null; + isActive?: boolean | null; + notes?: string | null; + createdAt?: TimestampString | null; + vendor: { + companyName: string; + region?: string | null; + }; + } & VendorRate_Key; +} + +export interface GetVendorRateByIdVariables { + id: UUIDString; +} + +export interface GetWorkforceByIdData { + workforce?: { + id: UUIDString; + vendorId: UUIDString; + staffId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Workforce_Key; +} + +export interface GetWorkforceByIdVariables { + id: UUIDString; +} + +export interface GetWorkforceByVendorAndNumberData { + workforces: ({ + id: UUIDString; + staffId: UUIDString; + workforceNumber: string; + status?: WorkforceStatus | null; + } & Workforce_Key)[]; +} + +export interface GetWorkforceByVendorAndNumberVariables { + vendorId: UUIDString; + workforceNumber: string; +} + +export interface GetWorkforceByVendorAndStaffData { + workforces: ({ + id: UUIDString; + vendorId: UUIDString; + staffId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Workforce_Key)[]; +} + +export interface GetWorkforceByVendorAndStaffVariables { + vendorId: UUIDString; + staffId: UUIDString; +} + +export interface Hub_Key { + id: UUIDString; + __typename?: 'Hub_Key'; +} + +export interface IncrementUnreadForUserData { + userConversation_update?: UserConversation_Key | null; +} + +export interface IncrementUnreadForUserVariables { + conversationId: UUIDString; + userId: string; + unreadCount: number; +} + +export interface InvoiceTemplate_Key { + id: UUIDString; + __typename?: 'InvoiceTemplate_Key'; +} + +export interface Invoice_Key { + id: UUIDString; + __typename?: 'Invoice_Key'; +} + +export interface Level_Key { + id: UUIDString; + __typename?: 'Level_Key'; +} + +export interface ListAcceptedApplicationsByBusinessForDayData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + appliedAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + averageRating?: number | null; + } & Staff_Key; + } & Application_Key)[]; +} + +export interface ListAcceptedApplicationsByBusinessForDayVariables { + businessId: UUIDString; + dayStart: TimestampString; + dayEnd: TimestampString; + offset?: number | null; + limit?: number | null; +} + +export interface ListAcceptedApplicationsByShiftRoleKeyData { + applications: ({ + id: UUIDString; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + } & Staff_Key; + } & Application_Key)[]; +} + +export interface ListAcceptedApplicationsByShiftRoleKeyVariables { + shiftId: UUIDString; + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListAccountsData { + accounts: ({ + id: UUIDString; + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; + createdAt?: TimestampString | null; + } & Account_Key)[]; +} + +export interface ListActiveVendorBenefitPlansByVendorIdData { + vendorBenefitPlans: ({ + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key)[]; +} + +export interface ListActiveVendorBenefitPlansByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListActivityLogsByUserIdData { + activityLogs: ({ + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key)[]; +} + +export interface ListActivityLogsByUserIdVariables { + userId: string; + offset?: number | null; + limit?: number | null; +} + +export interface ListActivityLogsData { + activityLogs: ({ + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key)[]; +} + +export interface ListActivityLogsVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListApplicationsData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} + +export interface ListApplicationsForCoverageData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + } & Application_Key)[]; +} + +export interface ListApplicationsForCoverageVariables { + shiftIds: UUIDString[]; +} + +export interface ListApplicationsForDailyOpsData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + } & Application_Key)[]; +} + +export interface ListApplicationsForDailyOpsVariables { + shiftIds: UUIDString[]; +} + +export interface ListApplicationsForNoShowRangeData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + } & Application_Key)[]; +} + +export interface ListApplicationsForNoShowRangeVariables { + shiftIds: UUIDString[]; +} + +export interface ListApplicationsForPerformanceData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + } & Application_Key)[]; +} + +export interface ListApplicationsForPerformanceVariables { + shiftIds: UUIDString[]; +} + +export interface ListAssignmentsByShiftRoleData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + } & Assignment_Key)[]; +} + +export interface ListAssignmentsByShiftRoleVariables { + shiftId: UUIDString; + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListAssignmentsByWorkforceIdData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + }; + } & Assignment_Key)[]; +} + +export interface ListAssignmentsByWorkforceIdVariables { + workforceId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListAssignmentsByWorkforceIdsData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + role: { + id: UUIDString; + name: string; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + order: { + id: UUIDString; + eventName?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + }; + } & Assignment_Key)[]; +} + +export interface ListAssignmentsByWorkforceIdsVariables { + workforceIds: UUIDString[]; + offset?: number | null; + limit?: number | null; +} + +export interface ListAssignmentsData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + }; + } & Assignment_Key)[]; +} + +export interface ListAssignmentsVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListAttireOptionsData { + attireOptions: ({ + id: UUIDString; + itemId: string; + label: string; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; + createdAt?: TimestampString | null; + } & AttireOption_Key)[]; +} + +export interface ListBenefitsDataByStaffIdData { + benefitsDatas: ({ + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key)[]; +} + +export interface ListBenefitsDataByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListBenefitsDataByVendorBenefitPlanIdData { + benefitsDatas: ({ + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key)[]; +} + +export interface ListBenefitsDataByVendorBenefitPlanIdVariables { + vendorBenefitPlanId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListBenefitsDataByVendorBenefitPlanIdsData { + benefitsDatas: ({ + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key)[]; +} + +export interface ListBenefitsDataByVendorBenefitPlanIdsVariables { + vendorBenefitPlanIds: UUIDString[]; + offset?: number | null; + limit?: number | null; +} + +export interface ListBenefitsDataData { + benefitsDatas: ({ + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key)[]; +} + +export interface ListBenefitsDataVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListBusinessesData { + businesses: ({ + id: UUIDString; + businessName: string; + contactName?: string | null; + userId: string; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup: BusinessRateGroup; + status: BusinessStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & Business_Key)[]; +} + +export interface ListCategoriesData { + categories: ({ + id: UUIDString; + categoryId: string; + label: string; + icon?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Category_Key)[]; +} + +export interface ListCertificatesByStaffIdData { + certificates: ({ + id: UUIDString; + name: string; + description?: string | null; + expiry?: TimestampString | null; + status: CertificateStatus; + fileUrl?: string | null; + icon?: string | null; + staffId: UUIDString; + certificationType?: ComplianceType | null; + issuer?: string | null; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; + createdAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Certificate_Key)[]; +} + +export interface ListCertificatesByStaffIdVariables { + staffId: UUIDString; +} + +export interface ListCertificatesData { + certificates: ({ + id: UUIDString; + name: string; + description?: string | null; + expiry?: TimestampString | null; + status: CertificateStatus; + fileUrl?: string | null; + icon?: string | null; + staffId: UUIDString; + certificationType?: ComplianceType | null; + issuer?: string | null; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; + createdAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Certificate_Key)[]; +} + +export interface ListClientFeedbackRatingsByVendorIdData { + clientFeedbacks: ({ + id: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} + +export interface ListClientFeedbackRatingsByVendorIdVariables { + vendorId: UUIDString; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; +} + +export interface ListClientFeedbacksByBusinessAndVendorData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} + +export interface ListClientFeedbacksByBusinessAndVendorVariables { + businessId: UUIDString; + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListClientFeedbacksByBusinessIdData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} + +export interface ListClientFeedbacksByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListClientFeedbacksByVendorIdData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} + +export interface ListClientFeedbacksByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListClientFeedbacksData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} + +export interface ListClientFeedbacksVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListCompletedApplicationsByStaffIdData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + description?: string | null; + durationDays?: number | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} + +export interface ListCompletedApplicationsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListConversationsByStatusData { + conversations: ({ + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key)[]; +} + +export interface ListConversationsByStatusVariables { + status: ConversationStatus; + offset?: number | null; + limit?: number | null; +} + +export interface ListConversationsByTypeData { + conversations: ({ + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key)[]; +} + +export interface ListConversationsByTypeVariables { + conversationType: ConversationType; + offset?: number | null; + limit?: number | null; +} + +export interface ListConversationsData { + conversations: ({ + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key)[]; +} + +export interface ListConversationsVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListCoursesData { + courses: ({ + id: UUIDString; + title?: string | null; + description?: string | null; + thumbnailUrl?: string | null; + durationMinutes?: number | null; + xpReward?: number | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; + createdAt?: TimestampString | null; + category: { + id: UUIDString; + label: string; + } & Category_Key; + } & Course_Key)[]; +} + +export interface ListCustomRateCardsData { + customRateCards: ({ + id: UUIDString; + name: string; + baseBook?: string | null; + discount?: number | null; + isDefault?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & CustomRateCard_Key)[]; +} + +export interface ListDocumentsData { + documents: ({ + id: UUIDString; + documentType: DocumentType; + name: string; + description?: string | null; + createdAt?: TimestampString | null; + } & Document_Key)[]; +} + +export interface ListEmergencyContactsData { + emergencyContacts: ({ + id: UUIDString; + name: string; + phone: string; + relationship: RelationshipType; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & EmergencyContact_Key)[]; +} + +export interface ListFaqDatasData { + faqDatas: ({ + id: UUIDString; + category: string; + questions?: unknown[] | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & FaqData_Key)[]; +} + +export interface ListHubsData { + hubs: ({ + id: UUIDString; + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Hub_Key)[]; +} + +export interface ListInvoiceTemplatesByBusinessIdData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} + +export interface ListInvoiceTemplatesByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListInvoiceTemplatesByOrderIdData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} + +export interface ListInvoiceTemplatesByOrderIdVariables { + orderId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListInvoiceTemplatesByOwnerIdData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} + +export interface ListInvoiceTemplatesByOwnerIdVariables { + ownerId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListInvoiceTemplatesByVendorIdData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} + +export interface ListInvoiceTemplatesByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListInvoiceTemplatesData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} + +export interface ListInvoiceTemplatesVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListInvoicesByBusinessIdData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} + +export interface ListInvoicesByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListInvoicesByOrderIdData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} + +export interface ListInvoicesByOrderIdVariables { + orderId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListInvoicesByStatusData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} + +export interface ListInvoicesByStatusVariables { + status: InvoiceStatus; + offset?: number | null; + limit?: number | null; +} + +export interface ListInvoicesByVendorIdData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} + +export interface ListInvoicesByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListInvoicesData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} + +export interface ListInvoicesForSpendByBusinessData { + invoices: ({ + id: UUIDString; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + status: InvoiceStatus; + invoiceNumber: string; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + } & Invoice_Key)[]; +} + +export interface ListInvoicesForSpendByBusinessVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} + +export interface ListInvoicesForSpendByOrderData { + invoices: ({ + id: UUIDString; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + status: InvoiceStatus; + invoiceNumber: string; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + } & Invoice_Key)[]; +} + +export interface ListInvoicesForSpendByOrderVariables { + orderId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} + +export interface ListInvoicesForSpendByVendorData { + invoices: ({ + id: UUIDString; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + status: InvoiceStatus; + invoiceNumber: string; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + } & Invoice_Key)[]; +} + +export interface ListInvoicesForSpendByVendorVariables { + vendorId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} + +export interface ListInvoicesVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListLevelsData { + levels: ({ + id: UUIDString; + name: string; + xpRequired: number; + icon?: string | null; + colors?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Level_Key)[]; +} + +export interface ListMessagesData { + messages: ({ + id: UUIDString; + conversationId: UUIDString; + senderId: string; + content: string; + isSystem?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + }; + } & Message_Key)[]; +} + +export interface ListOrdersByBusinessAndTeamHubData { + orders: ({ + id: UUIDString; + eventName?: string | null; + orderType: OrderType; + status: OrderStatus; + duration?: OrderDuration | null; + businessId: UUIDString; + vendorId?: UUIDString | null; + teamHubId: UUIDString; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + requested?: number | null; + total?: number | null; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Order_Key)[]; +} + +export interface ListOrdersByBusinessAndTeamHubVariables { + businessId: UUIDString; + teamHubId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListOrdersData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} + +export interface ListOrdersVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListOverdueInvoicesData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} + +export interface ListOverdueInvoicesVariables { + now: TimestampString; + offset?: number | null; + limit?: number | null; +} + +export interface ListRecentPaymentsByApplicationIdData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + status: ApplicationStatus; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} + +export interface ListRecentPaymentsByApplicationIdVariables { + applicationId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListRecentPaymentsByBusinessIdData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + staffId: UUIDString; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + shiftRole: { + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + description?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} + +export interface ListRecentPaymentsByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListRecentPaymentsByInvoiceIdData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + staffId: UUIDString; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} + +export interface ListRecentPaymentsByInvoiceIdVariables { + invoiceId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListRecentPaymentsByInvoiceIdsData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} + +export interface ListRecentPaymentsByInvoiceIdsVariables { + invoiceIds: UUIDString[]; + offset?: number | null; + limit?: number | null; +} + +export interface ListRecentPaymentsByStaffIdData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + status: ApplicationStatus; + shiftRole: { + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} + +export interface ListRecentPaymentsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListRecentPaymentsByStatusData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} + +export interface ListRecentPaymentsByStatusVariables { + status: RecentPaymentStatus; + offset?: number | null; + limit?: number | null; +} + +export interface ListRecentPaymentsData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + role: { + name: string; + costPerHour: number; + }; + shift: { + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + description?: string | null; + }; + }; + }; + invoice: { + status: InvoiceStatus; + invoiceNumber: string; + issueDate: TimestampString; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + }; + } & RecentPayment_Key)[]; +} + +export interface ListRecentPaymentsVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListRoleCategoriesData { + roleCategories: ({ + id: UUIDString; + roleName: string; + category: RoleCategoryType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & RoleCategory_Key)[]; +} + +export interface ListRolesByVendorIdData { + roles: ({ + id: UUIDString; + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; + createdAt?: TimestampString | null; + } & Role_Key)[]; +} + +export interface ListRolesByVendorIdVariables { + vendorId: UUIDString; +} + +export interface ListRolesByroleCategoryIdData { + roles: ({ + id: UUIDString; + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; + createdAt?: TimestampString | null; + } & Role_Key)[]; +} + +export interface ListRolesByroleCategoryIdVariables { + roleCategoryId: UUIDString; +} + +export interface ListRolesData { + roles: ({ + id: UUIDString; + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; + createdAt?: TimestampString | null; + } & Role_Key)[]; +} + +export interface ListShiftRolesByBusinessAndDateRangeData { + shiftRoles: ({ + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + hours?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + } & Role_Key; + shift: { + id: UUIDString; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + title: string; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + } & Shift_Key; + } & ShiftRole_Key)[]; +} + +export interface ListShiftRolesByBusinessAndDateRangeVariables { + businessId: UUIDString; + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; + status?: ShiftStatus | null; +} + +export interface ListShiftRolesByBusinessAndDatesSummaryData { + shiftRoles: ({ + roleId: UUIDString; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + } & Role_Key; + })[]; +} + +export interface ListShiftRolesByBusinessAndDatesSummaryVariables { + businessId: UUIDString; + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; +} + +export interface ListShiftRolesByBusinessAndOrderData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + orderId: UUIDString; + location?: string | null; + locationAddress?: string | null; + order: { + vendorId?: UUIDString | null; + eventName?: string | null; + date?: TimestampString | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Shift_Key; + } & ShiftRole_Key)[]; +} + +export interface ListShiftRolesByBusinessAndOrderVariables { + businessId: UUIDString; + orderId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListShiftRolesByBusinessDateRangeCompletedOrdersData { + shiftRoles: ({ + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + hours?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + title: string; + status?: ShiftStatus | null; + order: { + id: UUIDString; + orderType: OrderType; + } & Order_Key; + } & Shift_Key; + } & ShiftRole_Key)[]; +} + +export interface ListShiftRolesByBusinessDateRangeCompletedOrdersVariables { + businessId: UUIDString; + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; +} + +export interface ListShiftRolesByRoleIdData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + order: { + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + }; + }; + } & ShiftRole_Key)[]; +} + +export interface ListShiftRolesByRoleIdVariables { + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListShiftRolesByShiftIdAndTimeRangeData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + order: { + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + }; + }; + } & ShiftRole_Key)[]; +} + +export interface ListShiftRolesByShiftIdAndTimeRangeVariables { + shiftId: UUIDString; + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; +} + +export interface ListShiftRolesByShiftIdData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + order: { + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + }; + }; + } & ShiftRole_Key)[]; +} + +export interface ListShiftRolesByShiftIdVariables { + shiftId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListShiftRolesByVendorIdData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + status?: ShiftStatus | null; + durationDays?: number | null; + order: { + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + } & ShiftRole_Key)[]; +} + +export interface ListShiftRolesByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListShiftsData { + shifts: ({ + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key)[]; +} + +export interface ListShiftsForCoverageData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} + +export interface ListShiftsForCoverageVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} + +export interface ListShiftsForDailyOpsByBusinessData { + shifts: ({ + id: UUIDString; + title: string; + location?: string | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} + +export interface ListShiftsForDailyOpsByBusinessVariables { + businessId: UUIDString; + date: TimestampString; +} + +export interface ListShiftsForDailyOpsByVendorData { + shifts: ({ + id: UUIDString; + title: string; + location?: string | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} + +export interface ListShiftsForDailyOpsByVendorVariables { + vendorId: UUIDString; + date: TimestampString; +} + +export interface ListShiftsForForecastByBusinessData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + workersNeeded?: number | null; + hours?: number | null; + cost?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} + +export interface ListShiftsForForecastByBusinessVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} + +export interface ListShiftsForForecastByVendorData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + workersNeeded?: number | null; + hours?: number | null; + cost?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} + +export interface ListShiftsForForecastByVendorVariables { + vendorId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} + +export interface ListShiftsForNoShowRangeByBusinessData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + } & Shift_Key)[]; +} + +export interface ListShiftsForNoShowRangeByBusinessVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} + +export interface ListShiftsForNoShowRangeByVendorData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + } & Shift_Key)[]; +} + +export interface ListShiftsForNoShowRangeByVendorVariables { + vendorId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} + +export interface ListShiftsForPerformanceByBusinessData { + shifts: ({ + id: UUIDString; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + createdAt?: TimestampString | null; + filledAt?: TimestampString | null; + } & Shift_Key)[]; +} + +export interface ListShiftsForPerformanceByBusinessVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} + +export interface ListShiftsForPerformanceByVendorData { + shifts: ({ + id: UUIDString; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + createdAt?: TimestampString | null; + filledAt?: TimestampString | null; + } & Shift_Key)[]; +} + +export interface ListShiftsForPerformanceByVendorVariables { + vendorId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} + +export interface ListShiftsVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListStaffAvailabilitiesByDayData { + staffAvailabilities: ({ + id: UUIDString; + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status: AvailabilityStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailability_Key)[]; +} + +export interface ListStaffAvailabilitiesByDayVariables { + day: DayOfWeek; + offset?: number | null; + limit?: number | null; +} + +export interface ListStaffAvailabilitiesByStaffIdData { + staffAvailabilities: ({ + id: UUIDString; + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status: AvailabilityStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailability_Key)[]; +} + +export interface ListStaffAvailabilitiesByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListStaffAvailabilitiesData { + staffAvailabilities: ({ + id: UUIDString; + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status: AvailabilityStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailability_Key)[]; +} + +export interface ListStaffAvailabilitiesVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListStaffAvailabilityStatsData { + staffAvailabilityStatss: ({ + id: UUIDString; + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailabilityStats_Key)[]; +} + +export interface ListStaffAvailabilityStatsVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListStaffCoursesByCourseIdData { + staffCourses: ({ + id: UUIDString; + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & StaffCourse_Key)[]; +} + +export interface ListStaffCoursesByCourseIdVariables { + courseId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListStaffCoursesByStaffIdData { + staffCourses: ({ + id: UUIDString; + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & StaffCourse_Key)[]; +} + +export interface ListStaffCoursesByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListStaffData { + staffs: ({ + id: UUIDString; + userId: string; + fullName: string; + level?: string | null; + role?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + ownerId?: UUIDString | null; + createdAt?: TimestampString | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + } & Staff_Key)[]; +} + +export interface ListStaffDocumentsByDocumentTypeData { + staffDocuments: ({ + id: UUIDString; + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; + document: { + id: UUIDString; + name: string; + documentType: DocumentType; + } & Document_Key; + } & StaffDocument_Key)[]; +} + +export interface ListStaffDocumentsByDocumentTypeVariables { + documentType: DocumentType; + offset?: number | null; + limit?: number | null; +} + +export interface ListStaffDocumentsByStaffIdData { + staffDocuments: ({ + id: UUIDString; + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + document: { + id: UUIDString; + name: string; + documentType: DocumentType; + } & Document_Key; + } & StaffDocument_Key)[]; +} + +export interface ListStaffDocumentsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListStaffDocumentsByStatusData { + staffDocuments: ({ + id: UUIDString; + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; + document: { + id: UUIDString; + name: string; + documentType: DocumentType; + } & Document_Key; + } & StaffDocument_Key)[]; +} + +export interface ListStaffDocumentsByStatusVariables { + status: DocumentStatus; + offset?: number | null; + limit?: number | null; +} + +export interface ListStaffForNoShowReportData { + staffs: ({ + id: UUIDString; + fullName: string; + noShowCount?: number | null; + reliabilityScore?: number | null; + } & Staff_Key)[]; +} + +export interface ListStaffForNoShowReportVariables { + staffIds: UUIDString[]; +} + +export interface ListStaffForPerformanceData { + staffs: ({ + id: UUIDString; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + reliabilityScore?: number | null; + } & Staff_Key)[]; +} + +export interface ListStaffForPerformanceVariables { + staffIds: UUIDString[]; +} + +export interface ListStaffRolesByRoleIdData { + staffRoles: ({ + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + staff: { + id: UUIDString; + fullName: string; + userId: string; + email?: string | null; + phone?: string | null; + } & Staff_Key; + } & StaffRole_Key)[]; +} + +export interface ListStaffRolesByRoleIdVariables { + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListStaffRolesByStaffIdData { + staffRoles: ({ + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + } & StaffRole_Key)[]; +} + +export interface ListStaffRolesByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListStaffRolesData { + staffRoles: ({ + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + staff: { + id: UUIDString; + fullName: string; + userId: string; + email?: string | null; + phone?: string | null; + } & Staff_Key; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + } & StaffRole_Key)[]; +} + +export interface ListStaffRolesVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListStaffsApplicationsByBusinessForDayData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + appliedAt?: TimestampString | null; + status: ApplicationStatus; + shiftRole: { + shift: { + location?: string | null; + cost?: number | null; + }; + count: number; + assigned?: number | null; + hours?: number | null; + role: { + name: string; + }; + }; + staff: { + id: UUIDString; + fullName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + } & Staff_Key; + } & Application_Key)[]; +} + +export interface ListStaffsApplicationsByBusinessForDayVariables { + businessId: UUIDString; + dayStart: TimestampString; + dayEnd: TimestampString; + offset?: number | null; + limit?: number | null; +} + +export interface ListTaskCommentsData { + taskComments: ({ + id: UUIDString; + taskId: UUIDString; + teamMemberId: UUIDString; + comment: string; + isSystem: boolean; + createdAt?: TimestampString | null; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + } & TaskComment_Key)[]; +} + +export interface ListTasksData { + tasks: ({ + id: UUIDString; + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Task_Key)[]; +} + +export interface ListTaxFormsData { + taxForms: ({ + id: UUIDString; + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + street?: string | null; + country?: string | null; + apt?: string | null; + state?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & TaxForm_Key)[]; +} + +export interface ListTaxFormsVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListTaxFormsWhereData { + taxForms: ({ + id: UUIDString; + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + street?: string | null; + country?: string | null; + apt?: string | null; + state?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & TaxForm_Key)[]; +} + +export interface ListTaxFormsWhereVariables { + formType?: TaxFormType | null; + status?: TaxFormStatus | null; + staffId?: UUIDString | null; + offset?: number | null; + limit?: number | null; +} + +export interface ListTeamHubsByOwnerIdData { + teamHubs: ({ + id: UUIDString; + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive: boolean; + departments?: unknown | null; + } & TeamHub_Key)[]; +} + +export interface ListTeamHubsByOwnerIdVariables { + ownerId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListTeamHubsData { + teamHubs: ({ + id: UUIDString; + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive: boolean; + departments?: unknown | null; + } & TeamHub_Key)[]; +} + +export interface ListTeamHubsVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListTeamHudDepartmentsByTeamHubIdData { + teamHudDepartments: ({ + id: UUIDString; + name: string; + costCenter?: string | null; + teamHubId: UUIDString; + teamHub: { + id: UUIDString; + hubName: string; + } & TeamHub_Key; + createdAt?: TimestampString | null; + } & TeamHudDepartment_Key)[]; +} + +export interface ListTeamHudDepartmentsByTeamHubIdVariables { + teamHubId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListTeamHudDepartmentsData { + teamHudDepartments: ({ + id: UUIDString; + name: string; + costCenter?: string | null; + teamHubId: UUIDString; + teamHub: { + id: UUIDString; + hubName: string; + } & TeamHub_Key; + createdAt?: TimestampString | null; + } & TeamHudDepartment_Key)[]; +} + +export interface ListTeamHudDepartmentsVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListTeamMembersData { + teamMembers: ({ + id: UUIDString; + teamId: UUIDString; + role: TeamMemberRole; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + email?: string | null; + }; + teamHub?: { + hubName: string; + }; + } & TeamMember_Key)[]; +} + +export interface ListTeamsData { + teams: ({ + id: UUIDString; + teamName: string; + ownerId: UUIDString; + ownerName: string; + ownerRole: string; + email?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Team_Key)[]; +} + +export interface ListTimesheetsForSpendData { + shiftRoles: ({ + id: UUIDString; + hours?: number | null; + totalValue?: number | null; + shift: { + title: string; + location?: string | null; + status?: ShiftStatus | null; + date?: TimestampString | null; + order: { + business: { + businessName: string; + }; + }; + }; + role: { + costPerHour: number; + }; + })[]; +} + +export interface ListTimesheetsForSpendVariables { + startTime: TimestampString; + endTime: TimestampString; +} + +export interface ListUnreadActivityLogsByUserIdData { + activityLogs: ({ + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key)[]; +} + +export interface ListUnreadActivityLogsByUserIdVariables { + userId: string; + offset?: number | null; + limit?: number | null; +} + +export interface ListUnreadUserConversationsByUserIdData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + } & Conversation_Key; + } & UserConversation_Key)[]; +} + +export interface ListUnreadUserConversationsByUserIdVariables { + userId: string; + offset?: number | null; + limit?: number | null; +} + +export interface ListUserConversationsByConversationIdData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key)[]; +} + +export interface ListUserConversationsByConversationIdVariables { + conversationId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListUserConversationsByUserIdData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key)[]; +} + +export interface ListUserConversationsByUserIdVariables { + userId: string; + offset?: number | null; + limit?: number | null; +} + +export interface ListUserConversationsData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key)[]; +} + +export interface ListUserConversationsVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListUsersData { + users: ({ + id: string; + email?: string | null; + fullName?: string | null; + role: UserBaseRole; + userRole?: string | null; + photoUrl?: string | null; + createdDate?: TimestampString | null; + updatedDate?: TimestampString | null; + } & User_Key)[]; +} + +export interface ListVendorBenefitPlansByVendorIdData { + vendorBenefitPlans: ({ + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key)[]; +} + +export interface ListVendorBenefitPlansByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListVendorBenefitPlansData { + vendorBenefitPlans: ({ + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key)[]; +} + +export interface ListVendorBenefitPlansVariables { + offset?: number | null; + limit?: number | null; +} + +export interface ListVendorRatesData { + vendorRates: ({ + id: UUIDString; + vendorId: UUIDString; + roleName?: string | null; + category?: CategoryType | null; + clientRate?: number | null; + employeeWage?: number | null; + markupPercentage?: number | null; + vendorFeePercentage?: number | null; + isActive?: boolean | null; + notes?: string | null; + createdAt?: TimestampString | null; + vendor: { + companyName: string; + region?: string | null; + }; + } & VendorRate_Key)[]; +} + +export interface ListVendorsData { + vendors: ({ + id: UUIDString; + userId: string; + companyName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Vendor_Key)[]; +} + +export interface ListWorkforceByStaffIdData { + workforces: ({ + id: UUIDString; + vendorId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Workforce_Key)[]; +} + +export interface ListWorkforceByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface ListWorkforceByVendorIdData { + workforces: ({ + id: UUIDString; + staffId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; + createdAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key)[]; +} + +export interface ListWorkforceByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} + +export interface MarkActivityLogAsReadData { + activityLog_update?: ActivityLog_Key | null; +} + +export interface MarkActivityLogAsReadVariables { + id: UUIDString; +} + +export interface MarkActivityLogsAsReadData { + activityLog_updateMany: number; +} + +export interface MarkActivityLogsAsReadVariables { + ids: UUIDString[]; +} + +export interface MarkConversationAsReadData { + userConversation_update?: UserConversation_Key | null; +} + +export interface MarkConversationAsReadVariables { + conversationId: UUIDString; + userId: string; + lastReadAt?: TimestampString | null; +} + +export interface MemberTask_Key { + teamMemberId: UUIDString; + taskId: UUIDString; + __typename?: 'MemberTask_Key'; +} + +export interface Message_Key { + id: UUIDString; + __typename?: 'Message_Key'; +} + +export interface Order_Key { + id: UUIDString; + __typename?: 'Order_Key'; +} + +export interface RecentPayment_Key { + id: UUIDString; + __typename?: 'RecentPayment_Key'; +} + +export interface RoleCategory_Key { + id: UUIDString; + __typename?: 'RoleCategory_Key'; +} + +export interface Role_Key { + id: UUIDString; + __typename?: 'Role_Key'; +} + +export interface SearchInvoiceTemplatesByOwnerAndNameData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} + +export interface SearchInvoiceTemplatesByOwnerAndNameVariables { + ownerId: UUIDString; + name: string; + offset?: number | null; + limit?: number | null; +} + +export interface ShiftRole_Key { + shiftId: UUIDString; + roleId: UUIDString; + __typename?: 'ShiftRole_Key'; +} + +export interface Shift_Key { + id: UUIDString; + __typename?: 'Shift_Key'; +} + +export interface StaffAvailabilityStats_Key { + staffId: UUIDString; + __typename?: 'StaffAvailabilityStats_Key'; +} + +export interface StaffAvailability_Key { + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + __typename?: 'StaffAvailability_Key'; +} + +export interface StaffCourse_Key { + id: UUIDString; + __typename?: 'StaffCourse_Key'; +} + +export interface StaffDocument_Key { + staffId: UUIDString; + documentId: UUIDString; + __typename?: 'StaffDocument_Key'; +} + +export interface StaffRole_Key { + staffId: UUIDString; + roleId: UUIDString; + __typename?: 'StaffRole_Key'; +} + +export interface Staff_Key { + id: UUIDString; + __typename?: 'Staff_Key'; +} + +export interface TaskComment_Key { + id: UUIDString; + __typename?: 'TaskComment_Key'; +} + +export interface Task_Key { + id: UUIDString; + __typename?: 'Task_Key'; +} + +export interface TaxForm_Key { + id: UUIDString; + __typename?: 'TaxForm_Key'; +} + +export interface TeamHub_Key { + id: UUIDString; + __typename?: 'TeamHub_Key'; +} + +export interface TeamHudDepartment_Key { + id: UUIDString; + __typename?: 'TeamHudDepartment_Key'; +} + +export interface TeamMember_Key { + id: UUIDString; + __typename?: 'TeamMember_Key'; +} + +export interface Team_Key { + id: UUIDString; + __typename?: 'Team_Key'; +} + +export interface UpdateAccountData { + account_update?: Account_Key | null; +} + +export interface UpdateAccountVariables { + id: UUIDString; + bank?: string | null; + type?: AccountType | null; + last4?: string | null; + isPrimary?: boolean | null; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; +} + +export interface UpdateActivityLogData { + activityLog_update?: ActivityLog_Key | null; +} + +export interface UpdateActivityLogVariables { + id: UUIDString; + userId?: string | null; + date?: TimestampString | null; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title?: string | null; + description?: string | null; + isRead?: boolean | null; + activityType?: ActivityType | null; +} + +export interface UpdateApplicationStatusData { + application_update?: Application_Key | null; +} + +export interface UpdateApplicationStatusVariables { + id: UUIDString; + shiftId?: UUIDString | null; + staffId?: UUIDString | null; + status?: ApplicationStatus | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + roleId?: UUIDString | null; +} + +export interface UpdateAssignmentData { + assignment_update?: Assignment_Key | null; +} + +export interface UpdateAssignmentVariables { + id: UUIDString; + title?: string | null; + description?: string | null; + instructions?: string | null; + status?: AssignmentStatus | null; + tipsAvailable?: boolean | null; + travelTime?: boolean | null; + mealProvided?: boolean | null; + parkingAvailable?: boolean | null; + gasCompensation?: boolean | null; + managers?: unknown[] | null; + roleId: UUIDString; + shiftId: UUIDString; +} + +export interface UpdateAttireOptionData { + attireOption_update?: AttireOption_Key | null; +} + +export interface UpdateAttireOptionVariables { + id: UUIDString; + itemId?: string | null; + label?: string | null; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; +} + +export interface UpdateBenefitsDataData { + benefitsData_update?: BenefitsData_Key | null; +} + +export interface UpdateBenefitsDataVariables { + staffId: UUIDString; + vendorBenefitPlanId: UUIDString; + current?: number | null; +} + +export interface UpdateBusinessData { + business_update?: Business_Key | null; +} + +export interface UpdateBusinessVariables { + id: UUIDString; + businessName?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup?: BusinessRateGroup | null; + status?: BusinessStatus | null; + notes?: string | null; +} + +export interface UpdateCategoryData { + category_update?: Category_Key | null; +} + +export interface UpdateCategoryVariables { + id: UUIDString; + categoryId?: string | null; + label?: string | null; + icon?: string | null; +} + +export interface UpdateCertificateData { + certificate_update?: Certificate_Key | null; +} + +export interface UpdateCertificateVariables { + id: UUIDString; + name?: string | null; + description?: string | null; + expiry?: TimestampString | null; + status?: CertificateStatus | null; + fileUrl?: string | null; + icon?: string | null; + staffId?: UUIDString | null; + certificationType?: ComplianceType | null; + issuer?: string | null; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; +} + +export interface UpdateClientFeedbackData { + clientFeedback_update?: ClientFeedback_Key | null; +} + +export interface UpdateClientFeedbackVariables { + id: UUIDString; + businessId?: UUIDString | null; + vendorId?: UUIDString | null; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdBy?: string | null; +} + +export interface UpdateConversationData { + conversation_update?: Conversation_Key | null; +} + +export interface UpdateConversationLastMessageData { + conversation_update?: Conversation_Key | null; +} + +export interface UpdateConversationLastMessageVariables { + id: UUIDString; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; +} + +export interface UpdateConversationVariables { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; +} + +export interface UpdateCourseData { + course_update?: Course_Key | null; +} + +export interface UpdateCourseVariables { + id: UUIDString; + title?: string | null; + description?: string | null; + thumbnailUrl?: string | null; + durationMinutes?: number | null; + xpReward?: number | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; +} + +export interface UpdateCustomRateCardData { + customRateCard_update?: CustomRateCard_Key | null; +} + +export interface UpdateCustomRateCardVariables { + id: UUIDString; + name?: string | null; + baseBook?: string | null; + discount?: number | null; + isDefault?: boolean | null; +} + +export interface UpdateDocumentData { + document_update?: Document_Key | null; +} + +export interface UpdateDocumentVariables { + id: UUIDString; + documentType?: DocumentType | null; + name?: string | null; + description?: string | null; +} + +export interface UpdateEmergencyContactData { + emergencyContact_update?: EmergencyContact_Key | null; +} + +export interface UpdateEmergencyContactVariables { + id: UUIDString; + name?: string | null; + phone?: string | null; + relationship?: RelationshipType | null; +} + +export interface UpdateFaqDataData { + faqData_update?: FaqData_Key | null; +} + +export interface UpdateFaqDataVariables { + id: UUIDString; + category?: string | null; + questions?: unknown[] | null; +} + +export interface UpdateHubData { + hub_update?: Hub_Key | null; +} + +export interface UpdateHubVariables { + id: UUIDString; + name?: string | null; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId?: UUIDString | null; +} + +export interface UpdateInvoiceData { + invoice_update?: Invoice_Key | null; +} + +export interface UpdateInvoiceTemplateData { + invoiceTemplate_update?: InvoiceTemplate_Key | null; +} + +export interface UpdateInvoiceTemplateVariables { + id: UUIDString; + name?: string | null; + ownerId?: UUIDString | null; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; +} + +export interface UpdateInvoiceVariables { + id: UUIDString; + status?: InvoiceStatus | null; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; +} + +export interface UpdateLevelData { + level_update?: Level_Key | null; +} + +export interface UpdateLevelVariables { + id: UUIDString; + name?: string | null; + xpRequired?: number | null; + icon?: string | null; + colors?: unknown | null; +} + +export interface UpdateMessageData { + message_update?: Message_Key | null; +} + +export interface UpdateMessageVariables { + id: UUIDString; + conversationId?: UUIDString | null; + senderId?: string | null; + content?: string | null; + isSystem?: boolean | null; +} + +export interface UpdateOrderData { + order_update?: Order_Key | null; +} + +export interface UpdateOrderVariables { + id: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + status?: OrderStatus | null; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + total?: number | null; + eventName?: string | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + teamHubId: UUIDString; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + detectedConflicts?: unknown | null; + poReference?: string | null; +} + +export interface UpdateRecentPaymentData { + recentPayment_update?: RecentPayment_Key | null; +} + +export interface UpdateRecentPaymentVariables { + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId?: UUIDString | null; + applicationId?: UUIDString | null; + invoiceId?: UUIDString | null; +} + +export interface UpdateRoleCategoryData { + roleCategory_update?: RoleCategory_Key | null; +} + +export interface UpdateRoleCategoryVariables { + id: UUIDString; + roleName?: string | null; + category?: RoleCategoryType | null; +} + +export interface UpdateRoleData { + role_update?: Role_Key | null; +} + +export interface UpdateRoleVariables { + id: UUIDString; + name?: string | null; + costPerHour?: number | null; + roleCategoryId: UUIDString; +} + +export interface UpdateShiftData { + shift_update?: Shift_Key | null; +} + +export interface UpdateShiftRoleData { + shiftRole_update?: ShiftRole_Key | null; +} + +export interface UpdateShiftRoleVariables { + shiftId: UUIDString; + roleId: UUIDString; + count?: number | null; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; +} + +export interface UpdateShiftVariables { + id: UUIDString; + title?: string | null; + orderId?: UUIDString | null; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; +} + +export interface UpdateStaffAvailabilityData { + staffAvailability_update?: StaffAvailability_Key | null; +} + +export interface UpdateStaffAvailabilityStatsData { + staffAvailabilityStats_update?: StaffAvailabilityStats_Key | null; +} + +export interface UpdateStaffAvailabilityStatsVariables { + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; +} + +export interface UpdateStaffAvailabilityVariables { + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status?: AvailabilityStatus | null; + notes?: string | null; +} + +export interface UpdateStaffCourseData { + staffCourse_update?: StaffCourse_Key | null; +} + +export interface UpdateStaffCourseVariables { + id: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; +} + +export interface UpdateStaffData { + staff_update?: Staff_Key | null; +} + +export interface UpdateStaffDocumentData { + staffDocument_update?: StaffDocument_Key | null; +} + +export interface UpdateStaffDocumentVariables { + staffId: UUIDString; + documentId: UUIDString; + status?: DocumentStatus | null; + documentUrl?: string | null; + expiryDate?: TimestampString | null; +} + +export interface UpdateStaffVariables { + id: UUIDString; + userId?: string | null; + fullName?: string | null; + level?: string | null; + role?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + ownerId?: UUIDString | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; +} + +export interface UpdateTaskCommentData { + taskComment_update?: TaskComment_Key | null; +} + +export interface UpdateTaskCommentVariables { + id: UUIDString; + comment?: string | null; + isSystem?: boolean | null; +} + +export interface UpdateTaskData { + task_update?: Task_Key | null; +} + +export interface UpdateTaskVariables { + id: UUIDString; + taskName?: string | null; + description?: string | null; + priority?: TaskPriority | null; + status?: TaskStatus | null; + dueDate?: TimestampString | null; + progress?: number | null; + assignedMembers?: unknown | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; +} + +export interface UpdateTaxFormData { + taxForm_update?: TaxForm_Key | null; +} + +export interface UpdateTaxFormVariables { + id: UUIDString; + formType?: TaxFormType | null; + firstName?: string | null; + lastName?: string | null; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN?: number | null; + email?: string | null; + phone?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + apt?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status?: TaxFormStatus | null; +} + +export interface UpdateTeamData { + team_update?: Team_Key | null; +} + +export interface UpdateTeamHubData { + teamHub_update?: TeamHub_Key | null; +} + +export interface UpdateTeamHubVariables { + id: UUIDString; + teamId?: UUIDString | null; + hubName?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive?: boolean | null; + departments?: unknown | null; +} + +export interface UpdateTeamHudDepartmentData { + teamHudDepartment_update?: TeamHudDepartment_Key | null; +} + +export interface UpdateTeamHudDepartmentVariables { + id: UUIDString; + name?: string | null; + costCenter?: string | null; + teamHubId?: UUIDString | null; +} + +export interface UpdateTeamMemberData { + teamMember_update?: TeamMember_Key | null; +} + +export interface UpdateTeamMemberInviteStatusData { + teamMember_update?: TeamMember_Key | null; +} + +export interface UpdateTeamMemberInviteStatusVariables { + id: UUIDString; + inviteStatus: TeamMemberInviteStatus; +} + +export interface UpdateTeamMemberVariables { + id: UUIDString; + role?: TeamMemberRole | null; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + inviteStatus?: TeamMemberInviteStatus | null; +} + +export interface UpdateTeamVariables { + id: UUIDString; + teamName?: string | null; + ownerName?: string | null; + ownerRole?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; +} + +export interface UpdateUserConversationData { + userConversation_update?: UserConversation_Key | null; +} + +export interface UpdateUserConversationVariables { + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; +} + +export interface UpdateUserData { + user_update?: User_Key | null; +} + +export interface UpdateUserVariables { + id: string; + email?: string | null; + fullName?: string | null; + role?: UserBaseRole | null; + userRole?: string | null; + photoUrl?: string | null; +} + +export interface UpdateVendorBenefitPlanData { + vendorBenefitPlan_update?: VendorBenefitPlan_Key | null; +} + +export interface UpdateVendorBenefitPlanVariables { + id: UUIDString; + vendorId?: UUIDString | null; + title?: string | null; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdBy?: string | null; +} + +export interface UpdateVendorData { + vendor_update?: Vendor_Key | null; +} + +export interface UpdateVendorRateData { + vendorRate_update?: VendorRate_Key | null; +} + +export interface UpdateVendorRateVariables { + id: UUIDString; + vendorId?: UUIDString | null; + roleName?: string | null; + category?: CategoryType | null; + clientRate?: number | null; + employeeWage?: number | null; + markupPercentage?: number | null; + vendorFeePercentage?: number | null; + isActive?: boolean | null; + notes?: string | null; +} + +export interface UpdateVendorVariables { + id: UUIDString; + companyName?: string | null; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; +} + +export interface UpdateWorkforceData { + workforce_update?: Workforce_Key | null; +} + +export interface UpdateWorkforceVariables { + id: UUIDString; + workforceNumber?: string | null; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; +} + +export interface UserConversation_Key { + conversationId: UUIDString; + userId: string; + __typename?: 'UserConversation_Key'; +} + +export interface User_Key { + id: string; + __typename?: 'User_Key'; +} + +export interface VaidateDayStaffApplicationData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + durationDays?: number | null; + description?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} + +export interface VaidateDayStaffApplicationVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; + dayStart?: TimestampString | null; + dayEnd?: TimestampString | null; +} + +export interface VendorBenefitPlan_Key { + id: UUIDString; + __typename?: 'VendorBenefitPlan_Key'; +} + +export interface VendorRate_Key { + id: UUIDString; + __typename?: 'VendorRate_Key'; +} + +export interface Vendor_Key { + id: UUIDString; + __typename?: 'Vendor_Key'; +} + +export interface Workforce_Key { + id: UUIDString; + __typename?: 'Workforce_Key'; +} + +interface CreateBenefitsDataRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateBenefitsDataVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateBenefitsDataVariables): MutationRef; + operationName: string; +} +export const createBenefitsDataRef: CreateBenefitsDataRef; + +export function createBenefitsData(vars: CreateBenefitsDataVariables): MutationPromise; +export function createBenefitsData(dc: DataConnect, vars: CreateBenefitsDataVariables): MutationPromise; + +interface UpdateBenefitsDataRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateBenefitsDataVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateBenefitsDataVariables): MutationRef; + operationName: string; +} +export const updateBenefitsDataRef: UpdateBenefitsDataRef; + +export function updateBenefitsData(vars: UpdateBenefitsDataVariables): MutationPromise; +export function updateBenefitsData(dc: DataConnect, vars: UpdateBenefitsDataVariables): MutationPromise; + +interface DeleteBenefitsDataRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteBenefitsDataVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteBenefitsDataVariables): MutationRef; + operationName: string; +} +export const deleteBenefitsDataRef: DeleteBenefitsDataRef; + +export function deleteBenefitsData(vars: DeleteBenefitsDataVariables): MutationPromise; +export function deleteBenefitsData(dc: DataConnect, vars: DeleteBenefitsDataVariables): MutationPromise; + +interface ListShiftsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListShiftsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListShiftsVariables): QueryRef; + operationName: string; +} +export const listShiftsRef: ListShiftsRef; + +export function listShifts(vars?: ListShiftsVariables): QueryPromise; +export function listShifts(dc: DataConnect, vars?: ListShiftsVariables): QueryPromise; + +interface GetShiftByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetShiftByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetShiftByIdVariables): QueryRef; + operationName: string; +} +export const getShiftByIdRef: GetShiftByIdRef; + +export function getShiftById(vars: GetShiftByIdVariables): QueryPromise; +export function getShiftById(dc: DataConnect, vars: GetShiftByIdVariables): QueryPromise; + +interface FilterShiftsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterShiftsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterShiftsVariables): QueryRef; + operationName: string; +} +export const filterShiftsRef: FilterShiftsRef; + +export function filterShifts(vars?: FilterShiftsVariables): QueryPromise; +export function filterShifts(dc: DataConnect, vars?: FilterShiftsVariables): QueryPromise; + +interface GetShiftsByBusinessIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetShiftsByBusinessIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetShiftsByBusinessIdVariables): QueryRef; + operationName: string; +} +export const getShiftsByBusinessIdRef: GetShiftsByBusinessIdRef; + +export function getShiftsByBusinessId(vars: GetShiftsByBusinessIdVariables): QueryPromise; +export function getShiftsByBusinessId(dc: DataConnect, vars: GetShiftsByBusinessIdVariables): QueryPromise; + +interface GetShiftsByVendorIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetShiftsByVendorIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetShiftsByVendorIdVariables): QueryRef; + operationName: string; +} +export const getShiftsByVendorIdRef: GetShiftsByVendorIdRef; + +export function getShiftsByVendorId(vars: GetShiftsByVendorIdVariables): QueryPromise; +export function getShiftsByVendorId(dc: DataConnect, vars: GetShiftsByVendorIdVariables): QueryPromise; + +interface CreateStaffDocumentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateStaffDocumentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateStaffDocumentVariables): MutationRef; + operationName: string; +} +export const createStaffDocumentRef: CreateStaffDocumentRef; + +export function createStaffDocument(vars: CreateStaffDocumentVariables): MutationPromise; +export function createStaffDocument(dc: DataConnect, vars: CreateStaffDocumentVariables): MutationPromise; + +interface UpdateStaffDocumentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateStaffDocumentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateStaffDocumentVariables): MutationRef; + operationName: string; +} +export const updateStaffDocumentRef: UpdateStaffDocumentRef; + +export function updateStaffDocument(vars: UpdateStaffDocumentVariables): MutationPromise; +export function updateStaffDocument(dc: DataConnect, vars: UpdateStaffDocumentVariables): MutationPromise; + +interface DeleteStaffDocumentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteStaffDocumentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteStaffDocumentVariables): MutationRef; + operationName: string; +} +export const deleteStaffDocumentRef: DeleteStaffDocumentRef; + +export function deleteStaffDocument(vars: DeleteStaffDocumentVariables): MutationPromise; +export function deleteStaffDocument(dc: DataConnect, vars: DeleteStaffDocumentVariables): MutationPromise; + +interface ListEmergencyContactsRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listEmergencyContactsRef: ListEmergencyContactsRef; + +export function listEmergencyContacts(): QueryPromise; +export function listEmergencyContacts(dc: DataConnect): QueryPromise; + +interface GetEmergencyContactByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetEmergencyContactByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetEmergencyContactByIdVariables): QueryRef; + operationName: string; +} +export const getEmergencyContactByIdRef: GetEmergencyContactByIdRef; + +export function getEmergencyContactById(vars: GetEmergencyContactByIdVariables): QueryPromise; +export function getEmergencyContactById(dc: DataConnect, vars: GetEmergencyContactByIdVariables): QueryPromise; + +interface GetEmergencyContactsByStaffIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetEmergencyContactsByStaffIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetEmergencyContactsByStaffIdVariables): QueryRef; + operationName: string; +} +export const getEmergencyContactsByStaffIdRef: GetEmergencyContactsByStaffIdRef; + +export function getEmergencyContactsByStaffId(vars: GetEmergencyContactsByStaffIdVariables): QueryPromise; +export function getEmergencyContactsByStaffId(dc: DataConnect, vars: GetEmergencyContactsByStaffIdVariables): QueryPromise; + +interface GetMyTasksRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetMyTasksVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetMyTasksVariables): QueryRef; + operationName: string; +} +export const getMyTasksRef: GetMyTasksRef; + +export function getMyTasks(vars: GetMyTasksVariables): QueryPromise; +export function getMyTasks(dc: DataConnect, vars: GetMyTasksVariables): QueryPromise; + +interface GetMemberTaskByIdKeyRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetMemberTaskByIdKeyVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetMemberTaskByIdKeyVariables): QueryRef; + operationName: string; +} +export const getMemberTaskByIdKeyRef: GetMemberTaskByIdKeyRef; + +export function getMemberTaskByIdKey(vars: GetMemberTaskByIdKeyVariables): QueryPromise; +export function getMemberTaskByIdKey(dc: DataConnect, vars: GetMemberTaskByIdKeyVariables): QueryPromise; + +interface GetMemberTasksByTaskIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetMemberTasksByTaskIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetMemberTasksByTaskIdVariables): QueryRef; + operationName: string; +} +export const getMemberTasksByTaskIdRef: GetMemberTasksByTaskIdRef; + +export function getMemberTasksByTaskId(vars: GetMemberTasksByTaskIdVariables): QueryPromise; +export function getMemberTasksByTaskId(dc: DataConnect, vars: GetMemberTasksByTaskIdVariables): QueryPromise; + +interface CreateTeamHudDepartmentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTeamHudDepartmentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateTeamHudDepartmentVariables): MutationRef; + operationName: string; +} +export const createTeamHudDepartmentRef: CreateTeamHudDepartmentRef; + +export function createTeamHudDepartment(vars: CreateTeamHudDepartmentVariables): MutationPromise; +export function createTeamHudDepartment(dc: DataConnect, vars: CreateTeamHudDepartmentVariables): MutationPromise; + +interface UpdateTeamHudDepartmentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTeamHudDepartmentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateTeamHudDepartmentVariables): MutationRef; + operationName: string; +} +export const updateTeamHudDepartmentRef: UpdateTeamHudDepartmentRef; + +export function updateTeamHudDepartment(vars: UpdateTeamHudDepartmentVariables): MutationPromise; +export function updateTeamHudDepartment(dc: DataConnect, vars: UpdateTeamHudDepartmentVariables): MutationPromise; + +interface DeleteTeamHudDepartmentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTeamHudDepartmentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteTeamHudDepartmentVariables): MutationRef; + operationName: string; +} +export const deleteTeamHudDepartmentRef: DeleteTeamHudDepartmentRef; + +export function deleteTeamHudDepartment(vars: DeleteTeamHudDepartmentVariables): MutationPromise; +export function deleteTeamHudDepartment(dc: DataConnect, vars: DeleteTeamHudDepartmentVariables): MutationPromise; + +interface ListCertificatesRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listCertificatesRef: ListCertificatesRef; + +export function listCertificates(): QueryPromise; +export function listCertificates(dc: DataConnect): QueryPromise; + +interface GetCertificateByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetCertificateByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetCertificateByIdVariables): QueryRef; + operationName: string; +} +export const getCertificateByIdRef: GetCertificateByIdRef; + +export function getCertificateById(vars: GetCertificateByIdVariables): QueryPromise; +export function getCertificateById(dc: DataConnect, vars: GetCertificateByIdVariables): QueryPromise; + +interface ListCertificatesByStaffIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListCertificatesByStaffIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListCertificatesByStaffIdVariables): QueryRef; + operationName: string; +} +export const listCertificatesByStaffIdRef: ListCertificatesByStaffIdRef; + +export function listCertificatesByStaffId(vars: ListCertificatesByStaffIdVariables): QueryPromise; +export function listCertificatesByStaffId(dc: DataConnect, vars: ListCertificatesByStaffIdVariables): QueryPromise; + +interface CreateMemberTaskRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateMemberTaskVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateMemberTaskVariables): MutationRef; + operationName: string; +} +export const createMemberTaskRef: CreateMemberTaskRef; + +export function createMemberTask(vars: CreateMemberTaskVariables): MutationPromise; +export function createMemberTask(dc: DataConnect, vars: CreateMemberTaskVariables): MutationPromise; + +interface DeleteMemberTaskRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteMemberTaskVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteMemberTaskVariables): MutationRef; + operationName: string; +} +export const deleteMemberTaskRef: DeleteMemberTaskRef; + +export function deleteMemberTask(vars: DeleteMemberTaskVariables): MutationPromise; +export function deleteMemberTask(dc: DataConnect, vars: DeleteMemberTaskVariables): MutationPromise; + +interface CreateTeamRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTeamVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateTeamVariables): MutationRef; + operationName: string; +} +export const createTeamRef: CreateTeamRef; + +export function createTeam(vars: CreateTeamVariables): MutationPromise; +export function createTeam(dc: DataConnect, vars: CreateTeamVariables): MutationPromise; + +interface UpdateTeamRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTeamVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateTeamVariables): MutationRef; + operationName: string; +} +export const updateTeamRef: UpdateTeamRef; + +export function updateTeam(vars: UpdateTeamVariables): MutationPromise; +export function updateTeam(dc: DataConnect, vars: UpdateTeamVariables): MutationPromise; + +interface DeleteTeamRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTeamVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteTeamVariables): MutationRef; + operationName: string; +} +export const deleteTeamRef: DeleteTeamRef; + +export function deleteTeam(vars: DeleteTeamVariables): MutationPromise; +export function deleteTeam(dc: DataConnect, vars: DeleteTeamVariables): MutationPromise; + +interface CreateUserConversationRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateUserConversationVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateUserConversationVariables): MutationRef; + operationName: string; +} +export const createUserConversationRef: CreateUserConversationRef; + +export function createUserConversation(vars: CreateUserConversationVariables): MutationPromise; +export function createUserConversation(dc: DataConnect, vars: CreateUserConversationVariables): MutationPromise; + +interface UpdateUserConversationRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateUserConversationVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateUserConversationVariables): MutationRef; + operationName: string; +} +export const updateUserConversationRef: UpdateUserConversationRef; + +export function updateUserConversation(vars: UpdateUserConversationVariables): MutationPromise; +export function updateUserConversation(dc: DataConnect, vars: UpdateUserConversationVariables): MutationPromise; + +interface MarkConversationAsReadRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: MarkConversationAsReadVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: MarkConversationAsReadVariables): MutationRef; + operationName: string; +} +export const markConversationAsReadRef: MarkConversationAsReadRef; + +export function markConversationAsRead(vars: MarkConversationAsReadVariables): MutationPromise; +export function markConversationAsRead(dc: DataConnect, vars: MarkConversationAsReadVariables): MutationPromise; + +interface IncrementUnreadForUserRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: IncrementUnreadForUserVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: IncrementUnreadForUserVariables): MutationRef; + operationName: string; +} +export const incrementUnreadForUserRef: IncrementUnreadForUserRef; + +export function incrementUnreadForUser(vars: IncrementUnreadForUserVariables): MutationPromise; +export function incrementUnreadForUser(dc: DataConnect, vars: IncrementUnreadForUserVariables): MutationPromise; + +interface DeleteUserConversationRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteUserConversationVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteUserConversationVariables): MutationRef; + operationName: string; +} +export const deleteUserConversationRef: DeleteUserConversationRef; + +export function deleteUserConversation(vars: DeleteUserConversationVariables): MutationPromise; +export function deleteUserConversation(dc: DataConnect, vars: DeleteUserConversationVariables): MutationPromise; + +interface ListAssignmentsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListAssignmentsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListAssignmentsVariables): QueryRef; + operationName: string; +} +export const listAssignmentsRef: ListAssignmentsRef; + +export function listAssignments(vars?: ListAssignmentsVariables): QueryPromise; +export function listAssignments(dc: DataConnect, vars?: ListAssignmentsVariables): QueryPromise; + +interface GetAssignmentByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetAssignmentByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetAssignmentByIdVariables): QueryRef; + operationName: string; +} +export const getAssignmentByIdRef: GetAssignmentByIdRef; + +export function getAssignmentById(vars: GetAssignmentByIdVariables): QueryPromise; +export function getAssignmentById(dc: DataConnect, vars: GetAssignmentByIdVariables): QueryPromise; + +interface ListAssignmentsByWorkforceIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListAssignmentsByWorkforceIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListAssignmentsByWorkforceIdVariables): QueryRef; + operationName: string; +} +export const listAssignmentsByWorkforceIdRef: ListAssignmentsByWorkforceIdRef; + +export function listAssignmentsByWorkforceId(vars: ListAssignmentsByWorkforceIdVariables): QueryPromise; +export function listAssignmentsByWorkforceId(dc: DataConnect, vars: ListAssignmentsByWorkforceIdVariables): QueryPromise; + +interface ListAssignmentsByWorkforceIdsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListAssignmentsByWorkforceIdsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListAssignmentsByWorkforceIdsVariables): QueryRef; + operationName: string; +} +export const listAssignmentsByWorkforceIdsRef: ListAssignmentsByWorkforceIdsRef; + +export function listAssignmentsByWorkforceIds(vars: ListAssignmentsByWorkforceIdsVariables): QueryPromise; +export function listAssignmentsByWorkforceIds(dc: DataConnect, vars: ListAssignmentsByWorkforceIdsVariables): QueryPromise; + +interface ListAssignmentsByShiftRoleRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListAssignmentsByShiftRoleVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListAssignmentsByShiftRoleVariables): QueryRef; + operationName: string; +} +export const listAssignmentsByShiftRoleRef: ListAssignmentsByShiftRoleRef; + +export function listAssignmentsByShiftRole(vars: ListAssignmentsByShiftRoleVariables): QueryPromise; +export function listAssignmentsByShiftRole(dc: DataConnect, vars: ListAssignmentsByShiftRoleVariables): QueryPromise; + +interface FilterAssignmentsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: FilterAssignmentsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: FilterAssignmentsVariables): QueryRef; + operationName: string; +} +export const filterAssignmentsRef: FilterAssignmentsRef; + +export function filterAssignments(vars: FilterAssignmentsVariables): QueryPromise; +export function filterAssignments(dc: DataConnect, vars: FilterAssignmentsVariables): QueryPromise; + +interface CreateAttireOptionRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateAttireOptionVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateAttireOptionVariables): MutationRef; + operationName: string; +} +export const createAttireOptionRef: CreateAttireOptionRef; + +export function createAttireOption(vars: CreateAttireOptionVariables): MutationPromise; +export function createAttireOption(dc: DataConnect, vars: CreateAttireOptionVariables): MutationPromise; + +interface UpdateAttireOptionRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateAttireOptionVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateAttireOptionVariables): MutationRef; + operationName: string; +} +export const updateAttireOptionRef: UpdateAttireOptionRef; + +export function updateAttireOption(vars: UpdateAttireOptionVariables): MutationPromise; +export function updateAttireOption(dc: DataConnect, vars: UpdateAttireOptionVariables): MutationPromise; + +interface DeleteAttireOptionRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteAttireOptionVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteAttireOptionVariables): MutationRef; + operationName: string; +} +export const deleteAttireOptionRef: DeleteAttireOptionRef; + +export function deleteAttireOption(vars: DeleteAttireOptionVariables): MutationPromise; +export function deleteAttireOption(dc: DataConnect, vars: DeleteAttireOptionVariables): MutationPromise; + +interface CreateCourseRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateCourseVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateCourseVariables): MutationRef; + operationName: string; +} +export const createCourseRef: CreateCourseRef; + +export function createCourse(vars: CreateCourseVariables): MutationPromise; +export function createCourse(dc: DataConnect, vars: CreateCourseVariables): MutationPromise; + +interface UpdateCourseRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateCourseVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateCourseVariables): MutationRef; + operationName: string; +} +export const updateCourseRef: UpdateCourseRef; + +export function updateCourse(vars: UpdateCourseVariables): MutationPromise; +export function updateCourse(dc: DataConnect, vars: UpdateCourseVariables): MutationPromise; + +interface DeleteCourseRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteCourseVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteCourseVariables): MutationRef; + operationName: string; +} +export const deleteCourseRef: DeleteCourseRef; + +export function deleteCourse(vars: DeleteCourseVariables): MutationPromise; +export function deleteCourse(dc: DataConnect, vars: DeleteCourseVariables): MutationPromise; + +interface CreateEmergencyContactRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateEmergencyContactVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateEmergencyContactVariables): MutationRef; + operationName: string; +} +export const createEmergencyContactRef: CreateEmergencyContactRef; + +export function createEmergencyContact(vars: CreateEmergencyContactVariables): MutationPromise; +export function createEmergencyContact(dc: DataConnect, vars: CreateEmergencyContactVariables): MutationPromise; + +interface UpdateEmergencyContactRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateEmergencyContactVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateEmergencyContactVariables): MutationRef; + operationName: string; +} +export const updateEmergencyContactRef: UpdateEmergencyContactRef; + +export function updateEmergencyContact(vars: UpdateEmergencyContactVariables): MutationPromise; +export function updateEmergencyContact(dc: DataConnect, vars: UpdateEmergencyContactVariables): MutationPromise; + +interface DeleteEmergencyContactRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteEmergencyContactVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteEmergencyContactVariables): MutationRef; + operationName: string; +} +export const deleteEmergencyContactRef: DeleteEmergencyContactRef; + +export function deleteEmergencyContact(vars: DeleteEmergencyContactVariables): MutationPromise; +export function deleteEmergencyContact(dc: DataConnect, vars: DeleteEmergencyContactVariables): MutationPromise; + +interface ListInvoiceTemplatesRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListInvoiceTemplatesVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListInvoiceTemplatesVariables): QueryRef; + operationName: string; +} +export const listInvoiceTemplatesRef: ListInvoiceTemplatesRef; + +export function listInvoiceTemplates(vars?: ListInvoiceTemplatesVariables): QueryPromise; +export function listInvoiceTemplates(dc: DataConnect, vars?: ListInvoiceTemplatesVariables): QueryPromise; + +interface GetInvoiceTemplateByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetInvoiceTemplateByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetInvoiceTemplateByIdVariables): QueryRef; + operationName: string; +} +export const getInvoiceTemplateByIdRef: GetInvoiceTemplateByIdRef; + +export function getInvoiceTemplateById(vars: GetInvoiceTemplateByIdVariables): QueryPromise; +export function getInvoiceTemplateById(dc: DataConnect, vars: GetInvoiceTemplateByIdVariables): QueryPromise; + +interface ListInvoiceTemplatesByOwnerIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoiceTemplatesByOwnerIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListInvoiceTemplatesByOwnerIdVariables): QueryRef; + operationName: string; +} +export const listInvoiceTemplatesByOwnerIdRef: ListInvoiceTemplatesByOwnerIdRef; + +export function listInvoiceTemplatesByOwnerId(vars: ListInvoiceTemplatesByOwnerIdVariables): QueryPromise; +export function listInvoiceTemplatesByOwnerId(dc: DataConnect, vars: ListInvoiceTemplatesByOwnerIdVariables): QueryPromise; + +interface ListInvoiceTemplatesByVendorIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoiceTemplatesByVendorIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListInvoiceTemplatesByVendorIdVariables): QueryRef; + operationName: string; +} +export const listInvoiceTemplatesByVendorIdRef: ListInvoiceTemplatesByVendorIdRef; + +export function listInvoiceTemplatesByVendorId(vars: ListInvoiceTemplatesByVendorIdVariables): QueryPromise; +export function listInvoiceTemplatesByVendorId(dc: DataConnect, vars: ListInvoiceTemplatesByVendorIdVariables): QueryPromise; + +interface ListInvoiceTemplatesByBusinessIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoiceTemplatesByBusinessIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListInvoiceTemplatesByBusinessIdVariables): QueryRef; + operationName: string; +} +export const listInvoiceTemplatesByBusinessIdRef: ListInvoiceTemplatesByBusinessIdRef; + +export function listInvoiceTemplatesByBusinessId(vars: ListInvoiceTemplatesByBusinessIdVariables): QueryPromise; +export function listInvoiceTemplatesByBusinessId(dc: DataConnect, vars: ListInvoiceTemplatesByBusinessIdVariables): QueryPromise; + +interface ListInvoiceTemplatesByOrderIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoiceTemplatesByOrderIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListInvoiceTemplatesByOrderIdVariables): QueryRef; + operationName: string; +} +export const listInvoiceTemplatesByOrderIdRef: ListInvoiceTemplatesByOrderIdRef; + +export function listInvoiceTemplatesByOrderId(vars: ListInvoiceTemplatesByOrderIdVariables): QueryPromise; +export function listInvoiceTemplatesByOrderId(dc: DataConnect, vars: ListInvoiceTemplatesByOrderIdVariables): QueryPromise; + +interface SearchInvoiceTemplatesByOwnerAndNameRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: SearchInvoiceTemplatesByOwnerAndNameVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: SearchInvoiceTemplatesByOwnerAndNameVariables): QueryRef; + operationName: string; +} +export const searchInvoiceTemplatesByOwnerAndNameRef: SearchInvoiceTemplatesByOwnerAndNameRef; + +export function searchInvoiceTemplatesByOwnerAndName(vars: SearchInvoiceTemplatesByOwnerAndNameVariables): QueryPromise; +export function searchInvoiceTemplatesByOwnerAndName(dc: DataConnect, vars: SearchInvoiceTemplatesByOwnerAndNameVariables): QueryPromise; + +interface CreateStaffCourseRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateStaffCourseVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateStaffCourseVariables): MutationRef; + operationName: string; +} +export const createStaffCourseRef: CreateStaffCourseRef; + +export function createStaffCourse(vars: CreateStaffCourseVariables): MutationPromise; +export function createStaffCourse(dc: DataConnect, vars: CreateStaffCourseVariables): MutationPromise; + +interface UpdateStaffCourseRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateStaffCourseVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateStaffCourseVariables): MutationRef; + operationName: string; +} +export const updateStaffCourseRef: UpdateStaffCourseRef; + +export function updateStaffCourse(vars: UpdateStaffCourseVariables): MutationPromise; +export function updateStaffCourse(dc: DataConnect, vars: UpdateStaffCourseVariables): MutationPromise; + +interface DeleteStaffCourseRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteStaffCourseVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteStaffCourseVariables): MutationRef; + operationName: string; +} +export const deleteStaffCourseRef: DeleteStaffCourseRef; + +export function deleteStaffCourse(vars: DeleteStaffCourseVariables): MutationPromise; +export function deleteStaffCourse(dc: DataConnect, vars: DeleteStaffCourseVariables): MutationPromise; + +interface GetStaffDocumentByKeyRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffDocumentByKeyVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetStaffDocumentByKeyVariables): QueryRef; + operationName: string; +} +export const getStaffDocumentByKeyRef: GetStaffDocumentByKeyRef; + +export function getStaffDocumentByKey(vars: GetStaffDocumentByKeyVariables): QueryPromise; +export function getStaffDocumentByKey(dc: DataConnect, vars: GetStaffDocumentByKeyVariables): QueryPromise; + +interface ListStaffDocumentsByStaffIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffDocumentsByStaffIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListStaffDocumentsByStaffIdVariables): QueryRef; + operationName: string; +} +export const listStaffDocumentsByStaffIdRef: ListStaffDocumentsByStaffIdRef; + +export function listStaffDocumentsByStaffId(vars: ListStaffDocumentsByStaffIdVariables): QueryPromise; +export function listStaffDocumentsByStaffId(dc: DataConnect, vars: ListStaffDocumentsByStaffIdVariables): QueryPromise; + +interface ListStaffDocumentsByDocumentTypeRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffDocumentsByDocumentTypeVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListStaffDocumentsByDocumentTypeVariables): QueryRef; + operationName: string; +} +export const listStaffDocumentsByDocumentTypeRef: ListStaffDocumentsByDocumentTypeRef; + +export function listStaffDocumentsByDocumentType(vars: ListStaffDocumentsByDocumentTypeVariables): QueryPromise; +export function listStaffDocumentsByDocumentType(dc: DataConnect, vars: ListStaffDocumentsByDocumentTypeVariables): QueryPromise; + +interface ListStaffDocumentsByStatusRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffDocumentsByStatusVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListStaffDocumentsByStatusVariables): QueryRef; + operationName: string; +} +export const listStaffDocumentsByStatusRef: ListStaffDocumentsByStatusRef; + +export function listStaffDocumentsByStatus(vars: ListStaffDocumentsByStatusVariables): QueryPromise; +export function listStaffDocumentsByStatus(dc: DataConnect, vars: ListStaffDocumentsByStatusVariables): QueryPromise; + +interface CreateTaskRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTaskVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateTaskVariables): MutationRef; + operationName: string; +} +export const createTaskRef: CreateTaskRef; + +export function createTask(vars: CreateTaskVariables): MutationPromise; +export function createTask(dc: DataConnect, vars: CreateTaskVariables): MutationPromise; + +interface UpdateTaskRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTaskVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateTaskVariables): MutationRef; + operationName: string; +} +export const updateTaskRef: UpdateTaskRef; + +export function updateTask(vars: UpdateTaskVariables): MutationPromise; +export function updateTask(dc: DataConnect, vars: UpdateTaskVariables): MutationPromise; + +interface DeleteTaskRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTaskVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteTaskVariables): MutationRef; + operationName: string; +} +export const deleteTaskRef: DeleteTaskRef; + +export function deleteTask(vars: DeleteTaskVariables): MutationPromise; +export function deleteTask(dc: DataConnect, vars: DeleteTaskVariables): MutationPromise; + +interface ListAccountsRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listAccountsRef: ListAccountsRef; + +export function listAccounts(): QueryPromise; +export function listAccounts(dc: DataConnect): QueryPromise; + +interface GetAccountByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetAccountByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetAccountByIdVariables): QueryRef; + operationName: string; +} +export const getAccountByIdRef: GetAccountByIdRef; + +export function getAccountById(vars: GetAccountByIdVariables): QueryPromise; +export function getAccountById(dc: DataConnect, vars: GetAccountByIdVariables): QueryPromise; + +interface GetAccountsByOwnerIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetAccountsByOwnerIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetAccountsByOwnerIdVariables): QueryRef; + operationName: string; +} +export const getAccountsByOwnerIdRef: GetAccountsByOwnerIdRef; + +export function getAccountsByOwnerId(vars: GetAccountsByOwnerIdVariables): QueryPromise; +export function getAccountsByOwnerId(dc: DataConnect, vars: GetAccountsByOwnerIdVariables): QueryPromise; + +interface FilterAccountsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterAccountsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterAccountsVariables): QueryRef; + operationName: string; +} +export const filterAccountsRef: FilterAccountsRef; + +export function filterAccounts(vars?: FilterAccountsVariables): QueryPromise; +export function filterAccounts(dc: DataConnect, vars?: FilterAccountsVariables): QueryPromise; + +interface ListApplicationsRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listApplicationsRef: ListApplicationsRef; + +export function listApplications(): QueryPromise; +export function listApplications(dc: DataConnect): QueryPromise; + +interface GetApplicationByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetApplicationByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetApplicationByIdVariables): QueryRef; + operationName: string; +} +export const getApplicationByIdRef: GetApplicationByIdRef; + +export function getApplicationById(vars: GetApplicationByIdVariables): QueryPromise; +export function getApplicationById(dc: DataConnect, vars: GetApplicationByIdVariables): QueryPromise; + +interface GetApplicationsByShiftIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetApplicationsByShiftIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetApplicationsByShiftIdVariables): QueryRef; + operationName: string; +} +export const getApplicationsByShiftIdRef: GetApplicationsByShiftIdRef; + +export function getApplicationsByShiftId(vars: GetApplicationsByShiftIdVariables): QueryPromise; +export function getApplicationsByShiftId(dc: DataConnect, vars: GetApplicationsByShiftIdVariables): QueryPromise; + +interface GetApplicationsByShiftIdAndStatusRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetApplicationsByShiftIdAndStatusVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetApplicationsByShiftIdAndStatusVariables): QueryRef; + operationName: string; +} +export const getApplicationsByShiftIdAndStatusRef: GetApplicationsByShiftIdAndStatusRef; + +export function getApplicationsByShiftIdAndStatus(vars: GetApplicationsByShiftIdAndStatusVariables): QueryPromise; +export function getApplicationsByShiftIdAndStatus(dc: DataConnect, vars: GetApplicationsByShiftIdAndStatusVariables): QueryPromise; + +interface GetApplicationsByStaffIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetApplicationsByStaffIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetApplicationsByStaffIdVariables): QueryRef; + operationName: string; +} +export const getApplicationsByStaffIdRef: GetApplicationsByStaffIdRef; + +export function getApplicationsByStaffId(vars: GetApplicationsByStaffIdVariables): QueryPromise; +export function getApplicationsByStaffId(dc: DataConnect, vars: GetApplicationsByStaffIdVariables): QueryPromise; + +interface VaidateDayStaffApplicationRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: VaidateDayStaffApplicationVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: VaidateDayStaffApplicationVariables): QueryRef; + operationName: string; +} +export const vaidateDayStaffApplicationRef: VaidateDayStaffApplicationRef; + +export function vaidateDayStaffApplication(vars: VaidateDayStaffApplicationVariables): QueryPromise; +export function vaidateDayStaffApplication(dc: DataConnect, vars: VaidateDayStaffApplicationVariables): QueryPromise; + +interface GetApplicationByStaffShiftAndRoleRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetApplicationByStaffShiftAndRoleVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetApplicationByStaffShiftAndRoleVariables): QueryRef; + operationName: string; +} +export const getApplicationByStaffShiftAndRoleRef: GetApplicationByStaffShiftAndRoleRef; + +export function getApplicationByStaffShiftAndRole(vars: GetApplicationByStaffShiftAndRoleVariables): QueryPromise; +export function getApplicationByStaffShiftAndRole(dc: DataConnect, vars: GetApplicationByStaffShiftAndRoleVariables): QueryPromise; + +interface ListAcceptedApplicationsByShiftRoleKeyRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListAcceptedApplicationsByShiftRoleKeyVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListAcceptedApplicationsByShiftRoleKeyVariables): QueryRef; + operationName: string; +} +export const listAcceptedApplicationsByShiftRoleKeyRef: ListAcceptedApplicationsByShiftRoleKeyRef; + +export function listAcceptedApplicationsByShiftRoleKey(vars: ListAcceptedApplicationsByShiftRoleKeyVariables): QueryPromise; +export function listAcceptedApplicationsByShiftRoleKey(dc: DataConnect, vars: ListAcceptedApplicationsByShiftRoleKeyVariables): QueryPromise; + +interface ListAcceptedApplicationsByBusinessForDayRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListAcceptedApplicationsByBusinessForDayVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListAcceptedApplicationsByBusinessForDayVariables): QueryRef; + operationName: string; +} +export const listAcceptedApplicationsByBusinessForDayRef: ListAcceptedApplicationsByBusinessForDayRef; + +export function listAcceptedApplicationsByBusinessForDay(vars: ListAcceptedApplicationsByBusinessForDayVariables): QueryPromise; +export function listAcceptedApplicationsByBusinessForDay(dc: DataConnect, vars: ListAcceptedApplicationsByBusinessForDayVariables): QueryPromise; + +interface ListStaffsApplicationsByBusinessForDayRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffsApplicationsByBusinessForDayVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListStaffsApplicationsByBusinessForDayVariables): QueryRef; + operationName: string; +} +export const listStaffsApplicationsByBusinessForDayRef: ListStaffsApplicationsByBusinessForDayRef; + +export function listStaffsApplicationsByBusinessForDay(vars: ListStaffsApplicationsByBusinessForDayVariables): QueryPromise; +export function listStaffsApplicationsByBusinessForDay(dc: DataConnect, vars: ListStaffsApplicationsByBusinessForDayVariables): QueryPromise; + +interface ListCompletedApplicationsByStaffIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListCompletedApplicationsByStaffIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListCompletedApplicationsByStaffIdVariables): QueryRef; + operationName: string; +} +export const listCompletedApplicationsByStaffIdRef: ListCompletedApplicationsByStaffIdRef; + +export function listCompletedApplicationsByStaffId(vars: ListCompletedApplicationsByStaffIdVariables): QueryPromise; +export function listCompletedApplicationsByStaffId(dc: DataConnect, vars: ListCompletedApplicationsByStaffIdVariables): QueryPromise; + +interface ListAttireOptionsRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listAttireOptionsRef: ListAttireOptionsRef; + +export function listAttireOptions(): QueryPromise; +export function listAttireOptions(dc: DataConnect): QueryPromise; + +interface GetAttireOptionByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetAttireOptionByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetAttireOptionByIdVariables): QueryRef; + operationName: string; +} +export const getAttireOptionByIdRef: GetAttireOptionByIdRef; + +export function getAttireOptionById(vars: GetAttireOptionByIdVariables): QueryPromise; +export function getAttireOptionById(dc: DataConnect, vars: GetAttireOptionByIdVariables): QueryPromise; + +interface FilterAttireOptionsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterAttireOptionsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterAttireOptionsVariables): QueryRef; + operationName: string; +} +export const filterAttireOptionsRef: FilterAttireOptionsRef; + +export function filterAttireOptions(vars?: FilterAttireOptionsVariables): QueryPromise; +export function filterAttireOptions(dc: DataConnect, vars?: FilterAttireOptionsVariables): QueryPromise; + +interface CreateCertificateRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateCertificateVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateCertificateVariables): MutationRef; + operationName: string; +} +export const createCertificateRef: CreateCertificateRef; + +export function createCertificate(vars: CreateCertificateVariables): MutationPromise; +export function createCertificate(dc: DataConnect, vars: CreateCertificateVariables): MutationPromise; + +interface UpdateCertificateRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateCertificateVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateCertificateVariables): MutationRef; + operationName: string; +} +export const updateCertificateRef: UpdateCertificateRef; + +export function updateCertificate(vars: UpdateCertificateVariables): MutationPromise; +export function updateCertificate(dc: DataConnect, vars: UpdateCertificateVariables): MutationPromise; + +interface DeleteCertificateRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteCertificateVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteCertificateVariables): MutationRef; + operationName: string; +} +export const deleteCertificateRef: DeleteCertificateRef; + +export function deleteCertificate(vars: DeleteCertificateVariables): MutationPromise; +export function deleteCertificate(dc: DataConnect, vars: DeleteCertificateVariables): MutationPromise; + +interface ListCustomRateCardsRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listCustomRateCardsRef: ListCustomRateCardsRef; + +export function listCustomRateCards(): QueryPromise; +export function listCustomRateCards(dc: DataConnect): QueryPromise; + +interface GetCustomRateCardByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetCustomRateCardByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetCustomRateCardByIdVariables): QueryRef; + operationName: string; +} +export const getCustomRateCardByIdRef: GetCustomRateCardByIdRef; + +export function getCustomRateCardById(vars: GetCustomRateCardByIdVariables): QueryPromise; +export function getCustomRateCardById(dc: DataConnect, vars: GetCustomRateCardByIdVariables): QueryPromise; + +interface CreateRoleRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateRoleVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateRoleVariables): MutationRef; + operationName: string; +} +export const createRoleRef: CreateRoleRef; + +export function createRole(vars: CreateRoleVariables): MutationPromise; +export function createRole(dc: DataConnect, vars: CreateRoleVariables): MutationPromise; + +interface UpdateRoleRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateRoleVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateRoleVariables): MutationRef; + operationName: string; +} +export const updateRoleRef: UpdateRoleRef; + +export function updateRole(vars: UpdateRoleVariables): MutationPromise; +export function updateRole(dc: DataConnect, vars: UpdateRoleVariables): MutationPromise; + +interface DeleteRoleRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteRoleVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteRoleVariables): MutationRef; + operationName: string; +} +export const deleteRoleRef: DeleteRoleRef; + +export function deleteRole(vars: DeleteRoleVariables): MutationPromise; +export function deleteRole(dc: DataConnect, vars: DeleteRoleVariables): MutationPromise; + +interface ListRoleCategoriesRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listRoleCategoriesRef: ListRoleCategoriesRef; + +export function listRoleCategories(): QueryPromise; +export function listRoleCategories(dc: DataConnect): QueryPromise; + +interface GetRoleCategoryByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetRoleCategoryByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetRoleCategoryByIdVariables): QueryRef; + operationName: string; +} +export const getRoleCategoryByIdRef: GetRoleCategoryByIdRef; + +export function getRoleCategoryById(vars: GetRoleCategoryByIdVariables): QueryPromise; +export function getRoleCategoryById(dc: DataConnect, vars: GetRoleCategoryByIdVariables): QueryPromise; + +interface GetRoleCategoriesByCategoryRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetRoleCategoriesByCategoryVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetRoleCategoriesByCategoryVariables): QueryRef; + operationName: string; +} +export const getRoleCategoriesByCategoryRef: GetRoleCategoriesByCategoryRef; + +export function getRoleCategoriesByCategory(vars: GetRoleCategoriesByCategoryVariables): QueryPromise; +export function getRoleCategoriesByCategory(dc: DataConnect, vars: GetRoleCategoriesByCategoryVariables): QueryPromise; + +interface ListStaffAvailabilitiesRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListStaffAvailabilitiesVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListStaffAvailabilitiesVariables): QueryRef; + operationName: string; +} +export const listStaffAvailabilitiesRef: ListStaffAvailabilitiesRef; + +export function listStaffAvailabilities(vars?: ListStaffAvailabilitiesVariables): QueryPromise; +export function listStaffAvailabilities(dc: DataConnect, vars?: ListStaffAvailabilitiesVariables): QueryPromise; + +interface ListStaffAvailabilitiesByStaffIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffAvailabilitiesByStaffIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListStaffAvailabilitiesByStaffIdVariables): QueryRef; + operationName: string; +} +export const listStaffAvailabilitiesByStaffIdRef: ListStaffAvailabilitiesByStaffIdRef; + +export function listStaffAvailabilitiesByStaffId(vars: ListStaffAvailabilitiesByStaffIdVariables): QueryPromise; +export function listStaffAvailabilitiesByStaffId(dc: DataConnect, vars: ListStaffAvailabilitiesByStaffIdVariables): QueryPromise; + +interface GetStaffAvailabilityByKeyRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffAvailabilityByKeyVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetStaffAvailabilityByKeyVariables): QueryRef; + operationName: string; +} +export const getStaffAvailabilityByKeyRef: GetStaffAvailabilityByKeyRef; + +export function getStaffAvailabilityByKey(vars: GetStaffAvailabilityByKeyVariables): QueryPromise; +export function getStaffAvailabilityByKey(dc: DataConnect, vars: GetStaffAvailabilityByKeyVariables): QueryPromise; + +interface ListStaffAvailabilitiesByDayRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffAvailabilitiesByDayVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListStaffAvailabilitiesByDayVariables): QueryRef; + operationName: string; +} +export const listStaffAvailabilitiesByDayRef: ListStaffAvailabilitiesByDayRef; + +export function listStaffAvailabilitiesByDay(vars: ListStaffAvailabilitiesByDayVariables): QueryPromise; +export function listStaffAvailabilitiesByDay(dc: DataConnect, vars: ListStaffAvailabilitiesByDayVariables): QueryPromise; + +interface ListRecentPaymentsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListRecentPaymentsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListRecentPaymentsVariables): QueryRef; + operationName: string; +} +export const listRecentPaymentsRef: ListRecentPaymentsRef; + +export function listRecentPayments(vars?: ListRecentPaymentsVariables): QueryPromise; +export function listRecentPayments(dc: DataConnect, vars?: ListRecentPaymentsVariables): QueryPromise; + +interface GetRecentPaymentByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetRecentPaymentByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetRecentPaymentByIdVariables): QueryRef; + operationName: string; +} +export const getRecentPaymentByIdRef: GetRecentPaymentByIdRef; + +export function getRecentPaymentById(vars: GetRecentPaymentByIdVariables): QueryPromise; +export function getRecentPaymentById(dc: DataConnect, vars: GetRecentPaymentByIdVariables): QueryPromise; + +interface ListRecentPaymentsByStaffIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRecentPaymentsByStaffIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListRecentPaymentsByStaffIdVariables): QueryRef; + operationName: string; +} +export const listRecentPaymentsByStaffIdRef: ListRecentPaymentsByStaffIdRef; + +export function listRecentPaymentsByStaffId(vars: ListRecentPaymentsByStaffIdVariables): QueryPromise; +export function listRecentPaymentsByStaffId(dc: DataConnect, vars: ListRecentPaymentsByStaffIdVariables): QueryPromise; + +interface ListRecentPaymentsByApplicationIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRecentPaymentsByApplicationIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListRecentPaymentsByApplicationIdVariables): QueryRef; + operationName: string; +} +export const listRecentPaymentsByApplicationIdRef: ListRecentPaymentsByApplicationIdRef; + +export function listRecentPaymentsByApplicationId(vars: ListRecentPaymentsByApplicationIdVariables): QueryPromise; +export function listRecentPaymentsByApplicationId(dc: DataConnect, vars: ListRecentPaymentsByApplicationIdVariables): QueryPromise; + +interface ListRecentPaymentsByInvoiceIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRecentPaymentsByInvoiceIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdVariables): QueryRef; + operationName: string; +} +export const listRecentPaymentsByInvoiceIdRef: ListRecentPaymentsByInvoiceIdRef; + +export function listRecentPaymentsByInvoiceId(vars: ListRecentPaymentsByInvoiceIdVariables): QueryPromise; +export function listRecentPaymentsByInvoiceId(dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdVariables): QueryPromise; + +interface ListRecentPaymentsByStatusRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRecentPaymentsByStatusVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListRecentPaymentsByStatusVariables): QueryRef; + operationName: string; +} +export const listRecentPaymentsByStatusRef: ListRecentPaymentsByStatusRef; + +export function listRecentPaymentsByStatus(vars: ListRecentPaymentsByStatusVariables): QueryPromise; +export function listRecentPaymentsByStatus(dc: DataConnect, vars: ListRecentPaymentsByStatusVariables): QueryPromise; + +interface ListRecentPaymentsByInvoiceIdsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRecentPaymentsByInvoiceIdsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdsVariables): QueryRef; + operationName: string; +} +export const listRecentPaymentsByInvoiceIdsRef: ListRecentPaymentsByInvoiceIdsRef; + +export function listRecentPaymentsByInvoiceIds(vars: ListRecentPaymentsByInvoiceIdsVariables): QueryPromise; +export function listRecentPaymentsByInvoiceIds(dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdsVariables): QueryPromise; + +interface ListRecentPaymentsByBusinessIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRecentPaymentsByBusinessIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListRecentPaymentsByBusinessIdVariables): QueryRef; + operationName: string; +} +export const listRecentPaymentsByBusinessIdRef: ListRecentPaymentsByBusinessIdRef; + +export function listRecentPaymentsByBusinessId(vars: ListRecentPaymentsByBusinessIdVariables): QueryPromise; +export function listRecentPaymentsByBusinessId(dc: DataConnect, vars: ListRecentPaymentsByBusinessIdVariables): QueryPromise; + +interface ListBusinessesRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listBusinessesRef: ListBusinessesRef; + +export function listBusinesses(): QueryPromise; +export function listBusinesses(dc: DataConnect): QueryPromise; + +interface GetBusinessesByUserIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetBusinessesByUserIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetBusinessesByUserIdVariables): QueryRef; + operationName: string; +} +export const getBusinessesByUserIdRef: GetBusinessesByUserIdRef; + +export function getBusinessesByUserId(vars: GetBusinessesByUserIdVariables): QueryPromise; +export function getBusinessesByUserId(dc: DataConnect, vars: GetBusinessesByUserIdVariables): QueryPromise; + +interface GetBusinessByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetBusinessByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetBusinessByIdVariables): QueryRef; + operationName: string; +} +export const getBusinessByIdRef: GetBusinessByIdRef; + +export function getBusinessById(vars: GetBusinessByIdVariables): QueryPromise; +export function getBusinessById(dc: DataConnect, vars: GetBusinessByIdVariables): QueryPromise; + +interface CreateClientFeedbackRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateClientFeedbackVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateClientFeedbackVariables): MutationRef; + operationName: string; +} +export const createClientFeedbackRef: CreateClientFeedbackRef; + +export function createClientFeedback(vars: CreateClientFeedbackVariables): MutationPromise; +export function createClientFeedback(dc: DataConnect, vars: CreateClientFeedbackVariables): MutationPromise; + +interface UpdateClientFeedbackRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateClientFeedbackVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateClientFeedbackVariables): MutationRef; + operationName: string; +} +export const updateClientFeedbackRef: UpdateClientFeedbackRef; + +export function updateClientFeedback(vars: UpdateClientFeedbackVariables): MutationPromise; +export function updateClientFeedback(dc: DataConnect, vars: UpdateClientFeedbackVariables): MutationPromise; + +interface DeleteClientFeedbackRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteClientFeedbackVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteClientFeedbackVariables): MutationRef; + operationName: string; +} +export const deleteClientFeedbackRef: DeleteClientFeedbackRef; + +export function deleteClientFeedback(vars: DeleteClientFeedbackVariables): MutationPromise; +export function deleteClientFeedback(dc: DataConnect, vars: DeleteClientFeedbackVariables): MutationPromise; + +interface ListConversationsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListConversationsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListConversationsVariables): QueryRef; + operationName: string; +} +export const listConversationsRef: ListConversationsRef; + +export function listConversations(vars?: ListConversationsVariables): QueryPromise; +export function listConversations(dc: DataConnect, vars?: ListConversationsVariables): QueryPromise; + +interface GetConversationByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetConversationByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetConversationByIdVariables): QueryRef; + operationName: string; +} +export const getConversationByIdRef: GetConversationByIdRef; + +export function getConversationById(vars: GetConversationByIdVariables): QueryPromise; +export function getConversationById(dc: DataConnect, vars: GetConversationByIdVariables): QueryPromise; + +interface ListConversationsByTypeRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListConversationsByTypeVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListConversationsByTypeVariables): QueryRef; + operationName: string; +} +export const listConversationsByTypeRef: ListConversationsByTypeRef; + +export function listConversationsByType(vars: ListConversationsByTypeVariables): QueryPromise; +export function listConversationsByType(dc: DataConnect, vars: ListConversationsByTypeVariables): QueryPromise; + +interface ListConversationsByStatusRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListConversationsByStatusVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListConversationsByStatusVariables): QueryRef; + operationName: string; +} +export const listConversationsByStatusRef: ListConversationsByStatusRef; + +export function listConversationsByStatus(vars: ListConversationsByStatusVariables): QueryPromise; +export function listConversationsByStatus(dc: DataConnect, vars: ListConversationsByStatusVariables): QueryPromise; + +interface FilterConversationsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterConversationsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterConversationsVariables): QueryRef; + operationName: string; +} +export const filterConversationsRef: FilterConversationsRef; + +export function filterConversations(vars?: FilterConversationsVariables): QueryPromise; +export function filterConversations(dc: DataConnect, vars?: FilterConversationsVariables): QueryPromise; + +interface ListOrdersRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListOrdersVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListOrdersVariables): QueryRef; + operationName: string; +} +export const listOrdersRef: ListOrdersRef; + +export function listOrders(vars?: ListOrdersVariables): QueryPromise; +export function listOrders(dc: DataConnect, vars?: ListOrdersVariables): QueryPromise; + +interface GetOrderByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetOrderByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetOrderByIdVariables): QueryRef; + operationName: string; +} +export const getOrderByIdRef: GetOrderByIdRef; + +export function getOrderById(vars: GetOrderByIdVariables): QueryPromise; +export function getOrderById(dc: DataConnect, vars: GetOrderByIdVariables): QueryPromise; + +interface GetOrdersByBusinessIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetOrdersByBusinessIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetOrdersByBusinessIdVariables): QueryRef; + operationName: string; +} +export const getOrdersByBusinessIdRef: GetOrdersByBusinessIdRef; + +export function getOrdersByBusinessId(vars: GetOrdersByBusinessIdVariables): QueryPromise; +export function getOrdersByBusinessId(dc: DataConnect, vars: GetOrdersByBusinessIdVariables): QueryPromise; + +interface GetOrdersByVendorIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetOrdersByVendorIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetOrdersByVendorIdVariables): QueryRef; + operationName: string; +} +export const getOrdersByVendorIdRef: GetOrdersByVendorIdRef; + +export function getOrdersByVendorId(vars: GetOrdersByVendorIdVariables): QueryPromise; +export function getOrdersByVendorId(dc: DataConnect, vars: GetOrdersByVendorIdVariables): QueryPromise; + +interface GetOrdersByStatusRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetOrdersByStatusVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetOrdersByStatusVariables): QueryRef; + operationName: string; +} +export const getOrdersByStatusRef: GetOrdersByStatusRef; + +export function getOrdersByStatus(vars: GetOrdersByStatusVariables): QueryPromise; +export function getOrdersByStatus(dc: DataConnect, vars: GetOrdersByStatusVariables): QueryPromise; + +interface GetOrdersByDateRangeRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetOrdersByDateRangeVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetOrdersByDateRangeVariables): QueryRef; + operationName: string; +} +export const getOrdersByDateRangeRef: GetOrdersByDateRangeRef; + +export function getOrdersByDateRange(vars: GetOrdersByDateRangeVariables): QueryPromise; +export function getOrdersByDateRange(dc: DataConnect, vars: GetOrdersByDateRangeVariables): QueryPromise; + +interface GetRapidOrdersRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: GetRapidOrdersVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: GetRapidOrdersVariables): QueryRef; + operationName: string; +} +export const getRapidOrdersRef: GetRapidOrdersRef; + +export function getRapidOrders(vars?: GetRapidOrdersVariables): QueryPromise; +export function getRapidOrders(dc: DataConnect, vars?: GetRapidOrdersVariables): QueryPromise; + +interface ListOrdersByBusinessAndTeamHubRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListOrdersByBusinessAndTeamHubVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListOrdersByBusinessAndTeamHubVariables): QueryRef; + operationName: string; +} +export const listOrdersByBusinessAndTeamHubRef: ListOrdersByBusinessAndTeamHubRef; + +export function listOrdersByBusinessAndTeamHub(vars: ListOrdersByBusinessAndTeamHubVariables): QueryPromise; +export function listOrdersByBusinessAndTeamHub(dc: DataConnect, vars: ListOrdersByBusinessAndTeamHubVariables): QueryPromise; + +interface ListStaffRolesRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListStaffRolesVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListStaffRolesVariables): QueryRef; + operationName: string; +} +export const listStaffRolesRef: ListStaffRolesRef; + +export function listStaffRoles(vars?: ListStaffRolesVariables): QueryPromise; +export function listStaffRoles(dc: DataConnect, vars?: ListStaffRolesVariables): QueryPromise; + +interface GetStaffRoleByKeyRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffRoleByKeyVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetStaffRoleByKeyVariables): QueryRef; + operationName: string; +} +export const getStaffRoleByKeyRef: GetStaffRoleByKeyRef; + +export function getStaffRoleByKey(vars: GetStaffRoleByKeyVariables): QueryPromise; +export function getStaffRoleByKey(dc: DataConnect, vars: GetStaffRoleByKeyVariables): QueryPromise; + +interface ListStaffRolesByStaffIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffRolesByStaffIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListStaffRolesByStaffIdVariables): QueryRef; + operationName: string; +} +export const listStaffRolesByStaffIdRef: ListStaffRolesByStaffIdRef; + +export function listStaffRolesByStaffId(vars: ListStaffRolesByStaffIdVariables): QueryPromise; +export function listStaffRolesByStaffId(dc: DataConnect, vars: ListStaffRolesByStaffIdVariables): QueryPromise; + +interface ListStaffRolesByRoleIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffRolesByRoleIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListStaffRolesByRoleIdVariables): QueryRef; + operationName: string; +} +export const listStaffRolesByRoleIdRef: ListStaffRolesByRoleIdRef; + +export function listStaffRolesByRoleId(vars: ListStaffRolesByRoleIdVariables): QueryPromise; +export function listStaffRolesByRoleId(dc: DataConnect, vars: ListStaffRolesByRoleIdVariables): QueryPromise; + +interface FilterStaffRolesRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterStaffRolesVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterStaffRolesVariables): QueryRef; + operationName: string; +} +export const filterStaffRolesRef: FilterStaffRolesRef; + +export function filterStaffRoles(vars?: FilterStaffRolesVariables): QueryPromise; +export function filterStaffRoles(dc: DataConnect, vars?: FilterStaffRolesVariables): QueryPromise; + +interface ListTaskCommentsRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listTaskCommentsRef: ListTaskCommentsRef; + +export function listTaskComments(): QueryPromise; +export function listTaskComments(dc: DataConnect): QueryPromise; + +interface GetTaskCommentByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTaskCommentByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetTaskCommentByIdVariables): QueryRef; + operationName: string; +} +export const getTaskCommentByIdRef: GetTaskCommentByIdRef; + +export function getTaskCommentById(vars: GetTaskCommentByIdVariables): QueryPromise; +export function getTaskCommentById(dc: DataConnect, vars: GetTaskCommentByIdVariables): QueryPromise; + +interface GetTaskCommentsByTaskIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTaskCommentsByTaskIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetTaskCommentsByTaskIdVariables): QueryRef; + operationName: string; +} +export const getTaskCommentsByTaskIdRef: GetTaskCommentsByTaskIdRef; + +export function getTaskCommentsByTaskId(vars: GetTaskCommentsByTaskIdVariables): QueryPromise; +export function getTaskCommentsByTaskId(dc: DataConnect, vars: GetTaskCommentsByTaskIdVariables): QueryPromise; + +interface CreateBusinessRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateBusinessVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateBusinessVariables): MutationRef; + operationName: string; +} +export const createBusinessRef: CreateBusinessRef; + +export function createBusiness(vars: CreateBusinessVariables): MutationPromise; +export function createBusiness(dc: DataConnect, vars: CreateBusinessVariables): MutationPromise; + +interface UpdateBusinessRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateBusinessVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateBusinessVariables): MutationRef; + operationName: string; +} +export const updateBusinessRef: UpdateBusinessRef; + +export function updateBusiness(vars: UpdateBusinessVariables): MutationPromise; +export function updateBusiness(dc: DataConnect, vars: UpdateBusinessVariables): MutationPromise; + +interface DeleteBusinessRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteBusinessVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteBusinessVariables): MutationRef; + operationName: string; +} +export const deleteBusinessRef: DeleteBusinessRef; + +export function deleteBusiness(vars: DeleteBusinessVariables): MutationPromise; +export function deleteBusiness(dc: DataConnect, vars: DeleteBusinessVariables): MutationPromise; + +interface CreateConversationRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: CreateConversationVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: CreateConversationVariables): MutationRef; + operationName: string; +} +export const createConversationRef: CreateConversationRef; + +export function createConversation(vars?: CreateConversationVariables): MutationPromise; +export function createConversation(dc: DataConnect, vars?: CreateConversationVariables): MutationPromise; + +interface UpdateConversationRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateConversationVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateConversationVariables): MutationRef; + operationName: string; +} +export const updateConversationRef: UpdateConversationRef; + +export function updateConversation(vars: UpdateConversationVariables): MutationPromise; +export function updateConversation(dc: DataConnect, vars: UpdateConversationVariables): MutationPromise; + +interface UpdateConversationLastMessageRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateConversationLastMessageVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateConversationLastMessageVariables): MutationRef; + operationName: string; +} +export const updateConversationLastMessageRef: UpdateConversationLastMessageRef; + +export function updateConversationLastMessage(vars: UpdateConversationLastMessageVariables): MutationPromise; +export function updateConversationLastMessage(dc: DataConnect, vars: UpdateConversationLastMessageVariables): MutationPromise; + +interface DeleteConversationRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteConversationVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteConversationVariables): MutationRef; + operationName: string; +} +export const deleteConversationRef: DeleteConversationRef; + +export function deleteConversation(vars: DeleteConversationVariables): MutationPromise; +export function deleteConversation(dc: DataConnect, vars: DeleteConversationVariables): MutationPromise; + +interface CreateCustomRateCardRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateCustomRateCardVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateCustomRateCardVariables): MutationRef; + operationName: string; +} +export const createCustomRateCardRef: CreateCustomRateCardRef; + +export function createCustomRateCard(vars: CreateCustomRateCardVariables): MutationPromise; +export function createCustomRateCard(dc: DataConnect, vars: CreateCustomRateCardVariables): MutationPromise; + +interface UpdateCustomRateCardRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateCustomRateCardVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateCustomRateCardVariables): MutationRef; + operationName: string; +} +export const updateCustomRateCardRef: UpdateCustomRateCardRef; + +export function updateCustomRateCard(vars: UpdateCustomRateCardVariables): MutationPromise; +export function updateCustomRateCard(dc: DataConnect, vars: UpdateCustomRateCardVariables): MutationPromise; + +interface DeleteCustomRateCardRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteCustomRateCardVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteCustomRateCardVariables): MutationRef; + operationName: string; +} +export const deleteCustomRateCardRef: DeleteCustomRateCardRef; + +export function deleteCustomRateCard(vars: DeleteCustomRateCardVariables): MutationPromise; +export function deleteCustomRateCard(dc: DataConnect, vars: DeleteCustomRateCardVariables): MutationPromise; + +interface ListDocumentsRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listDocumentsRef: ListDocumentsRef; + +export function listDocuments(): QueryPromise; +export function listDocuments(dc: DataConnect): QueryPromise; + +interface GetDocumentByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetDocumentByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetDocumentByIdVariables): QueryRef; + operationName: string; +} +export const getDocumentByIdRef: GetDocumentByIdRef; + +export function getDocumentById(vars: GetDocumentByIdVariables): QueryPromise; +export function getDocumentById(dc: DataConnect, vars: GetDocumentByIdVariables): QueryPromise; + +interface FilterDocumentsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterDocumentsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterDocumentsVariables): QueryRef; + operationName: string; +} +export const filterDocumentsRef: FilterDocumentsRef; + +export function filterDocuments(vars?: FilterDocumentsVariables): QueryPromise; +export function filterDocuments(dc: DataConnect, vars?: FilterDocumentsVariables): QueryPromise; + +interface CreateRecentPaymentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateRecentPaymentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateRecentPaymentVariables): MutationRef; + operationName: string; +} +export const createRecentPaymentRef: CreateRecentPaymentRef; + +export function createRecentPayment(vars: CreateRecentPaymentVariables): MutationPromise; +export function createRecentPayment(dc: DataConnect, vars: CreateRecentPaymentVariables): MutationPromise; + +interface UpdateRecentPaymentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateRecentPaymentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateRecentPaymentVariables): MutationRef; + operationName: string; +} +export const updateRecentPaymentRef: UpdateRecentPaymentRef; + +export function updateRecentPayment(vars: UpdateRecentPaymentVariables): MutationPromise; +export function updateRecentPayment(dc: DataConnect, vars: UpdateRecentPaymentVariables): MutationPromise; + +interface DeleteRecentPaymentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteRecentPaymentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteRecentPaymentVariables): MutationRef; + operationName: string; +} +export const deleteRecentPaymentRef: DeleteRecentPaymentRef; + +export function deleteRecentPayment(vars: DeleteRecentPaymentVariables): MutationPromise; +export function deleteRecentPayment(dc: DataConnect, vars: DeleteRecentPaymentVariables): MutationPromise; + +interface ListShiftsForCoverageRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForCoverageVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftsForCoverageVariables): QueryRef; + operationName: string; +} +export const listShiftsForCoverageRef: ListShiftsForCoverageRef; + +export function listShiftsForCoverage(vars: ListShiftsForCoverageVariables): QueryPromise; +export function listShiftsForCoverage(dc: DataConnect, vars: ListShiftsForCoverageVariables): QueryPromise; + +interface ListApplicationsForCoverageRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListApplicationsForCoverageVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListApplicationsForCoverageVariables): QueryRef; + operationName: string; +} +export const listApplicationsForCoverageRef: ListApplicationsForCoverageRef; + +export function listApplicationsForCoverage(vars: ListApplicationsForCoverageVariables): QueryPromise; +export function listApplicationsForCoverage(dc: DataConnect, vars: ListApplicationsForCoverageVariables): QueryPromise; + +interface ListShiftsForDailyOpsByBusinessRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForDailyOpsByBusinessVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftsForDailyOpsByBusinessVariables): QueryRef; + operationName: string; +} +export const listShiftsForDailyOpsByBusinessRef: ListShiftsForDailyOpsByBusinessRef; + +export function listShiftsForDailyOpsByBusiness(vars: ListShiftsForDailyOpsByBusinessVariables): QueryPromise; +export function listShiftsForDailyOpsByBusiness(dc: DataConnect, vars: ListShiftsForDailyOpsByBusinessVariables): QueryPromise; + +interface ListShiftsForDailyOpsByVendorRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForDailyOpsByVendorVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftsForDailyOpsByVendorVariables): QueryRef; + operationName: string; +} +export const listShiftsForDailyOpsByVendorRef: ListShiftsForDailyOpsByVendorRef; + +export function listShiftsForDailyOpsByVendor(vars: ListShiftsForDailyOpsByVendorVariables): QueryPromise; +export function listShiftsForDailyOpsByVendor(dc: DataConnect, vars: ListShiftsForDailyOpsByVendorVariables): QueryPromise; + +interface ListApplicationsForDailyOpsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListApplicationsForDailyOpsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListApplicationsForDailyOpsVariables): QueryRef; + operationName: string; +} +export const listApplicationsForDailyOpsRef: ListApplicationsForDailyOpsRef; + +export function listApplicationsForDailyOps(vars: ListApplicationsForDailyOpsVariables): QueryPromise; +export function listApplicationsForDailyOps(dc: DataConnect, vars: ListApplicationsForDailyOpsVariables): QueryPromise; + +interface ListShiftsForForecastByBusinessRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForForecastByBusinessVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftsForForecastByBusinessVariables): QueryRef; + operationName: string; +} +export const listShiftsForForecastByBusinessRef: ListShiftsForForecastByBusinessRef; + +export function listShiftsForForecastByBusiness(vars: ListShiftsForForecastByBusinessVariables): QueryPromise; +export function listShiftsForForecastByBusiness(dc: DataConnect, vars: ListShiftsForForecastByBusinessVariables): QueryPromise; + +interface ListShiftsForForecastByVendorRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForForecastByVendorVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftsForForecastByVendorVariables): QueryRef; + operationName: string; +} +export const listShiftsForForecastByVendorRef: ListShiftsForForecastByVendorRef; + +export function listShiftsForForecastByVendor(vars: ListShiftsForForecastByVendorVariables): QueryPromise; +export function listShiftsForForecastByVendor(dc: DataConnect, vars: ListShiftsForForecastByVendorVariables): QueryPromise; + +interface ListShiftsForNoShowRangeByBusinessRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForNoShowRangeByBusinessVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftsForNoShowRangeByBusinessVariables): QueryRef; + operationName: string; +} +export const listShiftsForNoShowRangeByBusinessRef: ListShiftsForNoShowRangeByBusinessRef; + +export function listShiftsForNoShowRangeByBusiness(vars: ListShiftsForNoShowRangeByBusinessVariables): QueryPromise; +export function listShiftsForNoShowRangeByBusiness(dc: DataConnect, vars: ListShiftsForNoShowRangeByBusinessVariables): QueryPromise; + +interface ListShiftsForNoShowRangeByVendorRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForNoShowRangeByVendorVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftsForNoShowRangeByVendorVariables): QueryRef; + operationName: string; +} +export const listShiftsForNoShowRangeByVendorRef: ListShiftsForNoShowRangeByVendorRef; + +export function listShiftsForNoShowRangeByVendor(vars: ListShiftsForNoShowRangeByVendorVariables): QueryPromise; +export function listShiftsForNoShowRangeByVendor(dc: DataConnect, vars: ListShiftsForNoShowRangeByVendorVariables): QueryPromise; + +interface ListApplicationsForNoShowRangeRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListApplicationsForNoShowRangeVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListApplicationsForNoShowRangeVariables): QueryRef; + operationName: string; +} +export const listApplicationsForNoShowRangeRef: ListApplicationsForNoShowRangeRef; + +export function listApplicationsForNoShowRange(vars: ListApplicationsForNoShowRangeVariables): QueryPromise; +export function listApplicationsForNoShowRange(dc: DataConnect, vars: ListApplicationsForNoShowRangeVariables): QueryPromise; + +interface ListStaffForNoShowReportRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffForNoShowReportVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListStaffForNoShowReportVariables): QueryRef; + operationName: string; +} +export const listStaffForNoShowReportRef: ListStaffForNoShowReportRef; + +export function listStaffForNoShowReport(vars: ListStaffForNoShowReportVariables): QueryPromise; +export function listStaffForNoShowReport(dc: DataConnect, vars: ListStaffForNoShowReportVariables): QueryPromise; + +interface ListInvoicesForSpendByBusinessRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesForSpendByBusinessVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListInvoicesForSpendByBusinessVariables): QueryRef; + operationName: string; +} +export const listInvoicesForSpendByBusinessRef: ListInvoicesForSpendByBusinessRef; + +export function listInvoicesForSpendByBusiness(vars: ListInvoicesForSpendByBusinessVariables): QueryPromise; +export function listInvoicesForSpendByBusiness(dc: DataConnect, vars: ListInvoicesForSpendByBusinessVariables): QueryPromise; + +interface ListInvoicesForSpendByVendorRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesForSpendByVendorVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListInvoicesForSpendByVendorVariables): QueryRef; + operationName: string; +} +export const listInvoicesForSpendByVendorRef: ListInvoicesForSpendByVendorRef; + +export function listInvoicesForSpendByVendor(vars: ListInvoicesForSpendByVendorVariables): QueryPromise; +export function listInvoicesForSpendByVendor(dc: DataConnect, vars: ListInvoicesForSpendByVendorVariables): QueryPromise; + +interface ListInvoicesForSpendByOrderRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesForSpendByOrderVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListInvoicesForSpendByOrderVariables): QueryRef; + operationName: string; +} +export const listInvoicesForSpendByOrderRef: ListInvoicesForSpendByOrderRef; + +export function listInvoicesForSpendByOrder(vars: ListInvoicesForSpendByOrderVariables): QueryPromise; +export function listInvoicesForSpendByOrder(dc: DataConnect, vars: ListInvoicesForSpendByOrderVariables): QueryPromise; + +interface ListTimesheetsForSpendRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListTimesheetsForSpendVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListTimesheetsForSpendVariables): QueryRef; + operationName: string; +} +export const listTimesheetsForSpendRef: ListTimesheetsForSpendRef; + +export function listTimesheetsForSpend(vars: ListTimesheetsForSpendVariables): QueryPromise; +export function listTimesheetsForSpend(dc: DataConnect, vars: ListTimesheetsForSpendVariables): QueryPromise; + +interface ListShiftsForPerformanceByBusinessRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForPerformanceByBusinessVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftsForPerformanceByBusinessVariables): QueryRef; + operationName: string; +} +export const listShiftsForPerformanceByBusinessRef: ListShiftsForPerformanceByBusinessRef; + +export function listShiftsForPerformanceByBusiness(vars: ListShiftsForPerformanceByBusinessVariables): QueryPromise; +export function listShiftsForPerformanceByBusiness(dc: DataConnect, vars: ListShiftsForPerformanceByBusinessVariables): QueryPromise; + +interface ListShiftsForPerformanceByVendorRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftsForPerformanceByVendorVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftsForPerformanceByVendorVariables): QueryRef; + operationName: string; +} +export const listShiftsForPerformanceByVendorRef: ListShiftsForPerformanceByVendorRef; + +export function listShiftsForPerformanceByVendor(vars: ListShiftsForPerformanceByVendorVariables): QueryPromise; +export function listShiftsForPerformanceByVendor(dc: DataConnect, vars: ListShiftsForPerformanceByVendorVariables): QueryPromise; + +interface ListApplicationsForPerformanceRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListApplicationsForPerformanceVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListApplicationsForPerformanceVariables): QueryRef; + operationName: string; +} +export const listApplicationsForPerformanceRef: ListApplicationsForPerformanceRef; + +export function listApplicationsForPerformance(vars: ListApplicationsForPerformanceVariables): QueryPromise; +export function listApplicationsForPerformance(dc: DataConnect, vars: ListApplicationsForPerformanceVariables): QueryPromise; + +interface ListStaffForPerformanceRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffForPerformanceVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListStaffForPerformanceVariables): QueryRef; + operationName: string; +} +export const listStaffForPerformanceRef: ListStaffForPerformanceRef; + +export function listStaffForPerformance(vars: ListStaffForPerformanceVariables): QueryPromise; +export function listStaffForPerformance(dc: DataConnect, vars: ListStaffForPerformanceVariables): QueryPromise; + +interface CreateUserRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateUserVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateUserVariables): MutationRef; + operationName: string; +} +export const createUserRef: CreateUserRef; + +export function createUser(vars: CreateUserVariables): MutationPromise; +export function createUser(dc: DataConnect, vars: CreateUserVariables): MutationPromise; + +interface UpdateUserRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateUserVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateUserVariables): MutationRef; + operationName: string; +} +export const updateUserRef: UpdateUserRef; + +export function updateUser(vars: UpdateUserVariables): MutationPromise; +export function updateUser(dc: DataConnect, vars: UpdateUserVariables): MutationPromise; + +interface DeleteUserRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteUserVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteUserVariables): MutationRef; + operationName: string; +} +export const deleteUserRef: DeleteUserRef; + +export function deleteUser(vars: DeleteUserVariables): MutationPromise; +export function deleteUser(dc: DataConnect, vars: DeleteUserVariables): MutationPromise; + +interface CreateVendorRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateVendorVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateVendorVariables): MutationRef; + operationName: string; +} +export const createVendorRef: CreateVendorRef; + +export function createVendor(vars: CreateVendorVariables): MutationPromise; +export function createVendor(dc: DataConnect, vars: CreateVendorVariables): MutationPromise; + +interface UpdateVendorRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateVendorVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateVendorVariables): MutationRef; + operationName: string; +} +export const updateVendorRef: UpdateVendorRef; + +export function updateVendor(vars: UpdateVendorVariables): MutationPromise; +export function updateVendor(dc: DataConnect, vars: UpdateVendorVariables): MutationPromise; + +interface DeleteVendorRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteVendorVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteVendorVariables): MutationRef; + operationName: string; +} +export const deleteVendorRef: DeleteVendorRef; + +export function deleteVendor(vars: DeleteVendorVariables): MutationPromise; +export function deleteVendor(dc: DataConnect, vars: DeleteVendorVariables): MutationPromise; + +interface CreateDocumentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateDocumentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateDocumentVariables): MutationRef; + operationName: string; +} +export const createDocumentRef: CreateDocumentRef; + +export function createDocument(vars: CreateDocumentVariables): MutationPromise; +export function createDocument(dc: DataConnect, vars: CreateDocumentVariables): MutationPromise; + +interface UpdateDocumentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateDocumentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateDocumentVariables): MutationRef; + operationName: string; +} +export const updateDocumentRef: UpdateDocumentRef; + +export function updateDocument(vars: UpdateDocumentVariables): MutationPromise; +export function updateDocument(dc: DataConnect, vars: UpdateDocumentVariables): MutationPromise; + +interface DeleteDocumentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteDocumentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteDocumentVariables): MutationRef; + operationName: string; +} +export const deleteDocumentRef: DeleteDocumentRef; + +export function deleteDocument(vars: DeleteDocumentVariables): MutationPromise; +export function deleteDocument(dc: DataConnect, vars: DeleteDocumentVariables): MutationPromise; + +interface ListRolesRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listRolesRef: ListRolesRef; + +export function listRoles(): QueryPromise; +export function listRoles(dc: DataConnect): QueryPromise; + +interface GetRoleByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetRoleByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetRoleByIdVariables): QueryRef; + operationName: string; +} +export const getRoleByIdRef: GetRoleByIdRef; + +export function getRoleById(vars: GetRoleByIdVariables): QueryPromise; +export function getRoleById(dc: DataConnect, vars: GetRoleByIdVariables): QueryPromise; + +interface ListRolesByVendorIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRolesByVendorIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListRolesByVendorIdVariables): QueryRef; + operationName: string; +} +export const listRolesByVendorIdRef: ListRolesByVendorIdRef; + +export function listRolesByVendorId(vars: ListRolesByVendorIdVariables): QueryPromise; +export function listRolesByVendorId(dc: DataConnect, vars: ListRolesByVendorIdVariables): QueryPromise; + +interface ListRolesByroleCategoryIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListRolesByroleCategoryIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListRolesByroleCategoryIdVariables): QueryRef; + operationName: string; +} +export const listRolesByroleCategoryIdRef: ListRolesByroleCategoryIdRef; + +export function listRolesByroleCategoryId(vars: ListRolesByroleCategoryIdVariables): QueryPromise; +export function listRolesByroleCategoryId(dc: DataConnect, vars: ListRolesByroleCategoryIdVariables): QueryPromise; + +interface GetShiftRoleByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetShiftRoleByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetShiftRoleByIdVariables): QueryRef; + operationName: string; +} +export const getShiftRoleByIdRef: GetShiftRoleByIdRef; + +export function getShiftRoleById(vars: GetShiftRoleByIdVariables): QueryPromise; +export function getShiftRoleById(dc: DataConnect, vars: GetShiftRoleByIdVariables): QueryPromise; + +interface ListShiftRolesByShiftIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByShiftIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftRolesByShiftIdVariables): QueryRef; + operationName: string; +} +export const listShiftRolesByShiftIdRef: ListShiftRolesByShiftIdRef; + +export function listShiftRolesByShiftId(vars: ListShiftRolesByShiftIdVariables): QueryPromise; +export function listShiftRolesByShiftId(dc: DataConnect, vars: ListShiftRolesByShiftIdVariables): QueryPromise; + +interface ListShiftRolesByRoleIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByRoleIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftRolesByRoleIdVariables): QueryRef; + operationName: string; +} +export const listShiftRolesByRoleIdRef: ListShiftRolesByRoleIdRef; + +export function listShiftRolesByRoleId(vars: ListShiftRolesByRoleIdVariables): QueryPromise; +export function listShiftRolesByRoleId(dc: DataConnect, vars: ListShiftRolesByRoleIdVariables): QueryPromise; + +interface ListShiftRolesByShiftIdAndTimeRangeRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByShiftIdAndTimeRangeVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftRolesByShiftIdAndTimeRangeVariables): QueryRef; + operationName: string; +} +export const listShiftRolesByShiftIdAndTimeRangeRef: ListShiftRolesByShiftIdAndTimeRangeRef; + +export function listShiftRolesByShiftIdAndTimeRange(vars: ListShiftRolesByShiftIdAndTimeRangeVariables): QueryPromise; +export function listShiftRolesByShiftIdAndTimeRange(dc: DataConnect, vars: ListShiftRolesByShiftIdAndTimeRangeVariables): QueryPromise; + +interface ListShiftRolesByVendorIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByVendorIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftRolesByVendorIdVariables): QueryRef; + operationName: string; +} +export const listShiftRolesByVendorIdRef: ListShiftRolesByVendorIdRef; + +export function listShiftRolesByVendorId(vars: ListShiftRolesByVendorIdVariables): QueryPromise; +export function listShiftRolesByVendorId(dc: DataConnect, vars: ListShiftRolesByVendorIdVariables): QueryPromise; + +interface ListShiftRolesByBusinessAndDateRangeRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByBusinessAndDateRangeVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftRolesByBusinessAndDateRangeVariables): QueryRef; + operationName: string; +} +export const listShiftRolesByBusinessAndDateRangeRef: ListShiftRolesByBusinessAndDateRangeRef; + +export function listShiftRolesByBusinessAndDateRange(vars: ListShiftRolesByBusinessAndDateRangeVariables): QueryPromise; +export function listShiftRolesByBusinessAndDateRange(dc: DataConnect, vars: ListShiftRolesByBusinessAndDateRangeVariables): QueryPromise; + +interface ListShiftRolesByBusinessAndOrderRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByBusinessAndOrderVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftRolesByBusinessAndOrderVariables): QueryRef; + operationName: string; +} +export const listShiftRolesByBusinessAndOrderRef: ListShiftRolesByBusinessAndOrderRef; + +export function listShiftRolesByBusinessAndOrder(vars: ListShiftRolesByBusinessAndOrderVariables): QueryPromise; +export function listShiftRolesByBusinessAndOrder(dc: DataConnect, vars: ListShiftRolesByBusinessAndOrderVariables): QueryPromise; + +interface ListShiftRolesByBusinessDateRangeCompletedOrdersRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables): QueryRef; + operationName: string; +} +export const listShiftRolesByBusinessDateRangeCompletedOrdersRef: ListShiftRolesByBusinessDateRangeCompletedOrdersRef; + +export function listShiftRolesByBusinessDateRangeCompletedOrders(vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables): QueryPromise; +export function listShiftRolesByBusinessDateRangeCompletedOrders(dc: DataConnect, vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables): QueryPromise; + +interface ListShiftRolesByBusinessAndDatesSummaryRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListShiftRolesByBusinessAndDatesSummaryVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListShiftRolesByBusinessAndDatesSummaryVariables): QueryRef; + operationName: string; +} +export const listShiftRolesByBusinessAndDatesSummaryRef: ListShiftRolesByBusinessAndDatesSummaryRef; + +export function listShiftRolesByBusinessAndDatesSummary(vars: ListShiftRolesByBusinessAndDatesSummaryVariables): QueryPromise; +export function listShiftRolesByBusinessAndDatesSummary(dc: DataConnect, vars: ListShiftRolesByBusinessAndDatesSummaryVariables): QueryPromise; + +interface GetCompletedShiftsByBusinessIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetCompletedShiftsByBusinessIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetCompletedShiftsByBusinessIdVariables): QueryRef; + operationName: string; +} +export const getCompletedShiftsByBusinessIdRef: GetCompletedShiftsByBusinessIdRef; + +export function getCompletedShiftsByBusinessId(vars: GetCompletedShiftsByBusinessIdVariables): QueryPromise; +export function getCompletedShiftsByBusinessId(dc: DataConnect, vars: GetCompletedShiftsByBusinessIdVariables): QueryPromise; + +interface CreateTaskCommentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTaskCommentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateTaskCommentVariables): MutationRef; + operationName: string; +} +export const createTaskCommentRef: CreateTaskCommentRef; + +export function createTaskComment(vars: CreateTaskCommentVariables): MutationPromise; +export function createTaskComment(dc: DataConnect, vars: CreateTaskCommentVariables): MutationPromise; + +interface UpdateTaskCommentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTaskCommentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateTaskCommentVariables): MutationRef; + operationName: string; +} +export const updateTaskCommentRef: UpdateTaskCommentRef; + +export function updateTaskComment(vars: UpdateTaskCommentVariables): MutationPromise; +export function updateTaskComment(dc: DataConnect, vars: UpdateTaskCommentVariables): MutationPromise; + +interface DeleteTaskCommentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTaskCommentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteTaskCommentVariables): MutationRef; + operationName: string; +} +export const deleteTaskCommentRef: DeleteTaskCommentRef; + +export function deleteTaskComment(vars: DeleteTaskCommentVariables): MutationPromise; +export function deleteTaskComment(dc: DataConnect, vars: DeleteTaskCommentVariables): MutationPromise; + +interface ListTaxFormsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListTaxFormsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListTaxFormsVariables): QueryRef; + operationName: string; +} +export const listTaxFormsRef: ListTaxFormsRef; + +export function listTaxForms(vars?: ListTaxFormsVariables): QueryPromise; +export function listTaxForms(dc: DataConnect, vars?: ListTaxFormsVariables): QueryPromise; + +interface GetTaxFormByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTaxFormByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetTaxFormByIdVariables): QueryRef; + operationName: string; +} +export const getTaxFormByIdRef: GetTaxFormByIdRef; + +export function getTaxFormById(vars: GetTaxFormByIdVariables): QueryPromise; +export function getTaxFormById(dc: DataConnect, vars: GetTaxFormByIdVariables): QueryPromise; + +interface GetTaxFormsByStaffIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTaxFormsByStaffIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetTaxFormsByStaffIdVariables): QueryRef; + operationName: string; +} +export const getTaxFormsByStaffIdRef: GetTaxFormsByStaffIdRef; + +export function getTaxFormsByStaffId(vars: GetTaxFormsByStaffIdVariables): QueryPromise; +export function getTaxFormsByStaffId(dc: DataConnect, vars: GetTaxFormsByStaffIdVariables): QueryPromise; + +interface ListTaxFormsWhereRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListTaxFormsWhereVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListTaxFormsWhereVariables): QueryRef; + operationName: string; +} +export const listTaxFormsWhereRef: ListTaxFormsWhereRef; + +export function listTaxFormsWhere(vars?: ListTaxFormsWhereVariables): QueryPromise; +export function listTaxFormsWhere(dc: DataConnect, vars?: ListTaxFormsWhereVariables): QueryPromise; + +interface CreateVendorBenefitPlanRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateVendorBenefitPlanVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateVendorBenefitPlanVariables): MutationRef; + operationName: string; +} +export const createVendorBenefitPlanRef: CreateVendorBenefitPlanRef; + +export function createVendorBenefitPlan(vars: CreateVendorBenefitPlanVariables): MutationPromise; +export function createVendorBenefitPlan(dc: DataConnect, vars: CreateVendorBenefitPlanVariables): MutationPromise; + +interface UpdateVendorBenefitPlanRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateVendorBenefitPlanVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateVendorBenefitPlanVariables): MutationRef; + operationName: string; +} +export const updateVendorBenefitPlanRef: UpdateVendorBenefitPlanRef; + +export function updateVendorBenefitPlan(vars: UpdateVendorBenefitPlanVariables): MutationPromise; +export function updateVendorBenefitPlan(dc: DataConnect, vars: UpdateVendorBenefitPlanVariables): MutationPromise; + +interface DeleteVendorBenefitPlanRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteVendorBenefitPlanVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteVendorBenefitPlanVariables): MutationRef; + operationName: string; +} +export const deleteVendorBenefitPlanRef: DeleteVendorBenefitPlanRef; + +export function deleteVendorBenefitPlan(vars: DeleteVendorBenefitPlanVariables): MutationPromise; +export function deleteVendorBenefitPlan(dc: DataConnect, vars: DeleteVendorBenefitPlanVariables): MutationPromise; + +interface ListFaqDatasRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listFaqDatasRef: ListFaqDatasRef; + +export function listFaqDatas(): QueryPromise; +export function listFaqDatas(dc: DataConnect): QueryPromise; + +interface GetFaqDataByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetFaqDataByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetFaqDataByIdVariables): QueryRef; + operationName: string; +} +export const getFaqDataByIdRef: GetFaqDataByIdRef; + +export function getFaqDataById(vars: GetFaqDataByIdVariables): QueryPromise; +export function getFaqDataById(dc: DataConnect, vars: GetFaqDataByIdVariables): QueryPromise; + +interface FilterFaqDatasRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterFaqDatasVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterFaqDatasVariables): QueryRef; + operationName: string; +} +export const filterFaqDatasRef: FilterFaqDatasRef; + +export function filterFaqDatas(vars?: FilterFaqDatasVariables): QueryPromise; +export function filterFaqDatas(dc: DataConnect, vars?: FilterFaqDatasVariables): QueryPromise; + +interface CreateMessageRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateMessageVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateMessageVariables): MutationRef; + operationName: string; +} +export const createMessageRef: CreateMessageRef; + +export function createMessage(vars: CreateMessageVariables): MutationPromise; +export function createMessage(dc: DataConnect, vars: CreateMessageVariables): MutationPromise; + +interface UpdateMessageRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateMessageVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateMessageVariables): MutationRef; + operationName: string; +} +export const updateMessageRef: UpdateMessageRef; + +export function updateMessage(vars: UpdateMessageVariables): MutationPromise; +export function updateMessage(dc: DataConnect, vars: UpdateMessageVariables): MutationPromise; + +interface DeleteMessageRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteMessageVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteMessageVariables): MutationRef; + operationName: string; +} +export const deleteMessageRef: DeleteMessageRef; + +export function deleteMessage(vars: DeleteMessageVariables): MutationPromise; +export function deleteMessage(dc: DataConnect, vars: DeleteMessageVariables): MutationPromise; + +interface GetStaffCourseByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffCourseByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetStaffCourseByIdVariables): QueryRef; + operationName: string; +} +export const getStaffCourseByIdRef: GetStaffCourseByIdRef; + +export function getStaffCourseById(vars: GetStaffCourseByIdVariables): QueryPromise; +export function getStaffCourseById(dc: DataConnect, vars: GetStaffCourseByIdVariables): QueryPromise; + +interface ListStaffCoursesByStaffIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffCoursesByStaffIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListStaffCoursesByStaffIdVariables): QueryRef; + operationName: string; +} +export const listStaffCoursesByStaffIdRef: ListStaffCoursesByStaffIdRef; + +export function listStaffCoursesByStaffId(vars: ListStaffCoursesByStaffIdVariables): QueryPromise; +export function listStaffCoursesByStaffId(dc: DataConnect, vars: ListStaffCoursesByStaffIdVariables): QueryPromise; + +interface ListStaffCoursesByCourseIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListStaffCoursesByCourseIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListStaffCoursesByCourseIdVariables): QueryRef; + operationName: string; +} +export const listStaffCoursesByCourseIdRef: ListStaffCoursesByCourseIdRef; + +export function listStaffCoursesByCourseId(vars: ListStaffCoursesByCourseIdVariables): QueryPromise; +export function listStaffCoursesByCourseId(dc: DataConnect, vars: ListStaffCoursesByCourseIdVariables): QueryPromise; + +interface GetStaffCourseByStaffAndCourseRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffCourseByStaffAndCourseVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetStaffCourseByStaffAndCourseVariables): QueryRef; + operationName: string; +} +export const getStaffCourseByStaffAndCourseRef: GetStaffCourseByStaffAndCourseRef; + +export function getStaffCourseByStaffAndCourse(vars: GetStaffCourseByStaffAndCourseVariables): QueryPromise; +export function getStaffCourseByStaffAndCourse(dc: DataConnect, vars: GetStaffCourseByStaffAndCourseVariables): QueryPromise; + +interface CreateWorkforceRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateWorkforceVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateWorkforceVariables): MutationRef; + operationName: string; +} +export const createWorkforceRef: CreateWorkforceRef; + +export function createWorkforce(vars: CreateWorkforceVariables): MutationPromise; +export function createWorkforce(dc: DataConnect, vars: CreateWorkforceVariables): MutationPromise; + +interface UpdateWorkforceRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateWorkforceVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateWorkforceVariables): MutationRef; + operationName: string; +} +export const updateWorkforceRef: UpdateWorkforceRef; + +export function updateWorkforce(vars: UpdateWorkforceVariables): MutationPromise; +export function updateWorkforce(dc: DataConnect, vars: UpdateWorkforceVariables): MutationPromise; + +interface DeactivateWorkforceRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeactivateWorkforceVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeactivateWorkforceVariables): MutationRef; + operationName: string; +} +export const deactivateWorkforceRef: DeactivateWorkforceRef; + +export function deactivateWorkforce(vars: DeactivateWorkforceVariables): MutationPromise; +export function deactivateWorkforce(dc: DataConnect, vars: DeactivateWorkforceVariables): MutationPromise; + +interface ListActivityLogsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListActivityLogsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListActivityLogsVariables): QueryRef; + operationName: string; +} +export const listActivityLogsRef: ListActivityLogsRef; + +export function listActivityLogs(vars?: ListActivityLogsVariables): QueryPromise; +export function listActivityLogs(dc: DataConnect, vars?: ListActivityLogsVariables): QueryPromise; + +interface GetActivityLogByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetActivityLogByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetActivityLogByIdVariables): QueryRef; + operationName: string; +} +export const getActivityLogByIdRef: GetActivityLogByIdRef; + +export function getActivityLogById(vars: GetActivityLogByIdVariables): QueryPromise; +export function getActivityLogById(dc: DataConnect, vars: GetActivityLogByIdVariables): QueryPromise; + +interface ListActivityLogsByUserIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListActivityLogsByUserIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListActivityLogsByUserIdVariables): QueryRef; + operationName: string; +} +export const listActivityLogsByUserIdRef: ListActivityLogsByUserIdRef; + +export function listActivityLogsByUserId(vars: ListActivityLogsByUserIdVariables): QueryPromise; +export function listActivityLogsByUserId(dc: DataConnect, vars: ListActivityLogsByUserIdVariables): QueryPromise; + +interface ListUnreadActivityLogsByUserIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListUnreadActivityLogsByUserIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListUnreadActivityLogsByUserIdVariables): QueryRef; + operationName: string; +} +export const listUnreadActivityLogsByUserIdRef: ListUnreadActivityLogsByUserIdRef; + +export function listUnreadActivityLogsByUserId(vars: ListUnreadActivityLogsByUserIdVariables): QueryPromise; +export function listUnreadActivityLogsByUserId(dc: DataConnect, vars: ListUnreadActivityLogsByUserIdVariables): QueryPromise; + +interface FilterActivityLogsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterActivityLogsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterActivityLogsVariables): QueryRef; + operationName: string; +} +export const filterActivityLogsRef: FilterActivityLogsRef; + +export function filterActivityLogs(vars?: FilterActivityLogsVariables): QueryPromise; +export function filterActivityLogs(dc: DataConnect, vars?: FilterActivityLogsVariables): QueryPromise; + +interface ListBenefitsDataRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListBenefitsDataVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListBenefitsDataVariables): QueryRef; + operationName: string; +} +export const listBenefitsDataRef: ListBenefitsDataRef; + +export function listBenefitsData(vars?: ListBenefitsDataVariables): QueryPromise; +export function listBenefitsData(dc: DataConnect, vars?: ListBenefitsDataVariables): QueryPromise; + +interface GetBenefitsDataByKeyRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetBenefitsDataByKeyVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetBenefitsDataByKeyVariables): QueryRef; + operationName: string; +} +export const getBenefitsDataByKeyRef: GetBenefitsDataByKeyRef; + +export function getBenefitsDataByKey(vars: GetBenefitsDataByKeyVariables): QueryPromise; +export function getBenefitsDataByKey(dc: DataConnect, vars: GetBenefitsDataByKeyVariables): QueryPromise; + +interface ListBenefitsDataByStaffIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListBenefitsDataByStaffIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListBenefitsDataByStaffIdVariables): QueryRef; + operationName: string; +} +export const listBenefitsDataByStaffIdRef: ListBenefitsDataByStaffIdRef; + +export function listBenefitsDataByStaffId(vars: ListBenefitsDataByStaffIdVariables): QueryPromise; +export function listBenefitsDataByStaffId(dc: DataConnect, vars: ListBenefitsDataByStaffIdVariables): QueryPromise; + +interface ListBenefitsDataByVendorBenefitPlanIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListBenefitsDataByVendorBenefitPlanIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdVariables): QueryRef; + operationName: string; +} +export const listBenefitsDataByVendorBenefitPlanIdRef: ListBenefitsDataByVendorBenefitPlanIdRef; + +export function listBenefitsDataByVendorBenefitPlanId(vars: ListBenefitsDataByVendorBenefitPlanIdVariables): QueryPromise; +export function listBenefitsDataByVendorBenefitPlanId(dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdVariables): QueryPromise; + +interface ListBenefitsDataByVendorBenefitPlanIdsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListBenefitsDataByVendorBenefitPlanIdsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdsVariables): QueryRef; + operationName: string; +} +export const listBenefitsDataByVendorBenefitPlanIdsRef: ListBenefitsDataByVendorBenefitPlanIdsRef; + +export function listBenefitsDataByVendorBenefitPlanIds(vars: ListBenefitsDataByVendorBenefitPlanIdsVariables): QueryPromise; +export function listBenefitsDataByVendorBenefitPlanIds(dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdsVariables): QueryPromise; + +interface CreateFaqDataRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateFaqDataVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateFaqDataVariables): MutationRef; + operationName: string; +} +export const createFaqDataRef: CreateFaqDataRef; + +export function createFaqData(vars: CreateFaqDataVariables): MutationPromise; +export function createFaqData(dc: DataConnect, vars: CreateFaqDataVariables): MutationPromise; + +interface UpdateFaqDataRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateFaqDataVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateFaqDataVariables): MutationRef; + operationName: string; +} +export const updateFaqDataRef: UpdateFaqDataRef; + +export function updateFaqData(vars: UpdateFaqDataVariables): MutationPromise; +export function updateFaqData(dc: DataConnect, vars: UpdateFaqDataVariables): MutationPromise; + +interface DeleteFaqDataRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteFaqDataVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteFaqDataVariables): MutationRef; + operationName: string; +} +export const deleteFaqDataRef: DeleteFaqDataRef; + +export function deleteFaqData(vars: DeleteFaqDataVariables): MutationPromise; +export function deleteFaqData(dc: DataConnect, vars: DeleteFaqDataVariables): MutationPromise; + +interface CreateInvoiceRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateInvoiceVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateInvoiceVariables): MutationRef; + operationName: string; +} +export const createInvoiceRef: CreateInvoiceRef; + +export function createInvoice(vars: CreateInvoiceVariables): MutationPromise; +export function createInvoice(dc: DataConnect, vars: CreateInvoiceVariables): MutationPromise; + +interface UpdateInvoiceRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateInvoiceVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateInvoiceVariables): MutationRef; + operationName: string; +} +export const updateInvoiceRef: UpdateInvoiceRef; + +export function updateInvoice(vars: UpdateInvoiceVariables): MutationPromise; +export function updateInvoice(dc: DataConnect, vars: UpdateInvoiceVariables): MutationPromise; + +interface DeleteInvoiceRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteInvoiceVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteInvoiceVariables): MutationRef; + operationName: string; +} +export const deleteInvoiceRef: DeleteInvoiceRef; + +export function deleteInvoice(vars: DeleteInvoiceVariables): MutationPromise; +export function deleteInvoice(dc: DataConnect, vars: DeleteInvoiceVariables): MutationPromise; + +interface ListStaffRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listStaffRef: ListStaffRef; + +export function listStaff(): QueryPromise; +export function listStaff(dc: DataConnect): QueryPromise; + +interface GetStaffByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetStaffByIdVariables): QueryRef; + operationName: string; +} +export const getStaffByIdRef: GetStaffByIdRef; + +export function getStaffById(vars: GetStaffByIdVariables): QueryPromise; +export function getStaffById(dc: DataConnect, vars: GetStaffByIdVariables): QueryPromise; + +interface GetStaffByUserIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffByUserIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetStaffByUserIdVariables): QueryRef; + operationName: string; +} +export const getStaffByUserIdRef: GetStaffByUserIdRef; + +export function getStaffByUserId(vars: GetStaffByUserIdVariables): QueryPromise; +export function getStaffByUserId(dc: DataConnect, vars: GetStaffByUserIdVariables): QueryPromise; + +interface FilterStaffRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterStaffVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterStaffVariables): QueryRef; + operationName: string; +} +export const filterStaffRef: FilterStaffRef; + +export function filterStaff(vars?: FilterStaffVariables): QueryPromise; +export function filterStaff(dc: DataConnect, vars?: FilterStaffVariables): QueryPromise; + +interface ListTasksRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listTasksRef: ListTasksRef; + +export function listTasks(): QueryPromise; +export function listTasks(dc: DataConnect): QueryPromise; + +interface GetTaskByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTaskByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetTaskByIdVariables): QueryRef; + operationName: string; +} +export const getTaskByIdRef: GetTaskByIdRef; + +export function getTaskById(vars: GetTaskByIdVariables): QueryPromise; +export function getTaskById(dc: DataConnect, vars: GetTaskByIdVariables): QueryPromise; + +interface GetTasksByOwnerIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTasksByOwnerIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetTasksByOwnerIdVariables): QueryRef; + operationName: string; +} +export const getTasksByOwnerIdRef: GetTasksByOwnerIdRef; + +export function getTasksByOwnerId(vars: GetTasksByOwnerIdVariables): QueryPromise; +export function getTasksByOwnerId(dc: DataConnect, vars: GetTasksByOwnerIdVariables): QueryPromise; + +interface FilterTasksRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterTasksVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterTasksVariables): QueryRef; + operationName: string; +} +export const filterTasksRef: FilterTasksRef; + +export function filterTasks(vars?: FilterTasksVariables): QueryPromise; +export function filterTasks(dc: DataConnect, vars?: FilterTasksVariables): QueryPromise; + +interface CreateTeamHubRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTeamHubVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateTeamHubVariables): MutationRef; + operationName: string; +} +export const createTeamHubRef: CreateTeamHubRef; + +export function createTeamHub(vars: CreateTeamHubVariables): MutationPromise; +export function createTeamHub(dc: DataConnect, vars: CreateTeamHubVariables): MutationPromise; + +interface UpdateTeamHubRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTeamHubVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateTeamHubVariables): MutationRef; + operationName: string; +} +export const updateTeamHubRef: UpdateTeamHubRef; + +export function updateTeamHub(vars: UpdateTeamHubVariables): MutationPromise; +export function updateTeamHub(dc: DataConnect, vars: UpdateTeamHubVariables): MutationPromise; + +interface DeleteTeamHubRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTeamHubVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteTeamHubVariables): MutationRef; + operationName: string; +} +export const deleteTeamHubRef: DeleteTeamHubRef; + +export function deleteTeamHub(vars: DeleteTeamHubVariables): MutationPromise; +export function deleteTeamHub(dc: DataConnect, vars: DeleteTeamHubVariables): MutationPromise; + +interface ListTeamHubsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListTeamHubsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListTeamHubsVariables): QueryRef; + operationName: string; +} +export const listTeamHubsRef: ListTeamHubsRef; + +export function listTeamHubs(vars?: ListTeamHubsVariables): QueryPromise; +export function listTeamHubs(dc: DataConnect, vars?: ListTeamHubsVariables): QueryPromise; + +interface GetTeamHubByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamHubByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetTeamHubByIdVariables): QueryRef; + operationName: string; +} +export const getTeamHubByIdRef: GetTeamHubByIdRef; + +export function getTeamHubById(vars: GetTeamHubByIdVariables): QueryPromise; +export function getTeamHubById(dc: DataConnect, vars: GetTeamHubByIdVariables): QueryPromise; + +interface GetTeamHubsByTeamIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamHubsByTeamIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetTeamHubsByTeamIdVariables): QueryRef; + operationName: string; +} +export const getTeamHubsByTeamIdRef: GetTeamHubsByTeamIdRef; + +export function getTeamHubsByTeamId(vars: GetTeamHubsByTeamIdVariables): QueryPromise; +export function getTeamHubsByTeamId(dc: DataConnect, vars: GetTeamHubsByTeamIdVariables): QueryPromise; + +interface ListTeamHubsByOwnerIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListTeamHubsByOwnerIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListTeamHubsByOwnerIdVariables): QueryRef; + operationName: string; +} +export const listTeamHubsByOwnerIdRef: ListTeamHubsByOwnerIdRef; + +export function listTeamHubsByOwnerId(vars: ListTeamHubsByOwnerIdVariables): QueryPromise; +export function listTeamHubsByOwnerId(dc: DataConnect, vars: ListTeamHubsByOwnerIdVariables): QueryPromise; + +interface ListClientFeedbacksRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListClientFeedbacksVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListClientFeedbacksVariables): QueryRef; + operationName: string; +} +export const listClientFeedbacksRef: ListClientFeedbacksRef; + +export function listClientFeedbacks(vars?: ListClientFeedbacksVariables): QueryPromise; +export function listClientFeedbacks(dc: DataConnect, vars?: ListClientFeedbacksVariables): QueryPromise; + +interface GetClientFeedbackByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetClientFeedbackByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetClientFeedbackByIdVariables): QueryRef; + operationName: string; +} +export const getClientFeedbackByIdRef: GetClientFeedbackByIdRef; + +export function getClientFeedbackById(vars: GetClientFeedbackByIdVariables): QueryPromise; +export function getClientFeedbackById(dc: DataConnect, vars: GetClientFeedbackByIdVariables): QueryPromise; + +interface ListClientFeedbacksByBusinessIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListClientFeedbacksByBusinessIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListClientFeedbacksByBusinessIdVariables): QueryRef; + operationName: string; +} +export const listClientFeedbacksByBusinessIdRef: ListClientFeedbacksByBusinessIdRef; + +export function listClientFeedbacksByBusinessId(vars: ListClientFeedbacksByBusinessIdVariables): QueryPromise; +export function listClientFeedbacksByBusinessId(dc: DataConnect, vars: ListClientFeedbacksByBusinessIdVariables): QueryPromise; + +interface ListClientFeedbacksByVendorIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListClientFeedbacksByVendorIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListClientFeedbacksByVendorIdVariables): QueryRef; + operationName: string; +} +export const listClientFeedbacksByVendorIdRef: ListClientFeedbacksByVendorIdRef; + +export function listClientFeedbacksByVendorId(vars: ListClientFeedbacksByVendorIdVariables): QueryPromise; +export function listClientFeedbacksByVendorId(dc: DataConnect, vars: ListClientFeedbacksByVendorIdVariables): QueryPromise; + +interface ListClientFeedbacksByBusinessAndVendorRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListClientFeedbacksByBusinessAndVendorVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListClientFeedbacksByBusinessAndVendorVariables): QueryRef; + operationName: string; +} +export const listClientFeedbacksByBusinessAndVendorRef: ListClientFeedbacksByBusinessAndVendorRef; + +export function listClientFeedbacksByBusinessAndVendor(vars: ListClientFeedbacksByBusinessAndVendorVariables): QueryPromise; +export function listClientFeedbacksByBusinessAndVendor(dc: DataConnect, vars: ListClientFeedbacksByBusinessAndVendorVariables): QueryPromise; + +interface FilterClientFeedbacksRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterClientFeedbacksVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterClientFeedbacksVariables): QueryRef; + operationName: string; +} +export const filterClientFeedbacksRef: FilterClientFeedbacksRef; + +export function filterClientFeedbacks(vars?: FilterClientFeedbacksVariables): QueryPromise; +export function filterClientFeedbacks(dc: DataConnect, vars?: FilterClientFeedbacksVariables): QueryPromise; + +interface ListClientFeedbackRatingsByVendorIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListClientFeedbackRatingsByVendorIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListClientFeedbackRatingsByVendorIdVariables): QueryRef; + operationName: string; +} +export const listClientFeedbackRatingsByVendorIdRef: ListClientFeedbackRatingsByVendorIdRef; + +export function listClientFeedbackRatingsByVendorId(vars: ListClientFeedbackRatingsByVendorIdVariables): QueryPromise; +export function listClientFeedbackRatingsByVendorId(dc: DataConnect, vars: ListClientFeedbackRatingsByVendorIdVariables): QueryPromise; + +interface CreateHubRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateHubVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateHubVariables): MutationRef; + operationName: string; +} +export const createHubRef: CreateHubRef; + +export function createHub(vars: CreateHubVariables): MutationPromise; +export function createHub(dc: DataConnect, vars: CreateHubVariables): MutationPromise; + +interface UpdateHubRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateHubVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateHubVariables): MutationRef; + operationName: string; +} +export const updateHubRef: UpdateHubRef; + +export function updateHub(vars: UpdateHubVariables): MutationPromise; +export function updateHub(dc: DataConnect, vars: UpdateHubVariables): MutationPromise; + +interface DeleteHubRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteHubVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteHubVariables): MutationRef; + operationName: string; +} +export const deleteHubRef: DeleteHubRef; + +export function deleteHub(vars: DeleteHubVariables): MutationPromise; +export function deleteHub(dc: DataConnect, vars: DeleteHubVariables): MutationPromise; + +interface CreateRoleCategoryRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateRoleCategoryVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateRoleCategoryVariables): MutationRef; + operationName: string; +} +export const createRoleCategoryRef: CreateRoleCategoryRef; + +export function createRoleCategory(vars: CreateRoleCategoryVariables): MutationPromise; +export function createRoleCategory(dc: DataConnect, vars: CreateRoleCategoryVariables): MutationPromise; + +interface UpdateRoleCategoryRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateRoleCategoryVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateRoleCategoryVariables): MutationRef; + operationName: string; +} +export const updateRoleCategoryRef: UpdateRoleCategoryRef; + +export function updateRoleCategory(vars: UpdateRoleCategoryVariables): MutationPromise; +export function updateRoleCategory(dc: DataConnect, vars: UpdateRoleCategoryVariables): MutationPromise; + +interface DeleteRoleCategoryRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteRoleCategoryVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteRoleCategoryVariables): MutationRef; + operationName: string; +} +export const deleteRoleCategoryRef: DeleteRoleCategoryRef; + +export function deleteRoleCategory(vars: DeleteRoleCategoryVariables): MutationPromise; +export function deleteRoleCategory(dc: DataConnect, vars: DeleteRoleCategoryVariables): MutationPromise; + +interface CreateStaffAvailabilityStatsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateStaffAvailabilityStatsVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateStaffAvailabilityStatsVariables): MutationRef; + operationName: string; +} +export const createStaffAvailabilityStatsRef: CreateStaffAvailabilityStatsRef; + +export function createStaffAvailabilityStats(vars: CreateStaffAvailabilityStatsVariables): MutationPromise; +export function createStaffAvailabilityStats(dc: DataConnect, vars: CreateStaffAvailabilityStatsVariables): MutationPromise; + +interface UpdateStaffAvailabilityStatsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateStaffAvailabilityStatsVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateStaffAvailabilityStatsVariables): MutationRef; + operationName: string; +} +export const updateStaffAvailabilityStatsRef: UpdateStaffAvailabilityStatsRef; + +export function updateStaffAvailabilityStats(vars: UpdateStaffAvailabilityStatsVariables): MutationPromise; +export function updateStaffAvailabilityStats(dc: DataConnect, vars: UpdateStaffAvailabilityStatsVariables): MutationPromise; + +interface DeleteStaffAvailabilityStatsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteStaffAvailabilityStatsVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteStaffAvailabilityStatsVariables): MutationRef; + operationName: string; +} +export const deleteStaffAvailabilityStatsRef: DeleteStaffAvailabilityStatsRef; + +export function deleteStaffAvailabilityStats(vars: DeleteStaffAvailabilityStatsVariables): MutationPromise; +export function deleteStaffAvailabilityStats(dc: DataConnect, vars: DeleteStaffAvailabilityStatsVariables): MutationPromise; + +interface ListUsersRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listUsersRef: ListUsersRef; + +export function listUsers(): QueryPromise; +export function listUsers(dc: DataConnect): QueryPromise; + +interface GetUserByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetUserByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetUserByIdVariables): QueryRef; + operationName: string; +} +export const getUserByIdRef: GetUserByIdRef; + +export function getUserById(vars: GetUserByIdVariables): QueryPromise; +export function getUserById(dc: DataConnect, vars: GetUserByIdVariables): QueryPromise; + +interface FilterUsersRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterUsersVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterUsersVariables): QueryRef; + operationName: string; +} +export const filterUsersRef: FilterUsersRef; + +export function filterUsers(vars?: FilterUsersVariables): QueryPromise; +export function filterUsers(dc: DataConnect, vars?: FilterUsersVariables): QueryPromise; + +interface GetVendorByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetVendorByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetVendorByIdVariables): QueryRef; + operationName: string; +} +export const getVendorByIdRef: GetVendorByIdRef; + +export function getVendorById(vars: GetVendorByIdVariables): QueryPromise; +export function getVendorById(dc: DataConnect, vars: GetVendorByIdVariables): QueryPromise; + +interface GetVendorByUserIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetVendorByUserIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetVendorByUserIdVariables): QueryRef; + operationName: string; +} +export const getVendorByUserIdRef: GetVendorByUserIdRef; + +export function getVendorByUserId(vars: GetVendorByUserIdVariables): QueryPromise; +export function getVendorByUserId(dc: DataConnect, vars: GetVendorByUserIdVariables): QueryPromise; + +interface ListVendorsRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listVendorsRef: ListVendorsRef; + +export function listVendors(): QueryPromise; +export function listVendors(dc: DataConnect): QueryPromise; + +interface ListCategoriesRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listCategoriesRef: ListCategoriesRef; + +export function listCategories(): QueryPromise; +export function listCategories(dc: DataConnect): QueryPromise; + +interface GetCategoryByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetCategoryByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetCategoryByIdVariables): QueryRef; + operationName: string; +} +export const getCategoryByIdRef: GetCategoryByIdRef; + +export function getCategoryById(vars: GetCategoryByIdVariables): QueryPromise; +export function getCategoryById(dc: DataConnect, vars: GetCategoryByIdVariables): QueryPromise; + +interface FilterCategoriesRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterCategoriesVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterCategoriesVariables): QueryRef; + operationName: string; +} +export const filterCategoriesRef: FilterCategoriesRef; + +export function filterCategories(vars?: FilterCategoriesVariables): QueryPromise; +export function filterCategories(dc: DataConnect, vars?: FilterCategoriesVariables): QueryPromise; + +interface ListMessagesRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listMessagesRef: ListMessagesRef; + +export function listMessages(): QueryPromise; +export function listMessages(dc: DataConnect): QueryPromise; + +interface GetMessageByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetMessageByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetMessageByIdVariables): QueryRef; + operationName: string; +} +export const getMessageByIdRef: GetMessageByIdRef; + +export function getMessageById(vars: GetMessageByIdVariables): QueryPromise; +export function getMessageById(dc: DataConnect, vars: GetMessageByIdVariables): QueryPromise; + +interface GetMessagesByConversationIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetMessagesByConversationIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetMessagesByConversationIdVariables): QueryRef; + operationName: string; +} +export const getMessagesByConversationIdRef: GetMessagesByConversationIdRef; + +export function getMessagesByConversationId(vars: GetMessagesByConversationIdVariables): QueryPromise; +export function getMessagesByConversationId(dc: DataConnect, vars: GetMessagesByConversationIdVariables): QueryPromise; + +interface CreateShiftRoleRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateShiftRoleVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateShiftRoleVariables): MutationRef; + operationName: string; +} +export const createShiftRoleRef: CreateShiftRoleRef; + +export function createShiftRole(vars: CreateShiftRoleVariables): MutationPromise; +export function createShiftRole(dc: DataConnect, vars: CreateShiftRoleVariables): MutationPromise; + +interface UpdateShiftRoleRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateShiftRoleVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateShiftRoleVariables): MutationRef; + operationName: string; +} +export const updateShiftRoleRef: UpdateShiftRoleRef; + +export function updateShiftRole(vars: UpdateShiftRoleVariables): MutationPromise; +export function updateShiftRole(dc: DataConnect, vars: UpdateShiftRoleVariables): MutationPromise; + +interface DeleteShiftRoleRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteShiftRoleVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteShiftRoleVariables): MutationRef; + operationName: string; +} +export const deleteShiftRoleRef: DeleteShiftRoleRef; + +export function deleteShiftRole(vars: DeleteShiftRoleVariables): MutationPromise; +export function deleteShiftRole(dc: DataConnect, vars: DeleteShiftRoleVariables): MutationPromise; + +interface CreateStaffRoleRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateStaffRoleVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateStaffRoleVariables): MutationRef; + operationName: string; +} +export const createStaffRoleRef: CreateStaffRoleRef; + +export function createStaffRole(vars: CreateStaffRoleVariables): MutationPromise; +export function createStaffRole(dc: DataConnect, vars: CreateStaffRoleVariables): MutationPromise; + +interface DeleteStaffRoleRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteStaffRoleVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteStaffRoleVariables): MutationRef; + operationName: string; +} +export const deleteStaffRoleRef: DeleteStaffRoleRef; + +export function deleteStaffRole(vars: DeleteStaffRoleVariables): MutationPromise; +export function deleteStaffRole(dc: DataConnect, vars: DeleteStaffRoleVariables): MutationPromise; + +interface ListUserConversationsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListUserConversationsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListUserConversationsVariables): QueryRef; + operationName: string; +} +export const listUserConversationsRef: ListUserConversationsRef; + +export function listUserConversations(vars?: ListUserConversationsVariables): QueryPromise; +export function listUserConversations(dc: DataConnect, vars?: ListUserConversationsVariables): QueryPromise; + +interface GetUserConversationByKeyRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetUserConversationByKeyVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetUserConversationByKeyVariables): QueryRef; + operationName: string; +} +export const getUserConversationByKeyRef: GetUserConversationByKeyRef; + +export function getUserConversationByKey(vars: GetUserConversationByKeyVariables): QueryPromise; +export function getUserConversationByKey(dc: DataConnect, vars: GetUserConversationByKeyVariables): QueryPromise; + +interface ListUserConversationsByUserIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListUserConversationsByUserIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListUserConversationsByUserIdVariables): QueryRef; + operationName: string; +} +export const listUserConversationsByUserIdRef: ListUserConversationsByUserIdRef; + +export function listUserConversationsByUserId(vars: ListUserConversationsByUserIdVariables): QueryPromise; +export function listUserConversationsByUserId(dc: DataConnect, vars: ListUserConversationsByUserIdVariables): QueryPromise; + +interface ListUnreadUserConversationsByUserIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListUnreadUserConversationsByUserIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListUnreadUserConversationsByUserIdVariables): QueryRef; + operationName: string; +} +export const listUnreadUserConversationsByUserIdRef: ListUnreadUserConversationsByUserIdRef; + +export function listUnreadUserConversationsByUserId(vars: ListUnreadUserConversationsByUserIdVariables): QueryPromise; +export function listUnreadUserConversationsByUserId(dc: DataConnect, vars: ListUnreadUserConversationsByUserIdVariables): QueryPromise; + +interface ListUserConversationsByConversationIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListUserConversationsByConversationIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListUserConversationsByConversationIdVariables): QueryRef; + operationName: string; +} +export const listUserConversationsByConversationIdRef: ListUserConversationsByConversationIdRef; + +export function listUserConversationsByConversationId(vars: ListUserConversationsByConversationIdVariables): QueryPromise; +export function listUserConversationsByConversationId(dc: DataConnect, vars: ListUserConversationsByConversationIdVariables): QueryPromise; + +interface FilterUserConversationsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterUserConversationsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterUserConversationsVariables): QueryRef; + operationName: string; +} +export const filterUserConversationsRef: FilterUserConversationsRef; + +export function filterUserConversations(vars?: FilterUserConversationsVariables): QueryPromise; +export function filterUserConversations(dc: DataConnect, vars?: FilterUserConversationsVariables): QueryPromise; + +interface CreateAccountRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateAccountVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateAccountVariables): MutationRef; + operationName: string; +} +export const createAccountRef: CreateAccountRef; + +export function createAccount(vars: CreateAccountVariables): MutationPromise; +export function createAccount(dc: DataConnect, vars: CreateAccountVariables): MutationPromise; + +interface UpdateAccountRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateAccountVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateAccountVariables): MutationRef; + operationName: string; +} +export const updateAccountRef: UpdateAccountRef; + +export function updateAccount(vars: UpdateAccountVariables): MutationPromise; +export function updateAccount(dc: DataConnect, vars: UpdateAccountVariables): MutationPromise; + +interface DeleteAccountRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteAccountVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteAccountVariables): MutationRef; + operationName: string; +} +export const deleteAccountRef: DeleteAccountRef; + +export function deleteAccount(vars: DeleteAccountVariables): MutationPromise; +export function deleteAccount(dc: DataConnect, vars: DeleteAccountVariables): MutationPromise; + +interface CreateApplicationRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateApplicationVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateApplicationVariables): MutationRef; + operationName: string; +} +export const createApplicationRef: CreateApplicationRef; + +export function createApplication(vars: CreateApplicationVariables): MutationPromise; +export function createApplication(dc: DataConnect, vars: CreateApplicationVariables): MutationPromise; + +interface UpdateApplicationStatusRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateApplicationStatusVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateApplicationStatusVariables): MutationRef; + operationName: string; +} +export const updateApplicationStatusRef: UpdateApplicationStatusRef; + +export function updateApplicationStatus(vars: UpdateApplicationStatusVariables): MutationPromise; +export function updateApplicationStatus(dc: DataConnect, vars: UpdateApplicationStatusVariables): MutationPromise; + +interface DeleteApplicationRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteApplicationVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteApplicationVariables): MutationRef; + operationName: string; +} +export const deleteApplicationRef: DeleteApplicationRef; + +export function deleteApplication(vars: DeleteApplicationVariables): MutationPromise; +export function deleteApplication(dc: DataConnect, vars: DeleteApplicationVariables): MutationPromise; + +interface CreateAssignmentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateAssignmentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateAssignmentVariables): MutationRef; + operationName: string; +} +export const createAssignmentRef: CreateAssignmentRef; + +export function createAssignment(vars: CreateAssignmentVariables): MutationPromise; +export function createAssignment(dc: DataConnect, vars: CreateAssignmentVariables): MutationPromise; + +interface UpdateAssignmentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateAssignmentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateAssignmentVariables): MutationRef; + operationName: string; +} +export const updateAssignmentRef: UpdateAssignmentRef; + +export function updateAssignment(vars: UpdateAssignmentVariables): MutationPromise; +export function updateAssignment(dc: DataConnect, vars: UpdateAssignmentVariables): MutationPromise; + +interface DeleteAssignmentRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteAssignmentVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteAssignmentVariables): MutationRef; + operationName: string; +} +export const deleteAssignmentRef: DeleteAssignmentRef; + +export function deleteAssignment(vars: DeleteAssignmentVariables): MutationPromise; +export function deleteAssignment(dc: DataConnect, vars: DeleteAssignmentVariables): MutationPromise; + +interface ListHubsRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listHubsRef: ListHubsRef; + +export function listHubs(): QueryPromise; +export function listHubs(dc: DataConnect): QueryPromise; + +interface GetHubByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetHubByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetHubByIdVariables): QueryRef; + operationName: string; +} +export const getHubByIdRef: GetHubByIdRef; + +export function getHubById(vars: GetHubByIdVariables): QueryPromise; +export function getHubById(dc: DataConnect, vars: GetHubByIdVariables): QueryPromise; + +interface GetHubsByOwnerIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetHubsByOwnerIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetHubsByOwnerIdVariables): QueryRef; + operationName: string; +} +export const getHubsByOwnerIdRef: GetHubsByOwnerIdRef; + +export function getHubsByOwnerId(vars: GetHubsByOwnerIdVariables): QueryPromise; +export function getHubsByOwnerId(dc: DataConnect, vars: GetHubsByOwnerIdVariables): QueryPromise; + +interface FilterHubsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterHubsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterHubsVariables): QueryRef; + operationName: string; +} +export const filterHubsRef: FilterHubsRef; + +export function filterHubs(vars?: FilterHubsVariables): QueryPromise; +export function filterHubs(dc: DataConnect, vars?: FilterHubsVariables): QueryPromise; + +interface ListInvoicesRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListInvoicesVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListInvoicesVariables): QueryRef; + operationName: string; +} +export const listInvoicesRef: ListInvoicesRef; + +export function listInvoices(vars?: ListInvoicesVariables): QueryPromise; +export function listInvoices(dc: DataConnect, vars?: ListInvoicesVariables): QueryPromise; + +interface GetInvoiceByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetInvoiceByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetInvoiceByIdVariables): QueryRef; + operationName: string; +} +export const getInvoiceByIdRef: GetInvoiceByIdRef; + +export function getInvoiceById(vars: GetInvoiceByIdVariables): QueryPromise; +export function getInvoiceById(dc: DataConnect, vars: GetInvoiceByIdVariables): QueryPromise; + +interface ListInvoicesByVendorIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesByVendorIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListInvoicesByVendorIdVariables): QueryRef; + operationName: string; +} +export const listInvoicesByVendorIdRef: ListInvoicesByVendorIdRef; + +export function listInvoicesByVendorId(vars: ListInvoicesByVendorIdVariables): QueryPromise; +export function listInvoicesByVendorId(dc: DataConnect, vars: ListInvoicesByVendorIdVariables): QueryPromise; + +interface ListInvoicesByBusinessIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesByBusinessIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListInvoicesByBusinessIdVariables): QueryRef; + operationName: string; +} +export const listInvoicesByBusinessIdRef: ListInvoicesByBusinessIdRef; + +export function listInvoicesByBusinessId(vars: ListInvoicesByBusinessIdVariables): QueryPromise; +export function listInvoicesByBusinessId(dc: DataConnect, vars: ListInvoicesByBusinessIdVariables): QueryPromise; + +interface ListInvoicesByOrderIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesByOrderIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListInvoicesByOrderIdVariables): QueryRef; + operationName: string; +} +export const listInvoicesByOrderIdRef: ListInvoicesByOrderIdRef; + +export function listInvoicesByOrderId(vars: ListInvoicesByOrderIdVariables): QueryPromise; +export function listInvoicesByOrderId(dc: DataConnect, vars: ListInvoicesByOrderIdVariables): QueryPromise; + +interface ListInvoicesByStatusRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListInvoicesByStatusVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListInvoicesByStatusVariables): QueryRef; + operationName: string; +} +export const listInvoicesByStatusRef: ListInvoicesByStatusRef; + +export function listInvoicesByStatus(vars: ListInvoicesByStatusVariables): QueryPromise; +export function listInvoicesByStatus(dc: DataConnect, vars: ListInvoicesByStatusVariables): QueryPromise; + +interface FilterInvoicesRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterInvoicesVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterInvoicesVariables): QueryRef; + operationName: string; +} +export const filterInvoicesRef: FilterInvoicesRef; + +export function filterInvoices(vars?: FilterInvoicesVariables): QueryPromise; +export function filterInvoices(dc: DataConnect, vars?: FilterInvoicesVariables): QueryPromise; + +interface ListOverdueInvoicesRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListOverdueInvoicesVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListOverdueInvoicesVariables): QueryRef; + operationName: string; +} +export const listOverdueInvoicesRef: ListOverdueInvoicesRef; + +export function listOverdueInvoices(vars: ListOverdueInvoicesVariables): QueryPromise; +export function listOverdueInvoices(dc: DataConnect, vars: ListOverdueInvoicesVariables): QueryPromise; + +interface CreateInvoiceTemplateRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateInvoiceTemplateVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateInvoiceTemplateVariables): MutationRef; + operationName: string; +} +export const createInvoiceTemplateRef: CreateInvoiceTemplateRef; + +export function createInvoiceTemplate(vars: CreateInvoiceTemplateVariables): MutationPromise; +export function createInvoiceTemplate(dc: DataConnect, vars: CreateInvoiceTemplateVariables): MutationPromise; + +interface UpdateInvoiceTemplateRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateInvoiceTemplateVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateInvoiceTemplateVariables): MutationRef; + operationName: string; +} +export const updateInvoiceTemplateRef: UpdateInvoiceTemplateRef; + +export function updateInvoiceTemplate(vars: UpdateInvoiceTemplateVariables): MutationPromise; +export function updateInvoiceTemplate(dc: DataConnect, vars: UpdateInvoiceTemplateVariables): MutationPromise; + +interface DeleteInvoiceTemplateRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteInvoiceTemplateVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteInvoiceTemplateVariables): MutationRef; + operationName: string; +} +export const deleteInvoiceTemplateRef: DeleteInvoiceTemplateRef; + +export function deleteInvoiceTemplate(vars: DeleteInvoiceTemplateVariables): MutationPromise; +export function deleteInvoiceTemplate(dc: DataConnect, vars: DeleteInvoiceTemplateVariables): MutationPromise; + +interface CreateStaffAvailabilityRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateStaffAvailabilityVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateStaffAvailabilityVariables): MutationRef; + operationName: string; +} +export const createStaffAvailabilityRef: CreateStaffAvailabilityRef; + +export function createStaffAvailability(vars: CreateStaffAvailabilityVariables): MutationPromise; +export function createStaffAvailability(dc: DataConnect, vars: CreateStaffAvailabilityVariables): MutationPromise; + +interface UpdateStaffAvailabilityRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateStaffAvailabilityVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateStaffAvailabilityVariables): MutationRef; + operationName: string; +} +export const updateStaffAvailabilityRef: UpdateStaffAvailabilityRef; + +export function updateStaffAvailability(vars: UpdateStaffAvailabilityVariables): MutationPromise; +export function updateStaffAvailability(dc: DataConnect, vars: UpdateStaffAvailabilityVariables): MutationPromise; + +interface DeleteStaffAvailabilityRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteStaffAvailabilityVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteStaffAvailabilityVariables): MutationRef; + operationName: string; +} +export const deleteStaffAvailabilityRef: DeleteStaffAvailabilityRef; + +export function deleteStaffAvailability(vars: DeleteStaffAvailabilityVariables): MutationPromise; +export function deleteStaffAvailability(dc: DataConnect, vars: DeleteStaffAvailabilityVariables): MutationPromise; + +interface CreateTeamMemberRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTeamMemberVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateTeamMemberVariables): MutationRef; + operationName: string; +} +export const createTeamMemberRef: CreateTeamMemberRef; + +export function createTeamMember(vars: CreateTeamMemberVariables): MutationPromise; +export function createTeamMember(dc: DataConnect, vars: CreateTeamMemberVariables): MutationPromise; + +interface UpdateTeamMemberRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTeamMemberVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateTeamMemberVariables): MutationRef; + operationName: string; +} +export const updateTeamMemberRef: UpdateTeamMemberRef; + +export function updateTeamMember(vars: UpdateTeamMemberVariables): MutationPromise; +export function updateTeamMember(dc: DataConnect, vars: UpdateTeamMemberVariables): MutationPromise; + +interface UpdateTeamMemberInviteStatusRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTeamMemberInviteStatusVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateTeamMemberInviteStatusVariables): MutationRef; + operationName: string; +} +export const updateTeamMemberInviteStatusRef: UpdateTeamMemberInviteStatusRef; + +export function updateTeamMemberInviteStatus(vars: UpdateTeamMemberInviteStatusVariables): MutationPromise; +export function updateTeamMemberInviteStatus(dc: DataConnect, vars: UpdateTeamMemberInviteStatusVariables): MutationPromise; + +interface AcceptInviteByCodeRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: AcceptInviteByCodeVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: AcceptInviteByCodeVariables): MutationRef; + operationName: string; +} +export const acceptInviteByCodeRef: AcceptInviteByCodeRef; + +export function acceptInviteByCode(vars: AcceptInviteByCodeVariables): MutationPromise; +export function acceptInviteByCode(dc: DataConnect, vars: AcceptInviteByCodeVariables): MutationPromise; + +interface CancelInviteByCodeRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CancelInviteByCodeVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CancelInviteByCodeVariables): MutationRef; + operationName: string; +} +export const cancelInviteByCodeRef: CancelInviteByCodeRef; + +export function cancelInviteByCode(vars: CancelInviteByCodeVariables): MutationPromise; +export function cancelInviteByCode(dc: DataConnect, vars: CancelInviteByCodeVariables): MutationPromise; + +interface DeleteTeamMemberRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTeamMemberVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteTeamMemberVariables): MutationRef; + operationName: string; +} +export const deleteTeamMemberRef: DeleteTeamMemberRef; + +export function deleteTeamMember(vars: DeleteTeamMemberVariables): MutationPromise; +export function deleteTeamMember(dc: DataConnect, vars: DeleteTeamMemberVariables): MutationPromise; + +interface ListCoursesRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listCoursesRef: ListCoursesRef; + +export function listCourses(): QueryPromise; +export function listCourses(dc: DataConnect): QueryPromise; + +interface GetCourseByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetCourseByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetCourseByIdVariables): QueryRef; + operationName: string; +} +export const getCourseByIdRef: GetCourseByIdRef; + +export function getCourseById(vars: GetCourseByIdVariables): QueryPromise; +export function getCourseById(dc: DataConnect, vars: GetCourseByIdVariables): QueryPromise; + +interface FilterCoursesRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterCoursesVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterCoursesVariables): QueryRef; + operationName: string; +} +export const filterCoursesRef: FilterCoursesRef; + +export function filterCourses(vars?: FilterCoursesVariables): QueryPromise; +export function filterCourses(dc: DataConnect, vars?: FilterCoursesVariables): QueryPromise; + +interface CreateLevelRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateLevelVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateLevelVariables): MutationRef; + operationName: string; +} +export const createLevelRef: CreateLevelRef; + +export function createLevel(vars: CreateLevelVariables): MutationPromise; +export function createLevel(dc: DataConnect, vars: CreateLevelVariables): MutationPromise; + +interface UpdateLevelRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateLevelVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateLevelVariables): MutationRef; + operationName: string; +} +export const updateLevelRef: UpdateLevelRef; + +export function updateLevel(vars: UpdateLevelVariables): MutationPromise; +export function updateLevel(dc: DataConnect, vars: UpdateLevelVariables): MutationPromise; + +interface DeleteLevelRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteLevelVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteLevelVariables): MutationRef; + operationName: string; +} +export const deleteLevelRef: DeleteLevelRef; + +export function deleteLevel(vars: DeleteLevelVariables): MutationPromise; +export function deleteLevel(dc: DataConnect, vars: DeleteLevelVariables): MutationPromise; + +interface CreateOrderRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateOrderVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateOrderVariables): MutationRef; + operationName: string; +} +export const createOrderRef: CreateOrderRef; + +export function createOrder(vars: CreateOrderVariables): MutationPromise; +export function createOrder(dc: DataConnect, vars: CreateOrderVariables): MutationPromise; + +interface UpdateOrderRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateOrderVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateOrderVariables): MutationRef; + operationName: string; +} +export const updateOrderRef: UpdateOrderRef; + +export function updateOrder(vars: UpdateOrderVariables): MutationPromise; +export function updateOrder(dc: DataConnect, vars: UpdateOrderVariables): MutationPromise; + +interface DeleteOrderRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteOrderVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteOrderVariables): MutationRef; + operationName: string; +} +export const deleteOrderRef: DeleteOrderRef; + +export function deleteOrder(vars: DeleteOrderVariables): MutationPromise; +export function deleteOrder(dc: DataConnect, vars: DeleteOrderVariables): MutationPromise; + +interface ListVendorRatesRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listVendorRatesRef: ListVendorRatesRef; + +export function listVendorRates(): QueryPromise; +export function listVendorRates(dc: DataConnect): QueryPromise; + +interface GetVendorRateByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetVendorRateByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetVendorRateByIdVariables): QueryRef; + operationName: string; +} +export const getVendorRateByIdRef: GetVendorRateByIdRef; + +export function getVendorRateById(vars: GetVendorRateByIdVariables): QueryPromise; +export function getVendorRateById(dc: DataConnect, vars: GetVendorRateByIdVariables): QueryPromise; + +interface GetWorkforceByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetWorkforceByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetWorkforceByIdVariables): QueryRef; + operationName: string; +} +export const getWorkforceByIdRef: GetWorkforceByIdRef; + +export function getWorkforceById(vars: GetWorkforceByIdVariables): QueryPromise; +export function getWorkforceById(dc: DataConnect, vars: GetWorkforceByIdVariables): QueryPromise; + +interface GetWorkforceByVendorAndStaffRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetWorkforceByVendorAndStaffVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetWorkforceByVendorAndStaffVariables): QueryRef; + operationName: string; +} +export const getWorkforceByVendorAndStaffRef: GetWorkforceByVendorAndStaffRef; + +export function getWorkforceByVendorAndStaff(vars: GetWorkforceByVendorAndStaffVariables): QueryPromise; +export function getWorkforceByVendorAndStaff(dc: DataConnect, vars: GetWorkforceByVendorAndStaffVariables): QueryPromise; + +interface ListWorkforceByVendorIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListWorkforceByVendorIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListWorkforceByVendorIdVariables): QueryRef; + operationName: string; +} +export const listWorkforceByVendorIdRef: ListWorkforceByVendorIdRef; + +export function listWorkforceByVendorId(vars: ListWorkforceByVendorIdVariables): QueryPromise; +export function listWorkforceByVendorId(dc: DataConnect, vars: ListWorkforceByVendorIdVariables): QueryPromise; + +interface ListWorkforceByStaffIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListWorkforceByStaffIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListWorkforceByStaffIdVariables): QueryRef; + operationName: string; +} +export const listWorkforceByStaffIdRef: ListWorkforceByStaffIdRef; + +export function listWorkforceByStaffId(vars: ListWorkforceByStaffIdVariables): QueryPromise; +export function listWorkforceByStaffId(dc: DataConnect, vars: ListWorkforceByStaffIdVariables): QueryPromise; + +interface GetWorkforceByVendorAndNumberRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetWorkforceByVendorAndNumberVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetWorkforceByVendorAndNumberVariables): QueryRef; + operationName: string; +} +export const getWorkforceByVendorAndNumberRef: GetWorkforceByVendorAndNumberRef; + +export function getWorkforceByVendorAndNumber(vars: GetWorkforceByVendorAndNumberVariables): QueryPromise; +export function getWorkforceByVendorAndNumber(dc: DataConnect, vars: GetWorkforceByVendorAndNumberVariables): QueryPromise; + +interface CreateCategoryRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateCategoryVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateCategoryVariables): MutationRef; + operationName: string; +} +export const createCategoryRef: CreateCategoryRef; + +export function createCategory(vars: CreateCategoryVariables): MutationPromise; +export function createCategory(dc: DataConnect, vars: CreateCategoryVariables): MutationPromise; + +interface UpdateCategoryRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateCategoryVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateCategoryVariables): MutationRef; + operationName: string; +} +export const updateCategoryRef: UpdateCategoryRef; + +export function updateCategory(vars: UpdateCategoryVariables): MutationPromise; +export function updateCategory(dc: DataConnect, vars: UpdateCategoryVariables): MutationPromise; + +interface DeleteCategoryRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteCategoryVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteCategoryVariables): MutationRef; + operationName: string; +} +export const deleteCategoryRef: DeleteCategoryRef; + +export function deleteCategory(vars: DeleteCategoryVariables): MutationPromise; +export function deleteCategory(dc: DataConnect, vars: DeleteCategoryVariables): MutationPromise; + +interface ListStaffAvailabilityStatsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListStaffAvailabilityStatsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListStaffAvailabilityStatsVariables): QueryRef; + operationName: string; +} +export const listStaffAvailabilityStatsRef: ListStaffAvailabilityStatsRef; + +export function listStaffAvailabilityStats(vars?: ListStaffAvailabilityStatsVariables): QueryPromise; +export function listStaffAvailabilityStats(dc: DataConnect, vars?: ListStaffAvailabilityStatsVariables): QueryPromise; + +interface GetStaffAvailabilityStatsByStaffIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetStaffAvailabilityStatsByStaffIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetStaffAvailabilityStatsByStaffIdVariables): QueryRef; + operationName: string; +} +export const getStaffAvailabilityStatsByStaffIdRef: GetStaffAvailabilityStatsByStaffIdRef; + +export function getStaffAvailabilityStatsByStaffId(vars: GetStaffAvailabilityStatsByStaffIdVariables): QueryPromise; +export function getStaffAvailabilityStatsByStaffId(dc: DataConnect, vars: GetStaffAvailabilityStatsByStaffIdVariables): QueryPromise; + +interface FilterStaffAvailabilityStatsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterStaffAvailabilityStatsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterStaffAvailabilityStatsVariables): QueryRef; + operationName: string; +} +export const filterStaffAvailabilityStatsRef: FilterStaffAvailabilityStatsRef; + +export function filterStaffAvailabilityStats(vars?: FilterStaffAvailabilityStatsVariables): QueryPromise; +export function filterStaffAvailabilityStats(dc: DataConnect, vars?: FilterStaffAvailabilityStatsVariables): QueryPromise; + +interface CreateTaxFormRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateTaxFormVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateTaxFormVariables): MutationRef; + operationName: string; +} +export const createTaxFormRef: CreateTaxFormRef; + +export function createTaxForm(vars: CreateTaxFormVariables): MutationPromise; +export function createTaxForm(dc: DataConnect, vars: CreateTaxFormVariables): MutationPromise; + +interface UpdateTaxFormRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateTaxFormVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateTaxFormVariables): MutationRef; + operationName: string; +} +export const updateTaxFormRef: UpdateTaxFormRef; + +export function updateTaxForm(vars: UpdateTaxFormVariables): MutationPromise; +export function updateTaxForm(dc: DataConnect, vars: UpdateTaxFormVariables): MutationPromise; + +interface DeleteTaxFormRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteTaxFormVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteTaxFormVariables): MutationRef; + operationName: string; +} +export const deleteTaxFormRef: DeleteTaxFormRef; + +export function deleteTaxForm(vars: DeleteTaxFormVariables): MutationPromise; +export function deleteTaxForm(dc: DataConnect, vars: DeleteTaxFormVariables): MutationPromise; + +interface ListTeamHudDepartmentsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListTeamHudDepartmentsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListTeamHudDepartmentsVariables): QueryRef; + operationName: string; +} +export const listTeamHudDepartmentsRef: ListTeamHudDepartmentsRef; + +export function listTeamHudDepartments(vars?: ListTeamHudDepartmentsVariables): QueryPromise; +export function listTeamHudDepartments(dc: DataConnect, vars?: ListTeamHudDepartmentsVariables): QueryPromise; + +interface GetTeamHudDepartmentByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamHudDepartmentByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetTeamHudDepartmentByIdVariables): QueryRef; + operationName: string; +} +export const getTeamHudDepartmentByIdRef: GetTeamHudDepartmentByIdRef; + +export function getTeamHudDepartmentById(vars: GetTeamHudDepartmentByIdVariables): QueryPromise; +export function getTeamHudDepartmentById(dc: DataConnect, vars: GetTeamHudDepartmentByIdVariables): QueryPromise; + +interface ListTeamHudDepartmentsByTeamHubIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListTeamHudDepartmentsByTeamHubIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListTeamHudDepartmentsByTeamHubIdVariables): QueryRef; + operationName: string; +} +export const listTeamHudDepartmentsByTeamHubIdRef: ListTeamHudDepartmentsByTeamHubIdRef; + +export function listTeamHudDepartmentsByTeamHubId(vars: ListTeamHudDepartmentsByTeamHubIdVariables): QueryPromise; +export function listTeamHudDepartmentsByTeamHubId(dc: DataConnect, vars: ListTeamHudDepartmentsByTeamHubIdVariables): QueryPromise; + +interface CreateVendorRateRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateVendorRateVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateVendorRateVariables): MutationRef; + operationName: string; +} +export const createVendorRateRef: CreateVendorRateRef; + +export function createVendorRate(vars: CreateVendorRateVariables): MutationPromise; +export function createVendorRate(dc: DataConnect, vars: CreateVendorRateVariables): MutationPromise; + +interface UpdateVendorRateRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateVendorRateVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateVendorRateVariables): MutationRef; + operationName: string; +} +export const updateVendorRateRef: UpdateVendorRateRef; + +export function updateVendorRate(vars: UpdateVendorRateVariables): MutationPromise; +export function updateVendorRate(dc: DataConnect, vars: UpdateVendorRateVariables): MutationPromise; + +interface DeleteVendorRateRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteVendorRateVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteVendorRateVariables): MutationRef; + operationName: string; +} +export const deleteVendorRateRef: DeleteVendorRateRef; + +export function deleteVendorRate(vars: DeleteVendorRateVariables): MutationPromise; +export function deleteVendorRate(dc: DataConnect, vars: DeleteVendorRateVariables): MutationPromise; + +interface CreateActivityLogRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateActivityLogVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateActivityLogVariables): MutationRef; + operationName: string; +} +export const createActivityLogRef: CreateActivityLogRef; + +export function createActivityLog(vars: CreateActivityLogVariables): MutationPromise; +export function createActivityLog(dc: DataConnect, vars: CreateActivityLogVariables): MutationPromise; + +interface UpdateActivityLogRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateActivityLogVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateActivityLogVariables): MutationRef; + operationName: string; +} +export const updateActivityLogRef: UpdateActivityLogRef; + +export function updateActivityLog(vars: UpdateActivityLogVariables): MutationPromise; +export function updateActivityLog(dc: DataConnect, vars: UpdateActivityLogVariables): MutationPromise; + +interface MarkActivityLogAsReadRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: MarkActivityLogAsReadVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: MarkActivityLogAsReadVariables): MutationRef; + operationName: string; +} +export const markActivityLogAsReadRef: MarkActivityLogAsReadRef; + +export function markActivityLogAsRead(vars: MarkActivityLogAsReadVariables): MutationPromise; +export function markActivityLogAsRead(dc: DataConnect, vars: MarkActivityLogAsReadVariables): MutationPromise; + +interface MarkActivityLogsAsReadRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: MarkActivityLogsAsReadVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: MarkActivityLogsAsReadVariables): MutationRef; + operationName: string; +} +export const markActivityLogsAsReadRef: MarkActivityLogsAsReadRef; + +export function markActivityLogsAsRead(vars: MarkActivityLogsAsReadVariables): MutationPromise; +export function markActivityLogsAsRead(dc: DataConnect, vars: MarkActivityLogsAsReadVariables): MutationPromise; + +interface DeleteActivityLogRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteActivityLogVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteActivityLogVariables): MutationRef; + operationName: string; +} +export const deleteActivityLogRef: DeleteActivityLogRef; + +export function deleteActivityLog(vars: DeleteActivityLogVariables): MutationPromise; +export function deleteActivityLog(dc: DataConnect, vars: DeleteActivityLogVariables): MutationPromise; + +interface ListLevelsRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listLevelsRef: ListLevelsRef; + +export function listLevels(): QueryPromise; +export function listLevels(dc: DataConnect): QueryPromise; + +interface GetLevelByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetLevelByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetLevelByIdVariables): QueryRef; + operationName: string; +} +export const getLevelByIdRef: GetLevelByIdRef; + +export function getLevelById(vars: GetLevelByIdVariables): QueryPromise; +export function getLevelById(dc: DataConnect, vars: GetLevelByIdVariables): QueryPromise; + +interface FilterLevelsRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterLevelsVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterLevelsVariables): QueryRef; + operationName: string; +} +export const filterLevelsRef: FilterLevelsRef; + +export function filterLevels(vars?: FilterLevelsVariables): QueryPromise; +export function filterLevels(dc: DataConnect, vars?: FilterLevelsVariables): QueryPromise; + +interface CreateShiftRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateShiftVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateShiftVariables): MutationRef; + operationName: string; +} +export const createShiftRef: CreateShiftRef; + +export function createShift(vars: CreateShiftVariables): MutationPromise; +export function createShift(dc: DataConnect, vars: CreateShiftVariables): MutationPromise; + +interface UpdateShiftRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateShiftVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateShiftVariables): MutationRef; + operationName: string; +} +export const updateShiftRef: UpdateShiftRef; + +export function updateShift(vars: UpdateShiftVariables): MutationPromise; +export function updateShift(dc: DataConnect, vars: UpdateShiftVariables): MutationPromise; + +interface DeleteShiftRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteShiftVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteShiftVariables): MutationRef; + operationName: string; +} +export const deleteShiftRef: DeleteShiftRef; + +export function deleteShift(vars: DeleteShiftVariables): MutationPromise; +export function deleteShift(dc: DataConnect, vars: DeleteShiftVariables): MutationPromise; + +interface CreateStaffRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: CreateStaffVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: CreateStaffVariables): MutationRef; + operationName: string; +} +export const createStaffRef: CreateStaffRef; + +export function createStaff(vars: CreateStaffVariables): MutationPromise; +export function createStaff(dc: DataConnect, vars: CreateStaffVariables): MutationPromise; + +interface UpdateStaffRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: UpdateStaffVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: UpdateStaffVariables): MutationRef; + operationName: string; +} +export const updateStaffRef: UpdateStaffRef; + +export function updateStaff(vars: UpdateStaffVariables): MutationPromise; +export function updateStaff(dc: DataConnect, vars: UpdateStaffVariables): MutationPromise; + +interface DeleteStaffRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: DeleteStaffVariables): MutationRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: DeleteStaffVariables): MutationRef; + operationName: string; +} +export const deleteStaffRef: DeleteStaffRef; + +export function deleteStaff(vars: DeleteStaffVariables): MutationPromise; +export function deleteStaff(dc: DataConnect, vars: DeleteStaffVariables): MutationPromise; + +interface ListTeamsRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listTeamsRef: ListTeamsRef; + +export function listTeams(): QueryPromise; +export function listTeams(dc: DataConnect): QueryPromise; + +interface GetTeamByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetTeamByIdVariables): QueryRef; + operationName: string; +} +export const getTeamByIdRef: GetTeamByIdRef; + +export function getTeamById(vars: GetTeamByIdVariables): QueryPromise; +export function getTeamById(dc: DataConnect, vars: GetTeamByIdVariables): QueryPromise; + +interface GetTeamsByOwnerIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamsByOwnerIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetTeamsByOwnerIdVariables): QueryRef; + operationName: string; +} +export const getTeamsByOwnerIdRef: GetTeamsByOwnerIdRef; + +export function getTeamsByOwnerId(vars: GetTeamsByOwnerIdVariables): QueryPromise; +export function getTeamsByOwnerId(dc: DataConnect, vars: GetTeamsByOwnerIdVariables): QueryPromise; + +interface ListTeamMembersRef { + /* Allow users to create refs without passing in DataConnect */ + (): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect): QueryRef; + operationName: string; +} +export const listTeamMembersRef: ListTeamMembersRef; + +export function listTeamMembers(): QueryPromise; +export function listTeamMembers(dc: DataConnect): QueryPromise; + +interface GetTeamMemberByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamMemberByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetTeamMemberByIdVariables): QueryRef; + operationName: string; +} +export const getTeamMemberByIdRef: GetTeamMemberByIdRef; + +export function getTeamMemberById(vars: GetTeamMemberByIdVariables): QueryPromise; +export function getTeamMemberById(dc: DataConnect, vars: GetTeamMemberByIdVariables): QueryPromise; + +interface GetTeamMembersByTeamIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetTeamMembersByTeamIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetTeamMembersByTeamIdVariables): QueryRef; + operationName: string; +} +export const getTeamMembersByTeamIdRef: GetTeamMembersByTeamIdRef; + +export function getTeamMembersByTeamId(vars: GetTeamMembersByTeamIdVariables): QueryPromise; +export function getTeamMembersByTeamId(dc: DataConnect, vars: GetTeamMembersByTeamIdVariables): QueryPromise; + +interface ListVendorBenefitPlansRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: ListVendorBenefitPlansVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: ListVendorBenefitPlansVariables): QueryRef; + operationName: string; +} +export const listVendorBenefitPlansRef: ListVendorBenefitPlansRef; + +export function listVendorBenefitPlans(vars?: ListVendorBenefitPlansVariables): QueryPromise; +export function listVendorBenefitPlans(dc: DataConnect, vars?: ListVendorBenefitPlansVariables): QueryPromise; + +interface GetVendorBenefitPlanByIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: GetVendorBenefitPlanByIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: GetVendorBenefitPlanByIdVariables): QueryRef; + operationName: string; +} +export const getVendorBenefitPlanByIdRef: GetVendorBenefitPlanByIdRef; + +export function getVendorBenefitPlanById(vars: GetVendorBenefitPlanByIdVariables): QueryPromise; +export function getVendorBenefitPlanById(dc: DataConnect, vars: GetVendorBenefitPlanByIdVariables): QueryPromise; + +interface ListVendorBenefitPlansByVendorIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListVendorBenefitPlansByVendorIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListVendorBenefitPlansByVendorIdVariables): QueryRef; + operationName: string; +} +export const listVendorBenefitPlansByVendorIdRef: ListVendorBenefitPlansByVendorIdRef; + +export function listVendorBenefitPlansByVendorId(vars: ListVendorBenefitPlansByVendorIdVariables): QueryPromise; +export function listVendorBenefitPlansByVendorId(dc: DataConnect, vars: ListVendorBenefitPlansByVendorIdVariables): QueryPromise; + +interface ListActiveVendorBenefitPlansByVendorIdRef { + /* Allow users to create refs without passing in DataConnect */ + (vars: ListActiveVendorBenefitPlansByVendorIdVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars: ListActiveVendorBenefitPlansByVendorIdVariables): QueryRef; + operationName: string; +} +export const listActiveVendorBenefitPlansByVendorIdRef: ListActiveVendorBenefitPlansByVendorIdRef; + +export function listActiveVendorBenefitPlansByVendorId(vars: ListActiveVendorBenefitPlansByVendorIdVariables): QueryPromise; +export function listActiveVendorBenefitPlansByVendorId(dc: DataConnect, vars: ListActiveVendorBenefitPlansByVendorIdVariables): QueryPromise; + +interface FilterVendorBenefitPlansRef { + /* Allow users to create refs without passing in DataConnect */ + (vars?: FilterVendorBenefitPlansVariables): QueryRef; + /* Allow users to pass in custom DataConnect instances */ + (dc: DataConnect, vars?: FilterVendorBenefitPlansVariables): QueryRef; + operationName: string; +} +export const filterVendorBenefitPlansRef: FilterVendorBenefitPlansRef; + +export function filterVendorBenefitPlans(vars?: FilterVendorBenefitPlansVariables): QueryPromise; +export function filterVendorBenefitPlans(dc: DataConnect, vars?: FilterVendorBenefitPlansVariables): QueryPromise; + diff --git a/apps/web/src/dataconnect-generated/package.json b/apps/web/src/dataconnect-generated/package.json new file mode 100644 index 00000000..82c276dc --- /dev/null +++ b/apps/web/src/dataconnect-generated/package.json @@ -0,0 +1,32 @@ +{ + "name": "@dataconnect/generated", + "version": "1.0.0", + "author": "Firebase (https://firebase.google.com/)", + "description": "Generated SDK For example", + "license": "Apache-2.0", + "engines": { + "node": " >=18.0" + }, + "typings": "index.d.ts", + "module": "esm/index.esm.js", + "main": "index.cjs.js", + "browser": "esm/index.esm.js", + "exports": { + ".": { + "types": "./index.d.ts", + "require": "./index.cjs.js", + "default": "./esm/index.esm.js" + }, + "./react": { + "types": "./react/index.d.ts", + "require": "./react/index.cjs.js", + "import": "./react/esm/index.esm.js", + "default": "./react/esm/index.esm.js" + }, + "./package.json": "./package.json" + }, + "peerDependencies": { + "firebase": "^11.3.0 || ^12.0.0", + "@tanstack-query-firebase/react": "^2.0.0" + } +} \ No newline at end of file diff --git a/apps/web/src/dataconnect-generated/react/README.md b/apps/web/src/dataconnect-generated/react/README.md new file mode 100644 index 00000000..e4708e3d --- /dev/null +++ b/apps/web/src/dataconnect-generated/react/README.md @@ -0,0 +1,40061 @@ +# Generated React README +This README will guide you through the process of using the generated React SDK package for the connector `example`. It will also provide examples on how to use your generated SDK to call your Data Connect queries and mutations. + +**If you're looking for the `JavaScript README`, you can find it at [`dataconnect-generated/README.md`](../README.md)** + +***NOTE:** This README is generated alongside the generated SDK. If you make changes to this file, they will be overwritten when the SDK is regenerated.* + +You can use this generated SDK by importing from the package `@dataconnect/generated/react` as shown below. Both CommonJS and ESM imports are supported. + +You can also follow the instructions from the [Data Connect documentation](https://firebase.google.com/docs/data-connect/web-sdk#react). + +# Table of Contents +- [**Overview**](#generated-react-readme) +- [**TanStack Query Firebase & TanStack React Query**](#tanstack-query-firebase-tanstack-react-query) + - [*Package Installation*](#installing-tanstack-query-firebase-and-tanstack-react-query-packages) + - [*Configuring TanStack Query*](#configuring-tanstack-query) +- [**Accessing the connector**](#accessing-the-connector) + - [*Connecting to the local Emulator*](#connecting-to-the-local-emulator) +- [**Queries**](#queries) + - [*listShifts*](#listshifts) + - [*getShiftById*](#getshiftbyid) + - [*filterShifts*](#filtershifts) + - [*getShiftsByBusinessId*](#getshiftsbybusinessid) + - [*getShiftsByVendorId*](#getshiftsbyvendorid) + - [*listEmergencyContacts*](#listemergencycontacts) + - [*getEmergencyContactById*](#getemergencycontactbyid) + - [*getEmergencyContactsByStaffId*](#getemergencycontactsbystaffid) + - [*getMyTasks*](#getmytasks) + - [*getMemberTaskByIdKey*](#getmembertaskbyidkey) + - [*getMemberTasksByTaskId*](#getmembertasksbytaskid) + - [*listCertificates*](#listcertificates) + - [*getCertificateById*](#getcertificatebyid) + - [*listCertificatesByStaffId*](#listcertificatesbystaffid) + - [*listAssignments*](#listassignments) + - [*getAssignmentById*](#getassignmentbyid) + - [*listAssignmentsByWorkforceId*](#listassignmentsbyworkforceid) + - [*listAssignmentsByWorkforceIds*](#listassignmentsbyworkforceids) + - [*listAssignmentsByShiftRole*](#listassignmentsbyshiftrole) + - [*filterAssignments*](#filterassignments) + - [*listInvoiceTemplates*](#listinvoicetemplates) + - [*getInvoiceTemplateById*](#getinvoicetemplatebyid) + - [*listInvoiceTemplatesByOwnerId*](#listinvoicetemplatesbyownerid) + - [*listInvoiceTemplatesByVendorId*](#listinvoicetemplatesbyvendorid) + - [*listInvoiceTemplatesByBusinessId*](#listinvoicetemplatesbybusinessid) + - [*listInvoiceTemplatesByOrderId*](#listinvoicetemplatesbyorderid) + - [*searchInvoiceTemplatesByOwnerAndName*](#searchinvoicetemplatesbyownerandname) + - [*getStaffDocumentByKey*](#getstaffdocumentbykey) + - [*listStaffDocumentsByStaffId*](#liststaffdocumentsbystaffid) + - [*listStaffDocumentsByDocumentType*](#liststaffdocumentsbydocumenttype) + - [*listStaffDocumentsByStatus*](#liststaffdocumentsbystatus) + - [*listAccounts*](#listaccounts) + - [*getAccountById*](#getaccountbyid) + - [*getAccountsByOwnerId*](#getaccountsbyownerid) + - [*filterAccounts*](#filteraccounts) + - [*listApplications*](#listapplications) + - [*getApplicationById*](#getapplicationbyid) + - [*getApplicationsByShiftId*](#getapplicationsbyshiftid) + - [*getApplicationsByShiftIdAndStatus*](#getapplicationsbyshiftidandstatus) + - [*getApplicationsByStaffId*](#getapplicationsbystaffid) + - [*vaidateDayStaffApplication*](#vaidatedaystaffapplication) + - [*getApplicationByStaffShiftAndRole*](#getapplicationbystaffshiftandrole) + - [*listAcceptedApplicationsByShiftRoleKey*](#listacceptedapplicationsbyshiftrolekey) + - [*listAcceptedApplicationsByBusinessForDay*](#listacceptedapplicationsbybusinessforday) + - [*listStaffsApplicationsByBusinessForDay*](#liststaffsapplicationsbybusinessforday) + - [*listCompletedApplicationsByStaffId*](#listcompletedapplicationsbystaffid) + - [*listAttireOptions*](#listattireoptions) + - [*getAttireOptionById*](#getattireoptionbyid) + - [*filterAttireOptions*](#filterattireoptions) + - [*listCustomRateCards*](#listcustomratecards) + - [*getCustomRateCardById*](#getcustomratecardbyid) + - [*listRoleCategories*](#listrolecategories) + - [*getRoleCategoryById*](#getrolecategorybyid) + - [*getRoleCategoriesByCategory*](#getrolecategoriesbycategory) + - [*listStaffAvailabilities*](#liststaffavailabilities) + - [*listStaffAvailabilitiesByStaffId*](#liststaffavailabilitiesbystaffid) + - [*getStaffAvailabilityByKey*](#getstaffavailabilitybykey) + - [*listStaffAvailabilitiesByDay*](#liststaffavailabilitiesbyday) + - [*listRecentPayments*](#listrecentpayments) + - [*getRecentPaymentById*](#getrecentpaymentbyid) + - [*listRecentPaymentsByStaffId*](#listrecentpaymentsbystaffid) + - [*listRecentPaymentsByApplicationId*](#listrecentpaymentsbyapplicationid) + - [*listRecentPaymentsByInvoiceId*](#listrecentpaymentsbyinvoiceid) + - [*listRecentPaymentsByStatus*](#listrecentpaymentsbystatus) + - [*listRecentPaymentsByInvoiceIds*](#listrecentpaymentsbyinvoiceids) + - [*listRecentPaymentsByBusinessId*](#listrecentpaymentsbybusinessid) + - [*listBusinesses*](#listbusinesses) + - [*getBusinessesByUserId*](#getbusinessesbyuserid) + - [*getBusinessById*](#getbusinessbyid) + - [*listConversations*](#listconversations) + - [*getConversationById*](#getconversationbyid) + - [*listConversationsByType*](#listconversationsbytype) + - [*listConversationsByStatus*](#listconversationsbystatus) + - [*filterConversations*](#filterconversations) + - [*listOrders*](#listorders) + - [*getOrderById*](#getorderbyid) + - [*getOrdersByBusinessId*](#getordersbybusinessid) + - [*getOrdersByVendorId*](#getordersbyvendorid) + - [*getOrdersByStatus*](#getordersbystatus) + - [*getOrdersByDateRange*](#getordersbydaterange) + - [*getRapidOrders*](#getrapidorders) + - [*listOrdersByBusinessAndTeamHub*](#listordersbybusinessandteamhub) + - [*listStaffRoles*](#liststaffroles) + - [*getStaffRoleByKey*](#getstaffrolebykey) + - [*listStaffRolesByStaffId*](#liststaffrolesbystaffid) + - [*listStaffRolesByRoleId*](#liststaffrolesbyroleid) + - [*filterStaffRoles*](#filterstaffroles) + - [*listTaskComments*](#listtaskcomments) + - [*getTaskCommentById*](#gettaskcommentbyid) + - [*getTaskCommentsByTaskId*](#gettaskcommentsbytaskid) + - [*listDocuments*](#listdocuments) + - [*getDocumentById*](#getdocumentbyid) + - [*filterDocuments*](#filterdocuments) + - [*listShiftsForCoverage*](#listshiftsforcoverage) + - [*listApplicationsForCoverage*](#listapplicationsforcoverage) + - [*listShiftsForDailyOpsByBusiness*](#listshiftsfordailyopsbybusiness) + - [*listShiftsForDailyOpsByVendor*](#listshiftsfordailyopsbyvendor) + - [*listApplicationsForDailyOps*](#listapplicationsfordailyops) + - [*listShiftsForForecastByBusiness*](#listshiftsforforecastbybusiness) + - [*listShiftsForForecastByVendor*](#listshiftsforforecastbyvendor) + - [*listShiftsForNoShowRangeByBusiness*](#listshiftsfornoshowrangebybusiness) + - [*listShiftsForNoShowRangeByVendor*](#listshiftsfornoshowrangebyvendor) + - [*listApplicationsForNoShowRange*](#listapplicationsfornoshowrange) + - [*listStaffForNoShowReport*](#liststafffornoshowreport) + - [*listInvoicesForSpendByBusiness*](#listinvoicesforspendbybusiness) + - [*listInvoicesForSpendByVendor*](#listinvoicesforspendbyvendor) + - [*listInvoicesForSpendByOrder*](#listinvoicesforspendbyorder) + - [*listTimesheetsForSpend*](#listtimesheetsforspend) + - [*listShiftsForPerformanceByBusiness*](#listshiftsforperformancebybusiness) + - [*listShiftsForPerformanceByVendor*](#listshiftsforperformancebyvendor) + - [*listApplicationsForPerformance*](#listapplicationsforperformance) + - [*listStaffForPerformance*](#liststaffforperformance) + - [*listRoles*](#listroles) + - [*getRoleById*](#getrolebyid) + - [*listRolesByVendorId*](#listrolesbyvendorid) + - [*listRolesByroleCategoryId*](#listrolesbyrolecategoryid) + - [*getShiftRoleById*](#getshiftrolebyid) + - [*listShiftRolesByShiftId*](#listshiftrolesbyshiftid) + - [*listShiftRolesByRoleId*](#listshiftrolesbyroleid) + - [*listShiftRolesByShiftIdAndTimeRange*](#listshiftrolesbyshiftidandtimerange) + - [*listShiftRolesByVendorId*](#listshiftrolesbyvendorid) + - [*listShiftRolesByBusinessAndDateRange*](#listshiftrolesbybusinessanddaterange) + - [*listShiftRolesByBusinessAndOrder*](#listshiftrolesbybusinessandorder) + - [*listShiftRolesByBusinessDateRangeCompletedOrders*](#listshiftrolesbybusinessdaterangecompletedorders) + - [*listShiftRolesByBusinessAndDatesSummary*](#listshiftrolesbybusinessanddatessummary) + - [*getCompletedShiftsByBusinessId*](#getcompletedshiftsbybusinessid) + - [*listTaxForms*](#listtaxforms) + - [*getTaxFormById*](#gettaxformbyid) + - [*getTaxFormsByStaffId*](#gettaxformsbystaffid) + - [*listTaxFormsWhere*](#listtaxformswhere) + - [*listFaqDatas*](#listfaqdatas) + - [*getFaqDataById*](#getfaqdatabyid) + - [*filterFaqDatas*](#filterfaqdatas) + - [*getStaffCourseById*](#getstaffcoursebyid) + - [*listStaffCoursesByStaffId*](#liststaffcoursesbystaffid) + - [*listStaffCoursesByCourseId*](#liststaffcoursesbycourseid) + - [*getStaffCourseByStaffAndCourse*](#getstaffcoursebystaffandcourse) + - [*listActivityLogs*](#listactivitylogs) + - [*getActivityLogById*](#getactivitylogbyid) + - [*listActivityLogsByUserId*](#listactivitylogsbyuserid) + - [*listUnreadActivityLogsByUserId*](#listunreadactivitylogsbyuserid) + - [*filterActivityLogs*](#filteractivitylogs) + - [*listBenefitsData*](#listbenefitsdata) + - [*getBenefitsDataByKey*](#getbenefitsdatabykey) + - [*listBenefitsDataByStaffId*](#listbenefitsdatabystaffid) + - [*listBenefitsDataByVendorBenefitPlanId*](#listbenefitsdatabyvendorbenefitplanid) + - [*listBenefitsDataByVendorBenefitPlanIds*](#listbenefitsdatabyvendorbenefitplanids) + - [*listStaff*](#liststaff) + - [*getStaffById*](#getstaffbyid) + - [*getStaffByUserId*](#getstaffbyuserid) + - [*filterStaff*](#filterstaff) + - [*listTasks*](#listtasks) + - [*getTaskById*](#gettaskbyid) + - [*getTasksByOwnerId*](#gettasksbyownerid) + - [*filterTasks*](#filtertasks) + - [*listTeamHubs*](#listteamhubs) + - [*getTeamHubById*](#getteamhubbyid) + - [*getTeamHubsByTeamId*](#getteamhubsbyteamid) + - [*listTeamHubsByOwnerId*](#listteamhubsbyownerid) + - [*listClientFeedbacks*](#listclientfeedbacks) + - [*getClientFeedbackById*](#getclientfeedbackbyid) + - [*listClientFeedbacksByBusinessId*](#listclientfeedbacksbybusinessid) + - [*listClientFeedbacksByVendorId*](#listclientfeedbacksbyvendorid) + - [*listClientFeedbacksByBusinessAndVendor*](#listclientfeedbacksbybusinessandvendor) + - [*filterClientFeedbacks*](#filterclientfeedbacks) + - [*listClientFeedbackRatingsByVendorId*](#listclientfeedbackratingsbyvendorid) + - [*listUsers*](#listusers) + - [*getUserById*](#getuserbyid) + - [*filterUsers*](#filterusers) + - [*getVendorById*](#getvendorbyid) + - [*getVendorByUserId*](#getvendorbyuserid) + - [*listVendors*](#listvendors) + - [*listCategories*](#listcategories) + - [*getCategoryById*](#getcategorybyid) + - [*filterCategories*](#filtercategories) + - [*listMessages*](#listmessages) + - [*getMessageById*](#getmessagebyid) + - [*getMessagesByConversationId*](#getmessagesbyconversationid) + - [*listUserConversations*](#listuserconversations) + - [*getUserConversationByKey*](#getuserconversationbykey) + - [*listUserConversationsByUserId*](#listuserconversationsbyuserid) + - [*listUnreadUserConversationsByUserId*](#listunreaduserconversationsbyuserid) + - [*listUserConversationsByConversationId*](#listuserconversationsbyconversationid) + - [*filterUserConversations*](#filteruserconversations) + - [*listHubs*](#listhubs) + - [*getHubById*](#gethubbyid) + - [*getHubsByOwnerId*](#gethubsbyownerid) + - [*filterHubs*](#filterhubs) + - [*listInvoices*](#listinvoices) + - [*getInvoiceById*](#getinvoicebyid) + - [*listInvoicesByVendorId*](#listinvoicesbyvendorid) + - [*listInvoicesByBusinessId*](#listinvoicesbybusinessid) + - [*listInvoicesByOrderId*](#listinvoicesbyorderid) + - [*listInvoicesByStatus*](#listinvoicesbystatus) + - [*filterInvoices*](#filterinvoices) + - [*listOverdueInvoices*](#listoverdueinvoices) + - [*listCourses*](#listcourses) + - [*getCourseById*](#getcoursebyid) + - [*filterCourses*](#filtercourses) + - [*listVendorRates*](#listvendorrates) + - [*getVendorRateById*](#getvendorratebyid) + - [*getWorkforceById*](#getworkforcebyid) + - [*getWorkforceByVendorAndStaff*](#getworkforcebyvendorandstaff) + - [*listWorkforceByVendorId*](#listworkforcebyvendorid) + - [*listWorkforceByStaffId*](#listworkforcebystaffid) + - [*getWorkforceByVendorAndNumber*](#getworkforcebyvendorandnumber) + - [*listStaffAvailabilityStats*](#liststaffavailabilitystats) + - [*getStaffAvailabilityStatsByStaffId*](#getstaffavailabilitystatsbystaffid) + - [*filterStaffAvailabilityStats*](#filterstaffavailabilitystats) + - [*listTeamHudDepartments*](#listteamhuddepartments) + - [*getTeamHudDepartmentById*](#getteamhuddepartmentbyid) + - [*listTeamHudDepartmentsByTeamHubId*](#listteamhuddepartmentsbyteamhubid) + - [*listLevels*](#listlevels) + - [*getLevelById*](#getlevelbyid) + - [*filterLevels*](#filterlevels) + - [*listTeams*](#listteams) + - [*getTeamById*](#getteambyid) + - [*getTeamsByOwnerId*](#getteamsbyownerid) + - [*listTeamMembers*](#listteammembers) + - [*getTeamMemberById*](#getteammemberbyid) + - [*getTeamMembersByTeamId*](#getteammembersbyteamid) + - [*listVendorBenefitPlans*](#listvendorbenefitplans) + - [*getVendorBenefitPlanById*](#getvendorbenefitplanbyid) + - [*listVendorBenefitPlansByVendorId*](#listvendorbenefitplansbyvendorid) + - [*listActiveVendorBenefitPlansByVendorId*](#listactivevendorbenefitplansbyvendorid) + - [*filterVendorBenefitPlans*](#filtervendorbenefitplans) +- [**Mutations**](#mutations) + - [*createBenefitsData*](#createbenefitsdata) + - [*updateBenefitsData*](#updatebenefitsdata) + - [*deleteBenefitsData*](#deletebenefitsdata) + - [*createStaffDocument*](#createstaffdocument) + - [*updateStaffDocument*](#updatestaffdocument) + - [*deleteStaffDocument*](#deletestaffdocument) + - [*createTeamHudDepartment*](#createteamhuddepartment) + - [*updateTeamHudDepartment*](#updateteamhuddepartment) + - [*deleteTeamHudDepartment*](#deleteteamhuddepartment) + - [*createMemberTask*](#createmembertask) + - [*deleteMemberTask*](#deletemembertask) + - [*createTeam*](#createteam) + - [*updateTeam*](#updateteam) + - [*deleteTeam*](#deleteteam) + - [*createUserConversation*](#createuserconversation) + - [*updateUserConversation*](#updateuserconversation) + - [*markConversationAsRead*](#markconversationasread) + - [*incrementUnreadForUser*](#incrementunreadforuser) + - [*deleteUserConversation*](#deleteuserconversation) + - [*createAttireOption*](#createattireoption) + - [*updateAttireOption*](#updateattireoption) + - [*deleteAttireOption*](#deleteattireoption) + - [*createCourse*](#createcourse) + - [*updateCourse*](#updatecourse) + - [*deleteCourse*](#deletecourse) + - [*createEmergencyContact*](#createemergencycontact) + - [*updateEmergencyContact*](#updateemergencycontact) + - [*deleteEmergencyContact*](#deleteemergencycontact) + - [*createStaffCourse*](#createstaffcourse) + - [*updateStaffCourse*](#updatestaffcourse) + - [*deleteStaffCourse*](#deletestaffcourse) + - [*createTask*](#createtask) + - [*updateTask*](#updatetask) + - [*deleteTask*](#deletetask) + - [*CreateCertificate*](#createcertificate) + - [*UpdateCertificate*](#updatecertificate) + - [*DeleteCertificate*](#deletecertificate) + - [*createRole*](#createrole) + - [*updateRole*](#updaterole) + - [*deleteRole*](#deleterole) + - [*createClientFeedback*](#createclientfeedback) + - [*updateClientFeedback*](#updateclientfeedback) + - [*deleteClientFeedback*](#deleteclientfeedback) + - [*createBusiness*](#createbusiness) + - [*updateBusiness*](#updatebusiness) + - [*deleteBusiness*](#deletebusiness) + - [*createConversation*](#createconversation) + - [*updateConversation*](#updateconversation) + - [*updateConversationLastMessage*](#updateconversationlastmessage) + - [*deleteConversation*](#deleteconversation) + - [*createCustomRateCard*](#createcustomratecard) + - [*updateCustomRateCard*](#updatecustomratecard) + - [*deleteCustomRateCard*](#deletecustomratecard) + - [*createRecentPayment*](#createrecentpayment) + - [*updateRecentPayment*](#updaterecentpayment) + - [*deleteRecentPayment*](#deleterecentpayment) + - [*CreateUser*](#createuser) + - [*UpdateUser*](#updateuser) + - [*DeleteUser*](#deleteuser) + - [*createVendor*](#createvendor) + - [*updateVendor*](#updatevendor) + - [*deleteVendor*](#deletevendor) + - [*createDocument*](#createdocument) + - [*updateDocument*](#updatedocument) + - [*deleteDocument*](#deletedocument) + - [*createTaskComment*](#createtaskcomment) + - [*updateTaskComment*](#updatetaskcomment) + - [*deleteTaskComment*](#deletetaskcomment) + - [*createVendorBenefitPlan*](#createvendorbenefitplan) + - [*updateVendorBenefitPlan*](#updatevendorbenefitplan) + - [*deleteVendorBenefitPlan*](#deletevendorbenefitplan) + - [*createMessage*](#createmessage) + - [*updateMessage*](#updatemessage) + - [*deleteMessage*](#deletemessage) + - [*createWorkforce*](#createworkforce) + - [*updateWorkforce*](#updateworkforce) + - [*deactivateWorkforce*](#deactivateworkforce) + - [*createFaqData*](#createfaqdata) + - [*updateFaqData*](#updatefaqdata) + - [*deleteFaqData*](#deletefaqdata) + - [*createInvoice*](#createinvoice) + - [*updateInvoice*](#updateinvoice) + - [*deleteInvoice*](#deleteinvoice) + - [*createTeamHub*](#createteamhub) + - [*updateTeamHub*](#updateteamhub) + - [*deleteTeamHub*](#deleteteamhub) + - [*createHub*](#createhub) + - [*updateHub*](#updatehub) + - [*deleteHub*](#deletehub) + - [*createRoleCategory*](#createrolecategory) + - [*updateRoleCategory*](#updaterolecategory) + - [*deleteRoleCategory*](#deleterolecategory) + - [*createStaffAvailabilityStats*](#createstaffavailabilitystats) + - [*updateStaffAvailabilityStats*](#updatestaffavailabilitystats) + - [*deleteStaffAvailabilityStats*](#deletestaffavailabilitystats) + - [*createShiftRole*](#createshiftrole) + - [*updateShiftRole*](#updateshiftrole) + - [*deleteShiftRole*](#deleteshiftrole) + - [*createStaffRole*](#createstaffrole) + - [*deleteStaffRole*](#deletestaffrole) + - [*createAccount*](#createaccount) + - [*updateAccount*](#updateaccount) + - [*deleteAccount*](#deleteaccount) + - [*createApplication*](#createapplication) + - [*updateApplicationStatus*](#updateapplicationstatus) + - [*deleteApplication*](#deleteapplication) + - [*CreateAssignment*](#createassignment) + - [*UpdateAssignment*](#updateassignment) + - [*DeleteAssignment*](#deleteassignment) + - [*createInvoiceTemplate*](#createinvoicetemplate) + - [*updateInvoiceTemplate*](#updateinvoicetemplate) + - [*deleteInvoiceTemplate*](#deleteinvoicetemplate) + - [*createStaffAvailability*](#createstaffavailability) + - [*updateStaffAvailability*](#updatestaffavailability) + - [*deleteStaffAvailability*](#deletestaffavailability) + - [*createTeamMember*](#createteammember) + - [*updateTeamMember*](#updateteammember) + - [*updateTeamMemberInviteStatus*](#updateteammemberinvitestatus) + - [*acceptInviteByCode*](#acceptinvitebycode) + - [*cancelInviteByCode*](#cancelinvitebycode) + - [*deleteTeamMember*](#deleteteammember) + - [*createLevel*](#createlevel) + - [*updateLevel*](#updatelevel) + - [*deleteLevel*](#deletelevel) + - [*createOrder*](#createorder) + - [*updateOrder*](#updateorder) + - [*deleteOrder*](#deleteorder) + - [*createCategory*](#createcategory) + - [*updateCategory*](#updatecategory) + - [*deleteCategory*](#deletecategory) + - [*createTaxForm*](#createtaxform) + - [*updateTaxForm*](#updatetaxform) + - [*deleteTaxForm*](#deletetaxform) + - [*createVendorRate*](#createvendorrate) + - [*updateVendorRate*](#updatevendorrate) + - [*deleteVendorRate*](#deletevendorrate) + - [*createActivityLog*](#createactivitylog) + - [*updateActivityLog*](#updateactivitylog) + - [*markActivityLogAsRead*](#markactivitylogasread) + - [*markActivityLogsAsRead*](#markactivitylogsasread) + - [*deleteActivityLog*](#deleteactivitylog) + - [*createShift*](#createshift) + - [*updateShift*](#updateshift) + - [*deleteShift*](#deleteshift) + - [*CreateStaff*](#createstaff) + - [*UpdateStaff*](#updatestaff) + - [*DeleteStaff*](#deletestaff) + +# TanStack Query Firebase & TanStack React Query +This SDK provides [React](https://react.dev/) hooks generated specific to your application, for the operations found in the connector `example`. These hooks are generated using [TanStack Query Firebase](https://react-query-firebase.invertase.dev/) by our partners at Invertase, a library built on top of [TanStack React Query v5](https://tanstack.com/query/v5/docs/framework/react/overview). + +***You do not need to be familiar with Tanstack Query or Tanstack Query Firebase to use this SDK.*** However, you may find it useful to learn more about them, as they will empower you as a user of this Generated React SDK. + +## Installing TanStack Query Firebase and TanStack React Query Packages +In order to use the React generated SDK, you must install the `TanStack React Query` and `TanStack Query Firebase` packages. +```bash +npm i --save @tanstack/react-query @tanstack-query-firebase/react +``` +```bash +npm i --save firebase@latest # Note: React has a peer dependency on ^11.3.0 +``` + +You can also follow the installation instructions from the [Data Connect documentation](https://firebase.google.com/docs/data-connect/web-sdk#tanstack-install), or the [TanStack Query Firebase documentation](https://react-query-firebase.invertase.dev/react) and [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/installation). + +## Configuring TanStack Query +In order to use the React generated SDK in your application, you must wrap your application's component tree in a `QueryClientProvider` component from TanStack React Query. None of your generated React SDK hooks will work without this provider. + +```javascript +import { QueryClientProvider } from '@tanstack/react-query'; + +// Create a TanStack Query client instance +const queryClient = new QueryClient() + +function App() { + return ( + // Provide the client to your App + + + + ) +} +``` + +To learn more about `QueryClientProvider`, see the [TanStack React Query documentation](https://tanstack.com/query/latest/docs/framework/react/quick-start) and the [TanStack Query Firebase documentation](https://invertase.docs.page/tanstack-query-firebase/react#usage). + +# Accessing the connector +A connector is a collection of Queries and Mutations. One SDK is generated for each connector - this SDK is generated for the connector `example`. + +You can find more information about connectors in the [Data Connect documentation](https://firebase.google.com/docs/data-connect#how-does). + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; + +const dataConnect = getDataConnect(connectorConfig); +``` + +## Connecting to the local Emulator +By default, the connector will connect to the production service. + +To connect to the emulator, you can use the following code. +You can also follow the emulator instructions from the [Data Connect documentation](https://firebase.google.com/docs/data-connect/web-sdk#emulator-react-angular). + +```javascript +import { connectDataConnectEmulator, getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; + +const dataConnect = getDataConnect(connectorConfig); +connectDataConnectEmulator(dataConnect, 'localhost', 9399); +``` + +After it's initialized, you can call your Data Connect [queries](#queries) and [mutations](#mutations) using the hooks provided from your generated React SDK. + +# Queries + +The React generated SDK provides Query hook functions that call and return [`useDataConnectQuery`](https://react-query-firebase.invertase.dev/react/data-connect/querying) hooks from TanStack Query Firebase. + +Calling these hook functions will return a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and the most recent data returned by the Query, among other things. To learn more about these hooks and how to use them, see the [TanStack Query Firebase documentation](https://react-query-firebase.invertase.dev/react/data-connect/querying). + +TanStack React Query caches the results of your Queries, so using the same Query hook function in multiple places in your application allows the entire application to automatically see updates to that Query's data. + +Query hooks execute their Queries automatically when called, and periodically refresh, unless you change the `queryOptions` for the Query. To learn how to stop a Query from automatically executing, including how to make a query "lazy", see the [TanStack React Query documentation](https://tanstack.com/query/latest/docs/framework/react/guides/disabling-queries). + +To learn more about TanStack React Query's Queries, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/guides/queries). + +## Using Query Hooks +Here's a general overview of how to use the generated Query hooks in your code: + +- If the Query has no variables, the Query hook function does not require arguments. +- If the Query has any required variables, the Query hook function will require at least one argument: an object that contains all the required variables for the Query. +- If the Query has some required and some optional variables, only required variables are necessary in the variables argument object, and optional variables may be provided as well. +- If all of the Query's variables are optional, the Query hook function does not require any arguments. +- Query hook functions can be called with or without passing in a `DataConnect` instance as an argument. If no `DataConnect` argument is passed in, then the generated SDK will call `getDataConnect(connectorConfig)` behind the scenes for you. +- Query hooks functions can be called with or without passing in an `options` argument of type `useDataConnectQueryOptions`. To learn more about the `options` argument, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/guides/query-options). + - ***Special case:*** If the Query has all optional variables and you would like to provide an `options` argument to the Query hook function without providing any variables, you must pass `undefined` where you would normally pass the Query's variables, and then may provide the `options` argument. + +Below are examples of how to use the `example` connector's generated Query hook functions to execute each Query. You can also follow the examples from the [Data Connect documentation](https://firebase.google.com/docs/data-connect/web-sdk#operations-react-angular). + +## listShifts +You can execute the `listShifts` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShifts(dc: DataConnect, vars?: ListShiftsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShifts(vars?: ListShiftsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShifts` Query has an optional argument of type `ListShiftsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listShifts` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShifts` Query is of type `ListShiftsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftsData { + shifts: ({ + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShifts`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftsVariables } from '@dataconnect/generated'; +import { useListShifts } from '@dataconnect/generated/react' + +export default function ListShiftsComponent() { + // The `useListShifts` Query hook has an optional argument of type `ListShiftsVariables`: + const listShiftsVars: ListShiftsVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShifts(listShiftsVars); + // Variables can be defined inline as well. + const query = useListShifts({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListShiftsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListShifts(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShifts(dataConnect, listShiftsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShifts(listShiftsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListShifts(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShifts(dataConnect, listShiftsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getShiftById +You can execute the `getShiftById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetShiftById(dc: DataConnect, vars: GetShiftByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetShiftById(vars: GetShiftByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getShiftById` Query requires an argument of type `GetShiftByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetShiftByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getShiftById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getShiftById` Query is of type `GetShiftByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetShiftByIdData { + shift?: { + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getShiftById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetShiftByIdVariables } from '@dataconnect/generated'; +import { useGetShiftById } from '@dataconnect/generated/react' + +export default function GetShiftByIdComponent() { + // The `useGetShiftById` Query hook requires an argument of type `GetShiftByIdVariables`: + const getShiftByIdVars: GetShiftByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetShiftById(getShiftByIdVars); + // Variables can be defined inline as well. + const query = useGetShiftById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetShiftById(dataConnect, getShiftByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetShiftById(getShiftByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetShiftById(dataConnect, getShiftByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shift); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterShifts +You can execute the `filterShifts` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterShifts(dc: DataConnect, vars?: FilterShiftsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterShifts(vars?: FilterShiftsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterShifts` Query has an optional argument of type `FilterShiftsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterShiftsVariables { + status?: ShiftStatus | null; + orderId?: UUIDString | null; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `filterShifts` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterShifts` Query is of type `FilterShiftsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterShiftsData { + shifts: ({ + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterShifts`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterShiftsVariables } from '@dataconnect/generated'; +import { useFilterShifts } from '@dataconnect/generated/react' + +export default function FilterShiftsComponent() { + // The `useFilterShifts` Query hook has an optional argument of type `FilterShiftsVariables`: + const filterShiftsVars: FilterShiftsVariables = { + status: ..., // optional + orderId: ..., // optional + dateFrom: ..., // optional + dateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterShifts(filterShiftsVars); + // Variables can be defined inline as well. + const query = useFilterShifts({ status: ..., orderId: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterShiftsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterShifts(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterShifts(dataConnect, filterShiftsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterShifts(filterShiftsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterShifts(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterShifts(dataConnect, filterShiftsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getShiftsByBusinessId +You can execute the `getShiftsByBusinessId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetShiftsByBusinessId(dc: DataConnect, vars: GetShiftsByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetShiftsByBusinessId(vars: GetShiftsByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getShiftsByBusinessId` Query requires an argument of type `GetShiftsByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetShiftsByBusinessIdVariables { + businessId: UUIDString; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `getShiftsByBusinessId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getShiftsByBusinessId` Query is of type `GetShiftsByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetShiftsByBusinessIdData { + shifts: ({ + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getShiftsByBusinessId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetShiftsByBusinessIdVariables } from '@dataconnect/generated'; +import { useGetShiftsByBusinessId } from '@dataconnect/generated/react' + +export default function GetShiftsByBusinessIdComponent() { + // The `useGetShiftsByBusinessId` Query hook requires an argument of type `GetShiftsByBusinessIdVariables`: + const getShiftsByBusinessIdVars: GetShiftsByBusinessIdVariables = { + businessId: ..., + dateFrom: ..., // optional + dateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetShiftsByBusinessId(getShiftsByBusinessIdVars); + // Variables can be defined inline as well. + const query = useGetShiftsByBusinessId({ businessId: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetShiftsByBusinessId(dataConnect, getShiftsByBusinessIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetShiftsByBusinessId(getShiftsByBusinessIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetShiftsByBusinessId(dataConnect, getShiftsByBusinessIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getShiftsByVendorId +You can execute the `getShiftsByVendorId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetShiftsByVendorId(dc: DataConnect, vars: GetShiftsByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetShiftsByVendorId(vars: GetShiftsByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getShiftsByVendorId` Query requires an argument of type `GetShiftsByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetShiftsByVendorIdVariables { + vendorId: UUIDString; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `getShiftsByVendorId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getShiftsByVendorId` Query is of type `GetShiftsByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetShiftsByVendorIdData { + shifts: ({ + id: UUIDString; + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + businessId: UUIDString; + vendorId?: UUIDString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getShiftsByVendorId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetShiftsByVendorIdVariables } from '@dataconnect/generated'; +import { useGetShiftsByVendorId } from '@dataconnect/generated/react' + +export default function GetShiftsByVendorIdComponent() { + // The `useGetShiftsByVendorId` Query hook requires an argument of type `GetShiftsByVendorIdVariables`: + const getShiftsByVendorIdVars: GetShiftsByVendorIdVariables = { + vendorId: ..., + dateFrom: ..., // optional + dateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetShiftsByVendorId(getShiftsByVendorIdVars); + // Variables can be defined inline as well. + const query = useGetShiftsByVendorId({ vendorId: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetShiftsByVendorId(dataConnect, getShiftsByVendorIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetShiftsByVendorId(getShiftsByVendorIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetShiftsByVendorId(dataConnect, getShiftsByVendorIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listEmergencyContacts +You can execute the `listEmergencyContacts` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListEmergencyContacts(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListEmergencyContacts(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listEmergencyContacts` Query has no variables. +### Return Type +Recall that calling the `listEmergencyContacts` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listEmergencyContacts` Query is of type `ListEmergencyContactsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListEmergencyContactsData { + emergencyContacts: ({ + id: UUIDString; + name: string; + phone: string; + relationship: RelationshipType; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & EmergencyContact_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listEmergencyContacts`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListEmergencyContacts } from '@dataconnect/generated/react' + +export default function ListEmergencyContactsComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListEmergencyContacts(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListEmergencyContacts(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListEmergencyContacts(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListEmergencyContacts(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.emergencyContacts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getEmergencyContactById +You can execute the `getEmergencyContactById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetEmergencyContactById(dc: DataConnect, vars: GetEmergencyContactByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetEmergencyContactById(vars: GetEmergencyContactByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getEmergencyContactById` Query requires an argument of type `GetEmergencyContactByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetEmergencyContactByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getEmergencyContactById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getEmergencyContactById` Query is of type `GetEmergencyContactByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetEmergencyContactByIdData { + emergencyContact?: { + id: UUIDString; + name: string; + phone: string; + relationship: RelationshipType; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & EmergencyContact_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getEmergencyContactById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetEmergencyContactByIdVariables } from '@dataconnect/generated'; +import { useGetEmergencyContactById } from '@dataconnect/generated/react' + +export default function GetEmergencyContactByIdComponent() { + // The `useGetEmergencyContactById` Query hook requires an argument of type `GetEmergencyContactByIdVariables`: + const getEmergencyContactByIdVars: GetEmergencyContactByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetEmergencyContactById(getEmergencyContactByIdVars); + // Variables can be defined inline as well. + const query = useGetEmergencyContactById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetEmergencyContactById(dataConnect, getEmergencyContactByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetEmergencyContactById(getEmergencyContactByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetEmergencyContactById(dataConnect, getEmergencyContactByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.emergencyContact); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getEmergencyContactsByStaffId +You can execute the `getEmergencyContactsByStaffId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetEmergencyContactsByStaffId(dc: DataConnect, vars: GetEmergencyContactsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetEmergencyContactsByStaffId(vars: GetEmergencyContactsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getEmergencyContactsByStaffId` Query requires an argument of type `GetEmergencyContactsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetEmergencyContactsByStaffIdVariables { + staffId: UUIDString; +} +``` +### Return Type +Recall that calling the `getEmergencyContactsByStaffId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getEmergencyContactsByStaffId` Query is of type `GetEmergencyContactsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetEmergencyContactsByStaffIdData { + emergencyContacts: ({ + id: UUIDString; + name: string; + phone: string; + relationship: RelationshipType; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & EmergencyContact_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getEmergencyContactsByStaffId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetEmergencyContactsByStaffIdVariables } from '@dataconnect/generated'; +import { useGetEmergencyContactsByStaffId } from '@dataconnect/generated/react' + +export default function GetEmergencyContactsByStaffIdComponent() { + // The `useGetEmergencyContactsByStaffId` Query hook requires an argument of type `GetEmergencyContactsByStaffIdVariables`: + const getEmergencyContactsByStaffIdVars: GetEmergencyContactsByStaffIdVariables = { + staffId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetEmergencyContactsByStaffId(getEmergencyContactsByStaffIdVars); + // Variables can be defined inline as well. + const query = useGetEmergencyContactsByStaffId({ staffId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetEmergencyContactsByStaffId(dataConnect, getEmergencyContactsByStaffIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetEmergencyContactsByStaffId(getEmergencyContactsByStaffIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetEmergencyContactsByStaffId(dataConnect, getEmergencyContactsByStaffIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.emergencyContacts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getMyTasks +You can execute the `getMyTasks` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetMyTasks(dc: DataConnect, vars: GetMyTasksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetMyTasks(vars: GetMyTasksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getMyTasks` Query requires an argument of type `GetMyTasksVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetMyTasksVariables { + teamMemberId: UUIDString; +} +``` +### Return Type +Recall that calling the `getMyTasks` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getMyTasks` Query is of type `GetMyTasksData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetMyTasksData { + memberTasks: ({ + id: UUIDString; + task: { + id: UUIDString; + taskName: string; + description?: string | null; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + priority: TaskPriority; + } & Task_Key; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + })[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getMyTasks`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetMyTasksVariables } from '@dataconnect/generated'; +import { useGetMyTasks } from '@dataconnect/generated/react' + +export default function GetMyTasksComponent() { + // The `useGetMyTasks` Query hook requires an argument of type `GetMyTasksVariables`: + const getMyTasksVars: GetMyTasksVariables = { + teamMemberId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetMyTasks(getMyTasksVars); + // Variables can be defined inline as well. + const query = useGetMyTasks({ teamMemberId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetMyTasks(dataConnect, getMyTasksVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetMyTasks(getMyTasksVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetMyTasks(dataConnect, getMyTasksVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.memberTasks); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getMemberTaskByIdKey +You can execute the `getMemberTaskByIdKey` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetMemberTaskByIdKey(dc: DataConnect, vars: GetMemberTaskByIdKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetMemberTaskByIdKey(vars: GetMemberTaskByIdKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getMemberTaskByIdKey` Query requires an argument of type `GetMemberTaskByIdKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetMemberTaskByIdKeyVariables { + teamMemberId: UUIDString; + taskId: UUIDString; +} +``` +### Return Type +Recall that calling the `getMemberTaskByIdKey` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getMemberTaskByIdKey` Query is of type `GetMemberTaskByIdKeyData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetMemberTaskByIdKeyData { + memberTask?: { + id: UUIDString; + task: { + id: UUIDString; + taskName: string; + description?: string | null; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + priority: TaskPriority; + } & Task_Key; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + }; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getMemberTaskByIdKey`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetMemberTaskByIdKeyVariables } from '@dataconnect/generated'; +import { useGetMemberTaskByIdKey } from '@dataconnect/generated/react' + +export default function GetMemberTaskByIdKeyComponent() { + // The `useGetMemberTaskByIdKey` Query hook requires an argument of type `GetMemberTaskByIdKeyVariables`: + const getMemberTaskByIdKeyVars: GetMemberTaskByIdKeyVariables = { + teamMemberId: ..., + taskId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetMemberTaskByIdKey(getMemberTaskByIdKeyVars); + // Variables can be defined inline as well. + const query = useGetMemberTaskByIdKey({ teamMemberId: ..., taskId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetMemberTaskByIdKey(dataConnect, getMemberTaskByIdKeyVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetMemberTaskByIdKey(getMemberTaskByIdKeyVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetMemberTaskByIdKey(dataConnect, getMemberTaskByIdKeyVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.memberTask); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getMemberTasksByTaskId +You can execute the `getMemberTasksByTaskId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetMemberTasksByTaskId(dc: DataConnect, vars: GetMemberTasksByTaskIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetMemberTasksByTaskId(vars: GetMemberTasksByTaskIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getMemberTasksByTaskId` Query requires an argument of type `GetMemberTasksByTaskIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetMemberTasksByTaskIdVariables { + taskId: UUIDString; +} +``` +### Return Type +Recall that calling the `getMemberTasksByTaskId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getMemberTasksByTaskId` Query is of type `GetMemberTasksByTaskIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetMemberTasksByTaskIdData { + memberTasks: ({ + id: UUIDString; + task: { + id: UUIDString; + taskName: string; + description?: string | null; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + priority: TaskPriority; + } & Task_Key; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + })[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getMemberTasksByTaskId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetMemberTasksByTaskIdVariables } from '@dataconnect/generated'; +import { useGetMemberTasksByTaskId } from '@dataconnect/generated/react' + +export default function GetMemberTasksByTaskIdComponent() { + // The `useGetMemberTasksByTaskId` Query hook requires an argument of type `GetMemberTasksByTaskIdVariables`: + const getMemberTasksByTaskIdVars: GetMemberTasksByTaskIdVariables = { + taskId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetMemberTasksByTaskId(getMemberTasksByTaskIdVars); + // Variables can be defined inline as well. + const query = useGetMemberTasksByTaskId({ taskId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetMemberTasksByTaskId(dataConnect, getMemberTasksByTaskIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetMemberTasksByTaskId(getMemberTasksByTaskIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetMemberTasksByTaskId(dataConnect, getMemberTasksByTaskIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.memberTasks); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listCertificates +You can execute the `listCertificates` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListCertificates(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListCertificates(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listCertificates` Query has no variables. +### Return Type +Recall that calling the `listCertificates` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listCertificates` Query is of type `ListCertificatesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListCertificatesData { + certificates: ({ + id: UUIDString; + name: string; + description?: string | null; + expiry?: TimestampString | null; + status: CertificateStatus; + fileUrl?: string | null; + icon?: string | null; + staffId: UUIDString; + certificationType?: ComplianceType | null; + issuer?: string | null; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; + createdAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Certificate_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listCertificates`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListCertificates } from '@dataconnect/generated/react' + +export default function ListCertificatesComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListCertificates(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListCertificates(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListCertificates(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListCertificates(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.certificates); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getCertificateById +You can execute the `getCertificateById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetCertificateById(dc: DataConnect, vars: GetCertificateByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetCertificateById(vars: GetCertificateByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getCertificateById` Query requires an argument of type `GetCertificateByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetCertificateByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getCertificateById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getCertificateById` Query is of type `GetCertificateByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetCertificateByIdData { + certificate?: { + id: UUIDString; + name: string; + description?: string | null; + expiry?: TimestampString | null; + status: CertificateStatus; + fileUrl?: string | null; + icon?: string | null; + certificationType?: ComplianceType | null; + issuer?: string | null; + staffId: UUIDString; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; + updatedAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Certificate_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getCertificateById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetCertificateByIdVariables } from '@dataconnect/generated'; +import { useGetCertificateById } from '@dataconnect/generated/react' + +export default function GetCertificateByIdComponent() { + // The `useGetCertificateById` Query hook requires an argument of type `GetCertificateByIdVariables`: + const getCertificateByIdVars: GetCertificateByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetCertificateById(getCertificateByIdVars); + // Variables can be defined inline as well. + const query = useGetCertificateById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetCertificateById(dataConnect, getCertificateByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetCertificateById(getCertificateByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetCertificateById(dataConnect, getCertificateByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.certificate); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listCertificatesByStaffId +You can execute the `listCertificatesByStaffId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListCertificatesByStaffId(dc: DataConnect, vars: ListCertificatesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListCertificatesByStaffId(vars: ListCertificatesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listCertificatesByStaffId` Query requires an argument of type `ListCertificatesByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListCertificatesByStaffIdVariables { + staffId: UUIDString; +} +``` +### Return Type +Recall that calling the `listCertificatesByStaffId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listCertificatesByStaffId` Query is of type `ListCertificatesByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListCertificatesByStaffIdData { + certificates: ({ + id: UUIDString; + name: string; + description?: string | null; + expiry?: TimestampString | null; + status: CertificateStatus; + fileUrl?: string | null; + icon?: string | null; + staffId: UUIDString; + certificationType?: ComplianceType | null; + issuer?: string | null; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; + createdAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Certificate_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listCertificatesByStaffId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListCertificatesByStaffIdVariables } from '@dataconnect/generated'; +import { useListCertificatesByStaffId } from '@dataconnect/generated/react' + +export default function ListCertificatesByStaffIdComponent() { + // The `useListCertificatesByStaffId` Query hook requires an argument of type `ListCertificatesByStaffIdVariables`: + const listCertificatesByStaffIdVars: ListCertificatesByStaffIdVariables = { + staffId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListCertificatesByStaffId(listCertificatesByStaffIdVars); + // Variables can be defined inline as well. + const query = useListCertificatesByStaffId({ staffId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListCertificatesByStaffId(dataConnect, listCertificatesByStaffIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListCertificatesByStaffId(listCertificatesByStaffIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListCertificatesByStaffId(dataConnect, listCertificatesByStaffIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.certificates); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listAssignments +You can execute the `listAssignments` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListAssignments(dc: DataConnect, vars?: ListAssignmentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListAssignments(vars?: ListAssignmentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listAssignments` Query has an optional argument of type `ListAssignmentsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListAssignmentsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listAssignments` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listAssignments` Query is of type `ListAssignmentsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListAssignmentsData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + }; + } & Assignment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listAssignments`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListAssignmentsVariables } from '@dataconnect/generated'; +import { useListAssignments } from '@dataconnect/generated/react' + +export default function ListAssignmentsComponent() { + // The `useListAssignments` Query hook has an optional argument of type `ListAssignmentsVariables`: + const listAssignmentsVars: ListAssignmentsVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListAssignments(listAssignmentsVars); + // Variables can be defined inline as well. + const query = useListAssignments({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListAssignmentsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListAssignments(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListAssignments(dataConnect, listAssignmentsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListAssignments(listAssignmentsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListAssignments(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListAssignments(dataConnect, listAssignmentsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.assignments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getAssignmentById +You can execute the `getAssignmentById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetAssignmentById(dc: DataConnect, vars: GetAssignmentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetAssignmentById(vars: GetAssignmentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getAssignmentById` Query requires an argument of type `GetAssignmentByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetAssignmentByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getAssignmentById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getAssignmentById` Query is of type `GetAssignmentByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetAssignmentByIdData { + assignment?: { + id: UUIDString; + title?: string | null; + description?: string | null; + instructions?: string | null; + status?: AssignmentStatus | null; + tipsAvailable?: boolean | null; + travelTime?: boolean | null; + mealProvided?: boolean | null; + parkingAvailable?: boolean | null; + gasCompensation?: boolean | null; + managers?: unknown[] | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + workforce: { + id: UUIDString; + workforceNumber: string; + status?: WorkforceStatus | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + breakType?: BreakDuration | null; + uniform?: string | null; + department?: string | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + status?: ShiftStatus | null; + managers?: unknown[] | null; + order: { + id: UUIDString; + eventName?: string | null; + orderType: OrderType; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + }; + } & Assignment_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getAssignmentById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetAssignmentByIdVariables } from '@dataconnect/generated'; +import { useGetAssignmentById } from '@dataconnect/generated/react' + +export default function GetAssignmentByIdComponent() { + // The `useGetAssignmentById` Query hook requires an argument of type `GetAssignmentByIdVariables`: + const getAssignmentByIdVars: GetAssignmentByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetAssignmentById(getAssignmentByIdVars); + // Variables can be defined inline as well. + const query = useGetAssignmentById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetAssignmentById(dataConnect, getAssignmentByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetAssignmentById(getAssignmentByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetAssignmentById(dataConnect, getAssignmentByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.assignment); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listAssignmentsByWorkforceId +You can execute the `listAssignmentsByWorkforceId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListAssignmentsByWorkforceId(dc: DataConnect, vars: ListAssignmentsByWorkforceIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListAssignmentsByWorkforceId(vars: ListAssignmentsByWorkforceIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listAssignmentsByWorkforceId` Query requires an argument of type `ListAssignmentsByWorkforceIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListAssignmentsByWorkforceIdVariables { + workforceId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listAssignmentsByWorkforceId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listAssignmentsByWorkforceId` Query is of type `ListAssignmentsByWorkforceIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListAssignmentsByWorkforceIdData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + }; + } & Assignment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listAssignmentsByWorkforceId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListAssignmentsByWorkforceIdVariables } from '@dataconnect/generated'; +import { useListAssignmentsByWorkforceId } from '@dataconnect/generated/react' + +export default function ListAssignmentsByWorkforceIdComponent() { + // The `useListAssignmentsByWorkforceId` Query hook requires an argument of type `ListAssignmentsByWorkforceIdVariables`: + const listAssignmentsByWorkforceIdVars: ListAssignmentsByWorkforceIdVariables = { + workforceId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListAssignmentsByWorkforceId(listAssignmentsByWorkforceIdVars); + // Variables can be defined inline as well. + const query = useListAssignmentsByWorkforceId({ workforceId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListAssignmentsByWorkforceId(dataConnect, listAssignmentsByWorkforceIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListAssignmentsByWorkforceId(listAssignmentsByWorkforceIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListAssignmentsByWorkforceId(dataConnect, listAssignmentsByWorkforceIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.assignments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listAssignmentsByWorkforceIds +You can execute the `listAssignmentsByWorkforceIds` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListAssignmentsByWorkforceIds(dc: DataConnect, vars: ListAssignmentsByWorkforceIdsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListAssignmentsByWorkforceIds(vars: ListAssignmentsByWorkforceIdsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listAssignmentsByWorkforceIds` Query requires an argument of type `ListAssignmentsByWorkforceIdsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListAssignmentsByWorkforceIdsVariables { + workforceIds: UUIDString[]; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listAssignmentsByWorkforceIds` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listAssignmentsByWorkforceIds` Query is of type `ListAssignmentsByWorkforceIdsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListAssignmentsByWorkforceIdsData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + role: { + id: UUIDString; + name: string; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + order: { + id: UUIDString; + eventName?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + }; + } & Assignment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listAssignmentsByWorkforceIds`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListAssignmentsByWorkforceIdsVariables } from '@dataconnect/generated'; +import { useListAssignmentsByWorkforceIds } from '@dataconnect/generated/react' + +export default function ListAssignmentsByWorkforceIdsComponent() { + // The `useListAssignmentsByWorkforceIds` Query hook requires an argument of type `ListAssignmentsByWorkforceIdsVariables`: + const listAssignmentsByWorkforceIdsVars: ListAssignmentsByWorkforceIdsVariables = { + workforceIds: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListAssignmentsByWorkforceIds(listAssignmentsByWorkforceIdsVars); + // Variables can be defined inline as well. + const query = useListAssignmentsByWorkforceIds({ workforceIds: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListAssignmentsByWorkforceIds(dataConnect, listAssignmentsByWorkforceIdsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListAssignmentsByWorkforceIds(listAssignmentsByWorkforceIdsVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListAssignmentsByWorkforceIds(dataConnect, listAssignmentsByWorkforceIdsVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.assignments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listAssignmentsByShiftRole +You can execute the `listAssignmentsByShiftRole` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListAssignmentsByShiftRole(dc: DataConnect, vars: ListAssignmentsByShiftRoleVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListAssignmentsByShiftRole(vars: ListAssignmentsByShiftRoleVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listAssignmentsByShiftRole` Query requires an argument of type `ListAssignmentsByShiftRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListAssignmentsByShiftRoleVariables { + shiftId: UUIDString; + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listAssignmentsByShiftRole` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listAssignmentsByShiftRole` Query is of type `ListAssignmentsByShiftRoleData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListAssignmentsByShiftRoleData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + } & Assignment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listAssignmentsByShiftRole`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListAssignmentsByShiftRoleVariables } from '@dataconnect/generated'; +import { useListAssignmentsByShiftRole } from '@dataconnect/generated/react' + +export default function ListAssignmentsByShiftRoleComponent() { + // The `useListAssignmentsByShiftRole` Query hook requires an argument of type `ListAssignmentsByShiftRoleVariables`: + const listAssignmentsByShiftRoleVars: ListAssignmentsByShiftRoleVariables = { + shiftId: ..., + roleId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListAssignmentsByShiftRole(listAssignmentsByShiftRoleVars); + // Variables can be defined inline as well. + const query = useListAssignmentsByShiftRole({ shiftId: ..., roleId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListAssignmentsByShiftRole(dataConnect, listAssignmentsByShiftRoleVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListAssignmentsByShiftRole(listAssignmentsByShiftRoleVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListAssignmentsByShiftRole(dataConnect, listAssignmentsByShiftRoleVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.assignments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterAssignments +You can execute the `filterAssignments` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterAssignments(dc: DataConnect, vars: FilterAssignmentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterAssignments(vars: FilterAssignmentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterAssignments` Query requires an argument of type `FilterAssignmentsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterAssignmentsVariables { + shiftIds: UUIDString[]; + roleIds: UUIDString[]; + status?: AssignmentStatus | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `filterAssignments` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterAssignments` Query is of type `FilterAssignmentsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterAssignmentsData { + assignments: ({ + id: UUIDString; + title?: string | null; + status?: AssignmentStatus | null; + createdAt?: TimestampString | null; + workforce: { + id: UUIDString; + workforceNumber: string; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key; + shiftRole: { + id: UUIDString; + role: { + id: UUIDString; + name: string; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + } & Shift_Key; + }; + } & Assignment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterAssignments`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterAssignmentsVariables } from '@dataconnect/generated'; +import { useFilterAssignments } from '@dataconnect/generated/react' + +export default function FilterAssignmentsComponent() { + // The `useFilterAssignments` Query hook requires an argument of type `FilterAssignmentsVariables`: + const filterAssignmentsVars: FilterAssignmentsVariables = { + shiftIds: ..., + roleIds: ..., + status: ..., // optional + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterAssignments(filterAssignmentsVars); + // Variables can be defined inline as well. + const query = useFilterAssignments({ shiftIds: ..., roleIds: ..., status: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterAssignments(dataConnect, filterAssignmentsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterAssignments(filterAssignmentsVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterAssignments(dataConnect, filterAssignmentsVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.assignments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listInvoiceTemplates +You can execute the `listInvoiceTemplates` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListInvoiceTemplates(dc: DataConnect, vars?: ListInvoiceTemplatesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListInvoiceTemplates(vars?: ListInvoiceTemplatesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listInvoiceTemplates` Query has an optional argument of type `ListInvoiceTemplatesVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListInvoiceTemplatesVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listInvoiceTemplates` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listInvoiceTemplates` Query is of type `ListInvoiceTemplatesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListInvoiceTemplatesData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listInvoiceTemplates`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListInvoiceTemplatesVariables } from '@dataconnect/generated'; +import { useListInvoiceTemplates } from '@dataconnect/generated/react' + +export default function ListInvoiceTemplatesComponent() { + // The `useListInvoiceTemplates` Query hook has an optional argument of type `ListInvoiceTemplatesVariables`: + const listInvoiceTemplatesVars: ListInvoiceTemplatesVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListInvoiceTemplates(listInvoiceTemplatesVars); + // Variables can be defined inline as well. + const query = useListInvoiceTemplates({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListInvoiceTemplatesVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListInvoiceTemplates(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListInvoiceTemplates(dataConnect, listInvoiceTemplatesVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListInvoiceTemplates(listInvoiceTemplatesVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListInvoiceTemplates(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListInvoiceTemplates(dataConnect, listInvoiceTemplatesVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoiceTemplates); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getInvoiceTemplateById +You can execute the `getInvoiceTemplateById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetInvoiceTemplateById(dc: DataConnect, vars: GetInvoiceTemplateByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetInvoiceTemplateById(vars: GetInvoiceTemplateByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getInvoiceTemplateById` Query requires an argument of type `GetInvoiceTemplateByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetInvoiceTemplateByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getInvoiceTemplateById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getInvoiceTemplateById` Query is of type `GetInvoiceTemplateByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetInvoiceTemplateByIdData { + invoiceTemplate?: { + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getInvoiceTemplateById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetInvoiceTemplateByIdVariables } from '@dataconnect/generated'; +import { useGetInvoiceTemplateById } from '@dataconnect/generated/react' + +export default function GetInvoiceTemplateByIdComponent() { + // The `useGetInvoiceTemplateById` Query hook requires an argument of type `GetInvoiceTemplateByIdVariables`: + const getInvoiceTemplateByIdVars: GetInvoiceTemplateByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetInvoiceTemplateById(getInvoiceTemplateByIdVars); + // Variables can be defined inline as well. + const query = useGetInvoiceTemplateById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetInvoiceTemplateById(dataConnect, getInvoiceTemplateByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetInvoiceTemplateById(getInvoiceTemplateByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetInvoiceTemplateById(dataConnect, getInvoiceTemplateByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoiceTemplate); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listInvoiceTemplatesByOwnerId +You can execute the `listInvoiceTemplatesByOwnerId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListInvoiceTemplatesByOwnerId(dc: DataConnect, vars: ListInvoiceTemplatesByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListInvoiceTemplatesByOwnerId(vars: ListInvoiceTemplatesByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listInvoiceTemplatesByOwnerId` Query requires an argument of type `ListInvoiceTemplatesByOwnerIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListInvoiceTemplatesByOwnerIdVariables { + ownerId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listInvoiceTemplatesByOwnerId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listInvoiceTemplatesByOwnerId` Query is of type `ListInvoiceTemplatesByOwnerIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListInvoiceTemplatesByOwnerIdData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listInvoiceTemplatesByOwnerId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListInvoiceTemplatesByOwnerIdVariables } from '@dataconnect/generated'; +import { useListInvoiceTemplatesByOwnerId } from '@dataconnect/generated/react' + +export default function ListInvoiceTemplatesByOwnerIdComponent() { + // The `useListInvoiceTemplatesByOwnerId` Query hook requires an argument of type `ListInvoiceTemplatesByOwnerIdVariables`: + const listInvoiceTemplatesByOwnerIdVars: ListInvoiceTemplatesByOwnerIdVariables = { + ownerId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListInvoiceTemplatesByOwnerId(listInvoiceTemplatesByOwnerIdVars); + // Variables can be defined inline as well. + const query = useListInvoiceTemplatesByOwnerId({ ownerId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListInvoiceTemplatesByOwnerId(dataConnect, listInvoiceTemplatesByOwnerIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListInvoiceTemplatesByOwnerId(listInvoiceTemplatesByOwnerIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListInvoiceTemplatesByOwnerId(dataConnect, listInvoiceTemplatesByOwnerIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoiceTemplates); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listInvoiceTemplatesByVendorId +You can execute the `listInvoiceTemplatesByVendorId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListInvoiceTemplatesByVendorId(dc: DataConnect, vars: ListInvoiceTemplatesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListInvoiceTemplatesByVendorId(vars: ListInvoiceTemplatesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listInvoiceTemplatesByVendorId` Query requires an argument of type `ListInvoiceTemplatesByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListInvoiceTemplatesByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listInvoiceTemplatesByVendorId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listInvoiceTemplatesByVendorId` Query is of type `ListInvoiceTemplatesByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListInvoiceTemplatesByVendorIdData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listInvoiceTemplatesByVendorId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListInvoiceTemplatesByVendorIdVariables } from '@dataconnect/generated'; +import { useListInvoiceTemplatesByVendorId } from '@dataconnect/generated/react' + +export default function ListInvoiceTemplatesByVendorIdComponent() { + // The `useListInvoiceTemplatesByVendorId` Query hook requires an argument of type `ListInvoiceTemplatesByVendorIdVariables`: + const listInvoiceTemplatesByVendorIdVars: ListInvoiceTemplatesByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListInvoiceTemplatesByVendorId(listInvoiceTemplatesByVendorIdVars); + // Variables can be defined inline as well. + const query = useListInvoiceTemplatesByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListInvoiceTemplatesByVendorId(dataConnect, listInvoiceTemplatesByVendorIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListInvoiceTemplatesByVendorId(listInvoiceTemplatesByVendorIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListInvoiceTemplatesByVendorId(dataConnect, listInvoiceTemplatesByVendorIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoiceTemplates); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listInvoiceTemplatesByBusinessId +You can execute the `listInvoiceTemplatesByBusinessId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListInvoiceTemplatesByBusinessId(dc: DataConnect, vars: ListInvoiceTemplatesByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListInvoiceTemplatesByBusinessId(vars: ListInvoiceTemplatesByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listInvoiceTemplatesByBusinessId` Query requires an argument of type `ListInvoiceTemplatesByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListInvoiceTemplatesByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listInvoiceTemplatesByBusinessId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listInvoiceTemplatesByBusinessId` Query is of type `ListInvoiceTemplatesByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListInvoiceTemplatesByBusinessIdData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listInvoiceTemplatesByBusinessId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListInvoiceTemplatesByBusinessIdVariables } from '@dataconnect/generated'; +import { useListInvoiceTemplatesByBusinessId } from '@dataconnect/generated/react' + +export default function ListInvoiceTemplatesByBusinessIdComponent() { + // The `useListInvoiceTemplatesByBusinessId` Query hook requires an argument of type `ListInvoiceTemplatesByBusinessIdVariables`: + const listInvoiceTemplatesByBusinessIdVars: ListInvoiceTemplatesByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListInvoiceTemplatesByBusinessId(listInvoiceTemplatesByBusinessIdVars); + // Variables can be defined inline as well. + const query = useListInvoiceTemplatesByBusinessId({ businessId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListInvoiceTemplatesByBusinessId(dataConnect, listInvoiceTemplatesByBusinessIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListInvoiceTemplatesByBusinessId(listInvoiceTemplatesByBusinessIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListInvoiceTemplatesByBusinessId(dataConnect, listInvoiceTemplatesByBusinessIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoiceTemplates); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listInvoiceTemplatesByOrderId +You can execute the `listInvoiceTemplatesByOrderId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListInvoiceTemplatesByOrderId(dc: DataConnect, vars: ListInvoiceTemplatesByOrderIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListInvoiceTemplatesByOrderId(vars: ListInvoiceTemplatesByOrderIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listInvoiceTemplatesByOrderId` Query requires an argument of type `ListInvoiceTemplatesByOrderIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListInvoiceTemplatesByOrderIdVariables { + orderId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listInvoiceTemplatesByOrderId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listInvoiceTemplatesByOrderId` Query is of type `ListInvoiceTemplatesByOrderIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListInvoiceTemplatesByOrderIdData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listInvoiceTemplatesByOrderId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListInvoiceTemplatesByOrderIdVariables } from '@dataconnect/generated'; +import { useListInvoiceTemplatesByOrderId } from '@dataconnect/generated/react' + +export default function ListInvoiceTemplatesByOrderIdComponent() { + // The `useListInvoiceTemplatesByOrderId` Query hook requires an argument of type `ListInvoiceTemplatesByOrderIdVariables`: + const listInvoiceTemplatesByOrderIdVars: ListInvoiceTemplatesByOrderIdVariables = { + orderId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListInvoiceTemplatesByOrderId(listInvoiceTemplatesByOrderIdVars); + // Variables can be defined inline as well. + const query = useListInvoiceTemplatesByOrderId({ orderId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListInvoiceTemplatesByOrderId(dataConnect, listInvoiceTemplatesByOrderIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListInvoiceTemplatesByOrderId(listInvoiceTemplatesByOrderIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListInvoiceTemplatesByOrderId(dataConnect, listInvoiceTemplatesByOrderIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoiceTemplates); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## searchInvoiceTemplatesByOwnerAndName +You can execute the `searchInvoiceTemplatesByOwnerAndName` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useSearchInvoiceTemplatesByOwnerAndName(dc: DataConnect, vars: SearchInvoiceTemplatesByOwnerAndNameVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useSearchInvoiceTemplatesByOwnerAndName(vars: SearchInvoiceTemplatesByOwnerAndNameVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `searchInvoiceTemplatesByOwnerAndName` Query requires an argument of type `SearchInvoiceTemplatesByOwnerAndNameVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface SearchInvoiceTemplatesByOwnerAndNameVariables { + ownerId: UUIDString; + name: string; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `searchInvoiceTemplatesByOwnerAndName` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `searchInvoiceTemplatesByOwnerAndName` Query is of type `SearchInvoiceTemplatesByOwnerAndNameData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface SearchInvoiceTemplatesByOwnerAndNameData { + invoiceTemplates: ({ + id: UUIDString; + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business?: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + order?: { + id: UUIDString; + eventName?: string | null; + status: OrderStatus; + orderType: OrderType; + } & Order_Key; + } & InvoiceTemplate_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `searchInvoiceTemplatesByOwnerAndName`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, SearchInvoiceTemplatesByOwnerAndNameVariables } from '@dataconnect/generated'; +import { useSearchInvoiceTemplatesByOwnerAndName } from '@dataconnect/generated/react' + +export default function SearchInvoiceTemplatesByOwnerAndNameComponent() { + // The `useSearchInvoiceTemplatesByOwnerAndName` Query hook requires an argument of type `SearchInvoiceTemplatesByOwnerAndNameVariables`: + const searchInvoiceTemplatesByOwnerAndNameVars: SearchInvoiceTemplatesByOwnerAndNameVariables = { + ownerId: ..., + name: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useSearchInvoiceTemplatesByOwnerAndName(searchInvoiceTemplatesByOwnerAndNameVars); + // Variables can be defined inline as well. + const query = useSearchInvoiceTemplatesByOwnerAndName({ ownerId: ..., name: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useSearchInvoiceTemplatesByOwnerAndName(dataConnect, searchInvoiceTemplatesByOwnerAndNameVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useSearchInvoiceTemplatesByOwnerAndName(searchInvoiceTemplatesByOwnerAndNameVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useSearchInvoiceTemplatesByOwnerAndName(dataConnect, searchInvoiceTemplatesByOwnerAndNameVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoiceTemplates); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getStaffDocumentByKey +You can execute the `getStaffDocumentByKey` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetStaffDocumentByKey(dc: DataConnect, vars: GetStaffDocumentByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetStaffDocumentByKey(vars: GetStaffDocumentByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getStaffDocumentByKey` Query requires an argument of type `GetStaffDocumentByKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetStaffDocumentByKeyVariables { + staffId: UUIDString; + documentId: UUIDString; +} +``` +### Return Type +Recall that calling the `getStaffDocumentByKey` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getStaffDocumentByKey` Query is of type `GetStaffDocumentByKeyData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetStaffDocumentByKeyData { + staffDocument?: { + id: UUIDString; + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + document: { + id: UUIDString; + name: string; + documentType: DocumentType; + description?: string | null; + } & Document_Key; + } & StaffDocument_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getStaffDocumentByKey`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetStaffDocumentByKeyVariables } from '@dataconnect/generated'; +import { useGetStaffDocumentByKey } from '@dataconnect/generated/react' + +export default function GetStaffDocumentByKeyComponent() { + // The `useGetStaffDocumentByKey` Query hook requires an argument of type `GetStaffDocumentByKeyVariables`: + const getStaffDocumentByKeyVars: GetStaffDocumentByKeyVariables = { + staffId: ..., + documentId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetStaffDocumentByKey(getStaffDocumentByKeyVars); + // Variables can be defined inline as well. + const query = useGetStaffDocumentByKey({ staffId: ..., documentId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetStaffDocumentByKey(dataConnect, getStaffDocumentByKeyVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffDocumentByKey(getStaffDocumentByKeyVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffDocumentByKey(dataConnect, getStaffDocumentByKeyVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffDocument); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffDocumentsByStaffId +You can execute the `listStaffDocumentsByStaffId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffDocumentsByStaffId(dc: DataConnect, vars: ListStaffDocumentsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffDocumentsByStaffId(vars: ListStaffDocumentsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffDocumentsByStaffId` Query requires an argument of type `ListStaffDocumentsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffDocumentsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listStaffDocumentsByStaffId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffDocumentsByStaffId` Query is of type `ListStaffDocumentsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffDocumentsByStaffIdData { + staffDocuments: ({ + id: UUIDString; + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + document: { + id: UUIDString; + name: string; + documentType: DocumentType; + } & Document_Key; + } & StaffDocument_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffDocumentsByStaffId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffDocumentsByStaffIdVariables } from '@dataconnect/generated'; +import { useListStaffDocumentsByStaffId } from '@dataconnect/generated/react' + +export default function ListStaffDocumentsByStaffIdComponent() { + // The `useListStaffDocumentsByStaffId` Query hook requires an argument of type `ListStaffDocumentsByStaffIdVariables`: + const listStaffDocumentsByStaffIdVars: ListStaffDocumentsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffDocumentsByStaffId(listStaffDocumentsByStaffIdVars); + // Variables can be defined inline as well. + const query = useListStaffDocumentsByStaffId({ staffId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffDocumentsByStaffId(dataConnect, listStaffDocumentsByStaffIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffDocumentsByStaffId(listStaffDocumentsByStaffIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffDocumentsByStaffId(dataConnect, listStaffDocumentsByStaffIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffDocuments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffDocumentsByDocumentType +You can execute the `listStaffDocumentsByDocumentType` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffDocumentsByDocumentType(dc: DataConnect, vars: ListStaffDocumentsByDocumentTypeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffDocumentsByDocumentType(vars: ListStaffDocumentsByDocumentTypeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffDocumentsByDocumentType` Query requires an argument of type `ListStaffDocumentsByDocumentTypeVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffDocumentsByDocumentTypeVariables { + documentType: DocumentType; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listStaffDocumentsByDocumentType` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffDocumentsByDocumentType` Query is of type `ListStaffDocumentsByDocumentTypeData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffDocumentsByDocumentTypeData { + staffDocuments: ({ + id: UUIDString; + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; + document: { + id: UUIDString; + name: string; + documentType: DocumentType; + } & Document_Key; + } & StaffDocument_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffDocumentsByDocumentType`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffDocumentsByDocumentTypeVariables } from '@dataconnect/generated'; +import { useListStaffDocumentsByDocumentType } from '@dataconnect/generated/react' + +export default function ListStaffDocumentsByDocumentTypeComponent() { + // The `useListStaffDocumentsByDocumentType` Query hook requires an argument of type `ListStaffDocumentsByDocumentTypeVariables`: + const listStaffDocumentsByDocumentTypeVars: ListStaffDocumentsByDocumentTypeVariables = { + documentType: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffDocumentsByDocumentType(listStaffDocumentsByDocumentTypeVars); + // Variables can be defined inline as well. + const query = useListStaffDocumentsByDocumentType({ documentType: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffDocumentsByDocumentType(dataConnect, listStaffDocumentsByDocumentTypeVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffDocumentsByDocumentType(listStaffDocumentsByDocumentTypeVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffDocumentsByDocumentType(dataConnect, listStaffDocumentsByDocumentTypeVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffDocuments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffDocumentsByStatus +You can execute the `listStaffDocumentsByStatus` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffDocumentsByStatus(dc: DataConnect, vars: ListStaffDocumentsByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffDocumentsByStatus(vars: ListStaffDocumentsByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffDocumentsByStatus` Query requires an argument of type `ListStaffDocumentsByStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffDocumentsByStatusVariables { + status: DocumentStatus; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listStaffDocumentsByStatus` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffDocumentsByStatus` Query is of type `ListStaffDocumentsByStatusData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffDocumentsByStatusData { + staffDocuments: ({ + id: UUIDString; + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; + document: { + id: UUIDString; + name: string; + documentType: DocumentType; + } & Document_Key; + } & StaffDocument_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffDocumentsByStatus`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffDocumentsByStatusVariables } from '@dataconnect/generated'; +import { useListStaffDocumentsByStatus } from '@dataconnect/generated/react' + +export default function ListStaffDocumentsByStatusComponent() { + // The `useListStaffDocumentsByStatus` Query hook requires an argument of type `ListStaffDocumentsByStatusVariables`: + const listStaffDocumentsByStatusVars: ListStaffDocumentsByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffDocumentsByStatus(listStaffDocumentsByStatusVars); + // Variables can be defined inline as well. + const query = useListStaffDocumentsByStatus({ status: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffDocumentsByStatus(dataConnect, listStaffDocumentsByStatusVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffDocumentsByStatus(listStaffDocumentsByStatusVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffDocumentsByStatus(dataConnect, listStaffDocumentsByStatusVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffDocuments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listAccounts +You can execute the `listAccounts` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListAccounts(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListAccounts(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listAccounts` Query has no variables. +### Return Type +Recall that calling the `listAccounts` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listAccounts` Query is of type `ListAccountsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListAccountsData { + accounts: ({ + id: UUIDString; + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; + createdAt?: TimestampString | null; + } & Account_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listAccounts`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListAccounts } from '@dataconnect/generated/react' + +export default function ListAccountsComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListAccounts(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListAccounts(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListAccounts(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListAccounts(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.accounts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getAccountById +You can execute the `getAccountById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetAccountById(dc: DataConnect, vars: GetAccountByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetAccountById(vars: GetAccountByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getAccountById` Query requires an argument of type `GetAccountByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetAccountByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getAccountById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getAccountById` Query is of type `GetAccountByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetAccountByIdData { + account?: { + id: UUIDString; + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; + createdAt?: TimestampString | null; + } & Account_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getAccountById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetAccountByIdVariables } from '@dataconnect/generated'; +import { useGetAccountById } from '@dataconnect/generated/react' + +export default function GetAccountByIdComponent() { + // The `useGetAccountById` Query hook requires an argument of type `GetAccountByIdVariables`: + const getAccountByIdVars: GetAccountByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetAccountById(getAccountByIdVars); + // Variables can be defined inline as well. + const query = useGetAccountById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetAccountById(dataConnect, getAccountByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetAccountById(getAccountByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetAccountById(dataConnect, getAccountByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.account); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getAccountsByOwnerId +You can execute the `getAccountsByOwnerId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetAccountsByOwnerId(dc: DataConnect, vars: GetAccountsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetAccountsByOwnerId(vars: GetAccountsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getAccountsByOwnerId` Query requires an argument of type `GetAccountsByOwnerIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetAccountsByOwnerIdVariables { + ownerId: UUIDString; +} +``` +### Return Type +Recall that calling the `getAccountsByOwnerId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getAccountsByOwnerId` Query is of type `GetAccountsByOwnerIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetAccountsByOwnerIdData { + accounts: ({ + id: UUIDString; + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; + createdAt?: TimestampString | null; + } & Account_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getAccountsByOwnerId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetAccountsByOwnerIdVariables } from '@dataconnect/generated'; +import { useGetAccountsByOwnerId } from '@dataconnect/generated/react' + +export default function GetAccountsByOwnerIdComponent() { + // The `useGetAccountsByOwnerId` Query hook requires an argument of type `GetAccountsByOwnerIdVariables`: + const getAccountsByOwnerIdVars: GetAccountsByOwnerIdVariables = { + ownerId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetAccountsByOwnerId(getAccountsByOwnerIdVars); + // Variables can be defined inline as well. + const query = useGetAccountsByOwnerId({ ownerId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetAccountsByOwnerId(dataConnect, getAccountsByOwnerIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetAccountsByOwnerId(getAccountsByOwnerIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetAccountsByOwnerId(dataConnect, getAccountsByOwnerIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.accounts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterAccounts +You can execute the `filterAccounts` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterAccounts(dc: DataConnect, vars?: FilterAccountsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterAccounts(vars?: FilterAccountsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterAccounts` Query has an optional argument of type `FilterAccountsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterAccountsVariables { + bank?: string | null; + type?: AccountType | null; + isPrimary?: boolean | null; + ownerId?: UUIDString | null; +} +``` +### Return Type +Recall that calling the `filterAccounts` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterAccounts` Query is of type `FilterAccountsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterAccountsData { + accounts: ({ + id: UUIDString; + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + expiryTime?: TimestampString | null; + routeNumber?: string | null; + } & Account_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterAccounts`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterAccountsVariables } from '@dataconnect/generated'; +import { useFilterAccounts } from '@dataconnect/generated/react' + +export default function FilterAccountsComponent() { + // The `useFilterAccounts` Query hook has an optional argument of type `FilterAccountsVariables`: + const filterAccountsVars: FilterAccountsVariables = { + bank: ..., // optional + type: ..., // optional + isPrimary: ..., // optional + ownerId: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterAccounts(filterAccountsVars); + // Variables can be defined inline as well. + const query = useFilterAccounts({ bank: ..., type: ..., isPrimary: ..., ownerId: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterAccountsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterAccounts(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterAccounts(dataConnect, filterAccountsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterAccounts(filterAccountsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterAccounts(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterAccounts(dataConnect, filterAccountsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.accounts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listApplications +You can execute the `listApplications` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListApplications(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListApplications(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listApplications` Query has no variables. +### Return Type +Recall that calling the `listApplications` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listApplications` Query is of type `ListApplicationsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListApplicationsData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listApplications`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListApplications } from '@dataconnect/generated/react' + +export default function ListApplicationsComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListApplications(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListApplications(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListApplications(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListApplications(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getApplicationById +You can execute the `getApplicationById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetApplicationById(dc: DataConnect, vars: GetApplicationByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetApplicationById(vars: GetApplicationByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getApplicationById` Query requires an argument of type `GetApplicationByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetApplicationByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getApplicationById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getApplicationById` Query is of type `GetApplicationByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetApplicationByIdData { + application?: { + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getApplicationById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetApplicationByIdVariables } from '@dataconnect/generated'; +import { useGetApplicationById } from '@dataconnect/generated/react' + +export default function GetApplicationByIdComponent() { + // The `useGetApplicationById` Query hook requires an argument of type `GetApplicationByIdVariables`: + const getApplicationByIdVars: GetApplicationByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetApplicationById(getApplicationByIdVars); + // Variables can be defined inline as well. + const query = useGetApplicationById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetApplicationById(dataConnect, getApplicationByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetApplicationById(getApplicationByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetApplicationById(dataConnect, getApplicationByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.application); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getApplicationsByShiftId +You can execute the `getApplicationsByShiftId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetApplicationsByShiftId(dc: DataConnect, vars: GetApplicationsByShiftIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetApplicationsByShiftId(vars: GetApplicationsByShiftIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getApplicationsByShiftId` Query requires an argument of type `GetApplicationsByShiftIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetApplicationsByShiftIdVariables { + shiftId: UUIDString; +} +``` +### Return Type +Recall that calling the `getApplicationsByShiftId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getApplicationsByShiftId` Query is of type `GetApplicationsByShiftIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetApplicationsByShiftIdData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getApplicationsByShiftId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetApplicationsByShiftIdVariables } from '@dataconnect/generated'; +import { useGetApplicationsByShiftId } from '@dataconnect/generated/react' + +export default function GetApplicationsByShiftIdComponent() { + // The `useGetApplicationsByShiftId` Query hook requires an argument of type `GetApplicationsByShiftIdVariables`: + const getApplicationsByShiftIdVars: GetApplicationsByShiftIdVariables = { + shiftId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetApplicationsByShiftId(getApplicationsByShiftIdVars); + // Variables can be defined inline as well. + const query = useGetApplicationsByShiftId({ shiftId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetApplicationsByShiftId(dataConnect, getApplicationsByShiftIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetApplicationsByShiftId(getApplicationsByShiftIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetApplicationsByShiftId(dataConnect, getApplicationsByShiftIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getApplicationsByShiftIdAndStatus +You can execute the `getApplicationsByShiftIdAndStatus` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetApplicationsByShiftIdAndStatus(dc: DataConnect, vars: GetApplicationsByShiftIdAndStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetApplicationsByShiftIdAndStatus(vars: GetApplicationsByShiftIdAndStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getApplicationsByShiftIdAndStatus` Query requires an argument of type `GetApplicationsByShiftIdAndStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetApplicationsByShiftIdAndStatusVariables { + shiftId: UUIDString; + status: ApplicationStatus; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `getApplicationsByShiftIdAndStatus` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getApplicationsByShiftIdAndStatus` Query is of type `GetApplicationsByShiftIdAndStatusData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetApplicationsByShiftIdAndStatusData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getApplicationsByShiftIdAndStatus`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetApplicationsByShiftIdAndStatusVariables } from '@dataconnect/generated'; +import { useGetApplicationsByShiftIdAndStatus } from '@dataconnect/generated/react' + +export default function GetApplicationsByShiftIdAndStatusComponent() { + // The `useGetApplicationsByShiftIdAndStatus` Query hook requires an argument of type `GetApplicationsByShiftIdAndStatusVariables`: + const getApplicationsByShiftIdAndStatusVars: GetApplicationsByShiftIdAndStatusVariables = { + shiftId: ..., + status: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetApplicationsByShiftIdAndStatus(getApplicationsByShiftIdAndStatusVars); + // Variables can be defined inline as well. + const query = useGetApplicationsByShiftIdAndStatus({ shiftId: ..., status: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetApplicationsByShiftIdAndStatus(dataConnect, getApplicationsByShiftIdAndStatusVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetApplicationsByShiftIdAndStatus(getApplicationsByShiftIdAndStatusVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetApplicationsByShiftIdAndStatus(dataConnect, getApplicationsByShiftIdAndStatusVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getApplicationsByStaffId +You can execute the `getApplicationsByStaffId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetApplicationsByStaffId(dc: DataConnect, vars: GetApplicationsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetApplicationsByStaffId(vars: GetApplicationsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getApplicationsByStaffId` Query requires an argument of type `GetApplicationsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetApplicationsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; + dayStart?: TimestampString | null; + dayEnd?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `getApplicationsByStaffId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getApplicationsByStaffId` Query is of type `GetApplicationsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetApplicationsByStaffIdData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + durationDays?: number | null; + description?: string | null; + latitude?: number | null; + longitude?: number | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getApplicationsByStaffId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetApplicationsByStaffIdVariables } from '@dataconnect/generated'; +import { useGetApplicationsByStaffId } from '@dataconnect/generated/react' + +export default function GetApplicationsByStaffIdComponent() { + // The `useGetApplicationsByStaffId` Query hook requires an argument of type `GetApplicationsByStaffIdVariables`: + const getApplicationsByStaffIdVars: GetApplicationsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + dayStart: ..., // optional + dayEnd: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetApplicationsByStaffId(getApplicationsByStaffIdVars); + // Variables can be defined inline as well. + const query = useGetApplicationsByStaffId({ staffId: ..., offset: ..., limit: ..., dayStart: ..., dayEnd: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetApplicationsByStaffId(dataConnect, getApplicationsByStaffIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetApplicationsByStaffId(getApplicationsByStaffIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetApplicationsByStaffId(dataConnect, getApplicationsByStaffIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## vaidateDayStaffApplication +You can execute the `vaidateDayStaffApplication` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useVaidateDayStaffApplication(dc: DataConnect, vars: VaidateDayStaffApplicationVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useVaidateDayStaffApplication(vars: VaidateDayStaffApplicationVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `vaidateDayStaffApplication` Query requires an argument of type `VaidateDayStaffApplicationVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface VaidateDayStaffApplicationVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; + dayStart?: TimestampString | null; + dayEnd?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `vaidateDayStaffApplication` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `vaidateDayStaffApplication` Query is of type `VaidateDayStaffApplicationData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface VaidateDayStaffApplicationData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + durationDays?: number | null; + description?: string | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `vaidateDayStaffApplication`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, VaidateDayStaffApplicationVariables } from '@dataconnect/generated'; +import { useVaidateDayStaffApplication } from '@dataconnect/generated/react' + +export default function VaidateDayStaffApplicationComponent() { + // The `useVaidateDayStaffApplication` Query hook requires an argument of type `VaidateDayStaffApplicationVariables`: + const vaidateDayStaffApplicationVars: VaidateDayStaffApplicationVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + dayStart: ..., // optional + dayEnd: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useVaidateDayStaffApplication(vaidateDayStaffApplicationVars); + // Variables can be defined inline as well. + const query = useVaidateDayStaffApplication({ staffId: ..., offset: ..., limit: ..., dayStart: ..., dayEnd: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useVaidateDayStaffApplication(dataConnect, vaidateDayStaffApplicationVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useVaidateDayStaffApplication(vaidateDayStaffApplicationVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useVaidateDayStaffApplication(dataConnect, vaidateDayStaffApplicationVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getApplicationByStaffShiftAndRole +You can execute the `getApplicationByStaffShiftAndRole` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetApplicationByStaffShiftAndRole(dc: DataConnect, vars: GetApplicationByStaffShiftAndRoleVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetApplicationByStaffShiftAndRole(vars: GetApplicationByStaffShiftAndRoleVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getApplicationByStaffShiftAndRole` Query requires an argument of type `GetApplicationByStaffShiftAndRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetApplicationByStaffShiftAndRoleVariables { + staffId: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `getApplicationByStaffShiftAndRole` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getApplicationByStaffShiftAndRole` Query is of type `GetApplicationByStaffShiftAndRoleData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetApplicationByStaffShiftAndRoleData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getApplicationByStaffShiftAndRole`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetApplicationByStaffShiftAndRoleVariables } from '@dataconnect/generated'; +import { useGetApplicationByStaffShiftAndRole } from '@dataconnect/generated/react' + +export default function GetApplicationByStaffShiftAndRoleComponent() { + // The `useGetApplicationByStaffShiftAndRole` Query hook requires an argument of type `GetApplicationByStaffShiftAndRoleVariables`: + const getApplicationByStaffShiftAndRoleVars: GetApplicationByStaffShiftAndRoleVariables = { + staffId: ..., + shiftId: ..., + roleId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetApplicationByStaffShiftAndRole(getApplicationByStaffShiftAndRoleVars); + // Variables can be defined inline as well. + const query = useGetApplicationByStaffShiftAndRole({ staffId: ..., shiftId: ..., roleId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetApplicationByStaffShiftAndRole(dataConnect, getApplicationByStaffShiftAndRoleVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetApplicationByStaffShiftAndRole(getApplicationByStaffShiftAndRoleVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetApplicationByStaffShiftAndRole(dataConnect, getApplicationByStaffShiftAndRoleVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listAcceptedApplicationsByShiftRoleKey +You can execute the `listAcceptedApplicationsByShiftRoleKey` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListAcceptedApplicationsByShiftRoleKey(dc: DataConnect, vars: ListAcceptedApplicationsByShiftRoleKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListAcceptedApplicationsByShiftRoleKey(vars: ListAcceptedApplicationsByShiftRoleKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listAcceptedApplicationsByShiftRoleKey` Query requires an argument of type `ListAcceptedApplicationsByShiftRoleKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListAcceptedApplicationsByShiftRoleKeyVariables { + shiftId: UUIDString; + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listAcceptedApplicationsByShiftRoleKey` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listAcceptedApplicationsByShiftRoleKey` Query is of type `ListAcceptedApplicationsByShiftRoleKeyData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListAcceptedApplicationsByShiftRoleKeyData { + applications: ({ + id: UUIDString; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + } & Staff_Key; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listAcceptedApplicationsByShiftRoleKey`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListAcceptedApplicationsByShiftRoleKeyVariables } from '@dataconnect/generated'; +import { useListAcceptedApplicationsByShiftRoleKey } from '@dataconnect/generated/react' + +export default function ListAcceptedApplicationsByShiftRoleKeyComponent() { + // The `useListAcceptedApplicationsByShiftRoleKey` Query hook requires an argument of type `ListAcceptedApplicationsByShiftRoleKeyVariables`: + const listAcceptedApplicationsByShiftRoleKeyVars: ListAcceptedApplicationsByShiftRoleKeyVariables = { + shiftId: ..., + roleId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListAcceptedApplicationsByShiftRoleKey(listAcceptedApplicationsByShiftRoleKeyVars); + // Variables can be defined inline as well. + const query = useListAcceptedApplicationsByShiftRoleKey({ shiftId: ..., roleId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListAcceptedApplicationsByShiftRoleKey(dataConnect, listAcceptedApplicationsByShiftRoleKeyVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListAcceptedApplicationsByShiftRoleKey(listAcceptedApplicationsByShiftRoleKeyVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListAcceptedApplicationsByShiftRoleKey(dataConnect, listAcceptedApplicationsByShiftRoleKeyVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listAcceptedApplicationsByBusinessForDay +You can execute the `listAcceptedApplicationsByBusinessForDay` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListAcceptedApplicationsByBusinessForDay(dc: DataConnect, vars: ListAcceptedApplicationsByBusinessForDayVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListAcceptedApplicationsByBusinessForDay(vars: ListAcceptedApplicationsByBusinessForDayVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listAcceptedApplicationsByBusinessForDay` Query requires an argument of type `ListAcceptedApplicationsByBusinessForDayVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListAcceptedApplicationsByBusinessForDayVariables { + businessId: UUIDString; + dayStart: TimestampString; + dayEnd: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listAcceptedApplicationsByBusinessForDay` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listAcceptedApplicationsByBusinessForDay` Query is of type `ListAcceptedApplicationsByBusinessForDayData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListAcceptedApplicationsByBusinessForDayData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + appliedAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + averageRating?: number | null; + } & Staff_Key; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listAcceptedApplicationsByBusinessForDay`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListAcceptedApplicationsByBusinessForDayVariables } from '@dataconnect/generated'; +import { useListAcceptedApplicationsByBusinessForDay } from '@dataconnect/generated/react' + +export default function ListAcceptedApplicationsByBusinessForDayComponent() { + // The `useListAcceptedApplicationsByBusinessForDay` Query hook requires an argument of type `ListAcceptedApplicationsByBusinessForDayVariables`: + const listAcceptedApplicationsByBusinessForDayVars: ListAcceptedApplicationsByBusinessForDayVariables = { + businessId: ..., + dayStart: ..., + dayEnd: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListAcceptedApplicationsByBusinessForDay(listAcceptedApplicationsByBusinessForDayVars); + // Variables can be defined inline as well. + const query = useListAcceptedApplicationsByBusinessForDay({ businessId: ..., dayStart: ..., dayEnd: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListAcceptedApplicationsByBusinessForDay(dataConnect, listAcceptedApplicationsByBusinessForDayVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListAcceptedApplicationsByBusinessForDay(listAcceptedApplicationsByBusinessForDayVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListAcceptedApplicationsByBusinessForDay(dataConnect, listAcceptedApplicationsByBusinessForDayVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffsApplicationsByBusinessForDay +You can execute the `listStaffsApplicationsByBusinessForDay` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffsApplicationsByBusinessForDay(dc: DataConnect, vars: ListStaffsApplicationsByBusinessForDayVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffsApplicationsByBusinessForDay(vars: ListStaffsApplicationsByBusinessForDayVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffsApplicationsByBusinessForDay` Query requires an argument of type `ListStaffsApplicationsByBusinessForDayVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffsApplicationsByBusinessForDayVariables { + businessId: UUIDString; + dayStart: TimestampString; + dayEnd: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listStaffsApplicationsByBusinessForDay` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffsApplicationsByBusinessForDay` Query is of type `ListStaffsApplicationsByBusinessForDayData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffsApplicationsByBusinessForDayData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + appliedAt?: TimestampString | null; + status: ApplicationStatus; + shiftRole: { + shift: { + location?: string | null; + cost?: number | null; + }; + count: number; + assigned?: number | null; + hours?: number | null; + role: { + name: string; + }; + }; + staff: { + id: UUIDString; + fullName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + } & Staff_Key; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffsApplicationsByBusinessForDay`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffsApplicationsByBusinessForDayVariables } from '@dataconnect/generated'; +import { useListStaffsApplicationsByBusinessForDay } from '@dataconnect/generated/react' + +export default function ListStaffsApplicationsByBusinessForDayComponent() { + // The `useListStaffsApplicationsByBusinessForDay` Query hook requires an argument of type `ListStaffsApplicationsByBusinessForDayVariables`: + const listStaffsApplicationsByBusinessForDayVars: ListStaffsApplicationsByBusinessForDayVariables = { + businessId: ..., + dayStart: ..., + dayEnd: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffsApplicationsByBusinessForDay(listStaffsApplicationsByBusinessForDayVars); + // Variables can be defined inline as well. + const query = useListStaffsApplicationsByBusinessForDay({ businessId: ..., dayStart: ..., dayEnd: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffsApplicationsByBusinessForDay(dataConnect, listStaffsApplicationsByBusinessForDayVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffsApplicationsByBusinessForDay(listStaffsApplicationsByBusinessForDayVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffsApplicationsByBusinessForDay(dataConnect, listStaffsApplicationsByBusinessForDayVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listCompletedApplicationsByStaffId +You can execute the `listCompletedApplicationsByStaffId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListCompletedApplicationsByStaffId(dc: DataConnect, vars: ListCompletedApplicationsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListCompletedApplicationsByStaffId(vars: ListCompletedApplicationsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listCompletedApplicationsByStaffId` Query requires an argument of type `ListCompletedApplicationsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListCompletedApplicationsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listCompletedApplicationsByStaffId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listCompletedApplicationsByStaffId` Query is of type `ListCompletedApplicationsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListCompletedApplicationsByStaffIdData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + appliedAt?: TimestampString | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + createdAt?: TimestampString | null; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + location?: string | null; + status?: ShiftStatus | null; + description?: string | null; + durationDays?: number | null; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + shiftRole: { + id: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + }; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listCompletedApplicationsByStaffId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListCompletedApplicationsByStaffIdVariables } from '@dataconnect/generated'; +import { useListCompletedApplicationsByStaffId } from '@dataconnect/generated/react' + +export default function ListCompletedApplicationsByStaffIdComponent() { + // The `useListCompletedApplicationsByStaffId` Query hook requires an argument of type `ListCompletedApplicationsByStaffIdVariables`: + const listCompletedApplicationsByStaffIdVars: ListCompletedApplicationsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListCompletedApplicationsByStaffId(listCompletedApplicationsByStaffIdVars); + // Variables can be defined inline as well. + const query = useListCompletedApplicationsByStaffId({ staffId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListCompletedApplicationsByStaffId(dataConnect, listCompletedApplicationsByStaffIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListCompletedApplicationsByStaffId(listCompletedApplicationsByStaffIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListCompletedApplicationsByStaffId(dataConnect, listCompletedApplicationsByStaffIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listAttireOptions +You can execute the `listAttireOptions` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListAttireOptions(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListAttireOptions(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listAttireOptions` Query has no variables. +### Return Type +Recall that calling the `listAttireOptions` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listAttireOptions` Query is of type `ListAttireOptionsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListAttireOptionsData { + attireOptions: ({ + id: UUIDString; + itemId: string; + label: string; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; + createdAt?: TimestampString | null; + } & AttireOption_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listAttireOptions`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListAttireOptions } from '@dataconnect/generated/react' + +export default function ListAttireOptionsComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListAttireOptions(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListAttireOptions(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListAttireOptions(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListAttireOptions(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.attireOptions); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getAttireOptionById +You can execute the `getAttireOptionById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetAttireOptionById(dc: DataConnect, vars: GetAttireOptionByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetAttireOptionById(vars: GetAttireOptionByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getAttireOptionById` Query requires an argument of type `GetAttireOptionByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetAttireOptionByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getAttireOptionById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getAttireOptionById` Query is of type `GetAttireOptionByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetAttireOptionByIdData { + attireOption?: { + id: UUIDString; + itemId: string; + label: string; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; + createdAt?: TimestampString | null; + } & AttireOption_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getAttireOptionById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetAttireOptionByIdVariables } from '@dataconnect/generated'; +import { useGetAttireOptionById } from '@dataconnect/generated/react' + +export default function GetAttireOptionByIdComponent() { + // The `useGetAttireOptionById` Query hook requires an argument of type `GetAttireOptionByIdVariables`: + const getAttireOptionByIdVars: GetAttireOptionByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetAttireOptionById(getAttireOptionByIdVars); + // Variables can be defined inline as well. + const query = useGetAttireOptionById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetAttireOptionById(dataConnect, getAttireOptionByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetAttireOptionById(getAttireOptionByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetAttireOptionById(dataConnect, getAttireOptionByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.attireOption); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterAttireOptions +You can execute the `filterAttireOptions` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterAttireOptions(dc: DataConnect, vars?: FilterAttireOptionsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterAttireOptions(vars?: FilterAttireOptionsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterAttireOptions` Query has an optional argument of type `FilterAttireOptionsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterAttireOptionsVariables { + itemId?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; +} +``` +### Return Type +Recall that calling the `filterAttireOptions` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterAttireOptions` Query is of type `FilterAttireOptionsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterAttireOptionsData { + attireOptions: ({ + id: UUIDString; + itemId: string; + label: string; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; + } & AttireOption_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterAttireOptions`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterAttireOptionsVariables } from '@dataconnect/generated'; +import { useFilterAttireOptions } from '@dataconnect/generated/react' + +export default function FilterAttireOptionsComponent() { + // The `useFilterAttireOptions` Query hook has an optional argument of type `FilterAttireOptionsVariables`: + const filterAttireOptionsVars: FilterAttireOptionsVariables = { + itemId: ..., // optional + isMandatory: ..., // optional + vendorId: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterAttireOptions(filterAttireOptionsVars); + // Variables can be defined inline as well. + const query = useFilterAttireOptions({ itemId: ..., isMandatory: ..., vendorId: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterAttireOptionsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterAttireOptions(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterAttireOptions(dataConnect, filterAttireOptionsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterAttireOptions(filterAttireOptionsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterAttireOptions(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterAttireOptions(dataConnect, filterAttireOptionsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.attireOptions); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listCustomRateCards +You can execute the `listCustomRateCards` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListCustomRateCards(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListCustomRateCards(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listCustomRateCards` Query has no variables. +### Return Type +Recall that calling the `listCustomRateCards` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listCustomRateCards` Query is of type `ListCustomRateCardsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListCustomRateCardsData { + customRateCards: ({ + id: UUIDString; + name: string; + baseBook?: string | null; + discount?: number | null; + isDefault?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & CustomRateCard_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listCustomRateCards`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListCustomRateCards } from '@dataconnect/generated/react' + +export default function ListCustomRateCardsComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListCustomRateCards(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListCustomRateCards(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListCustomRateCards(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListCustomRateCards(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.customRateCards); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getCustomRateCardById +You can execute the `getCustomRateCardById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetCustomRateCardById(dc: DataConnect, vars: GetCustomRateCardByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetCustomRateCardById(vars: GetCustomRateCardByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getCustomRateCardById` Query requires an argument of type `GetCustomRateCardByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetCustomRateCardByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getCustomRateCardById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getCustomRateCardById` Query is of type `GetCustomRateCardByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetCustomRateCardByIdData { + customRateCard?: { + id: UUIDString; + name: string; + baseBook?: string | null; + discount?: number | null; + isDefault?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & CustomRateCard_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getCustomRateCardById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetCustomRateCardByIdVariables } from '@dataconnect/generated'; +import { useGetCustomRateCardById } from '@dataconnect/generated/react' + +export default function GetCustomRateCardByIdComponent() { + // The `useGetCustomRateCardById` Query hook requires an argument of type `GetCustomRateCardByIdVariables`: + const getCustomRateCardByIdVars: GetCustomRateCardByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetCustomRateCardById(getCustomRateCardByIdVars); + // Variables can be defined inline as well. + const query = useGetCustomRateCardById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetCustomRateCardById(dataConnect, getCustomRateCardByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetCustomRateCardById(getCustomRateCardByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetCustomRateCardById(dataConnect, getCustomRateCardByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.customRateCard); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listRoleCategories +You can execute the `listRoleCategories` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListRoleCategories(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListRoleCategories(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listRoleCategories` Query has no variables. +### Return Type +Recall that calling the `listRoleCategories` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listRoleCategories` Query is of type `ListRoleCategoriesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListRoleCategoriesData { + roleCategories: ({ + id: UUIDString; + roleName: string; + category: RoleCategoryType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & RoleCategory_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listRoleCategories`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListRoleCategories } from '@dataconnect/generated/react' + +export default function ListRoleCategoriesComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListRoleCategories(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListRoleCategories(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListRoleCategories(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListRoleCategories(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.roleCategories); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getRoleCategoryById +You can execute the `getRoleCategoryById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetRoleCategoryById(dc: DataConnect, vars: GetRoleCategoryByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetRoleCategoryById(vars: GetRoleCategoryByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getRoleCategoryById` Query requires an argument of type `GetRoleCategoryByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetRoleCategoryByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getRoleCategoryById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getRoleCategoryById` Query is of type `GetRoleCategoryByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetRoleCategoryByIdData { + roleCategory?: { + id: UUIDString; + roleName: string; + category: RoleCategoryType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & RoleCategory_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getRoleCategoryById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetRoleCategoryByIdVariables } from '@dataconnect/generated'; +import { useGetRoleCategoryById } from '@dataconnect/generated/react' + +export default function GetRoleCategoryByIdComponent() { + // The `useGetRoleCategoryById` Query hook requires an argument of type `GetRoleCategoryByIdVariables`: + const getRoleCategoryByIdVars: GetRoleCategoryByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetRoleCategoryById(getRoleCategoryByIdVars); + // Variables can be defined inline as well. + const query = useGetRoleCategoryById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetRoleCategoryById(dataConnect, getRoleCategoryByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetRoleCategoryById(getRoleCategoryByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetRoleCategoryById(dataConnect, getRoleCategoryByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.roleCategory); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getRoleCategoriesByCategory +You can execute the `getRoleCategoriesByCategory` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetRoleCategoriesByCategory(dc: DataConnect, vars: GetRoleCategoriesByCategoryVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetRoleCategoriesByCategory(vars: GetRoleCategoriesByCategoryVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getRoleCategoriesByCategory` Query requires an argument of type `GetRoleCategoriesByCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetRoleCategoriesByCategoryVariables { + category: RoleCategoryType; +} +``` +### Return Type +Recall that calling the `getRoleCategoriesByCategory` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getRoleCategoriesByCategory` Query is of type `GetRoleCategoriesByCategoryData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetRoleCategoriesByCategoryData { + roleCategories: ({ + id: UUIDString; + roleName: string; + category: RoleCategoryType; + } & RoleCategory_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getRoleCategoriesByCategory`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetRoleCategoriesByCategoryVariables } from '@dataconnect/generated'; +import { useGetRoleCategoriesByCategory } from '@dataconnect/generated/react' + +export default function GetRoleCategoriesByCategoryComponent() { + // The `useGetRoleCategoriesByCategory` Query hook requires an argument of type `GetRoleCategoriesByCategoryVariables`: + const getRoleCategoriesByCategoryVars: GetRoleCategoriesByCategoryVariables = { + category: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetRoleCategoriesByCategory(getRoleCategoriesByCategoryVars); + // Variables can be defined inline as well. + const query = useGetRoleCategoriesByCategory({ category: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetRoleCategoriesByCategory(dataConnect, getRoleCategoriesByCategoryVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetRoleCategoriesByCategory(getRoleCategoriesByCategoryVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetRoleCategoriesByCategory(dataConnect, getRoleCategoriesByCategoryVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.roleCategories); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffAvailabilities +You can execute the `listStaffAvailabilities` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffAvailabilities(dc: DataConnect, vars?: ListStaffAvailabilitiesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffAvailabilities(vars?: ListStaffAvailabilitiesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffAvailabilities` Query has an optional argument of type `ListStaffAvailabilitiesVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffAvailabilitiesVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listStaffAvailabilities` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffAvailabilities` Query is of type `ListStaffAvailabilitiesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffAvailabilitiesData { + staffAvailabilities: ({ + id: UUIDString; + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status: AvailabilityStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailability_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffAvailabilities`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffAvailabilitiesVariables } from '@dataconnect/generated'; +import { useListStaffAvailabilities } from '@dataconnect/generated/react' + +export default function ListStaffAvailabilitiesComponent() { + // The `useListStaffAvailabilities` Query hook has an optional argument of type `ListStaffAvailabilitiesVariables`: + const listStaffAvailabilitiesVars: ListStaffAvailabilitiesVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffAvailabilities(listStaffAvailabilitiesVars); + // Variables can be defined inline as well. + const query = useListStaffAvailabilities({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListStaffAvailabilitiesVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListStaffAvailabilities(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffAvailabilities(dataConnect, listStaffAvailabilitiesVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffAvailabilities(listStaffAvailabilitiesVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListStaffAvailabilities(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffAvailabilities(dataConnect, listStaffAvailabilitiesVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffAvailabilities); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffAvailabilitiesByStaffId +You can execute the `listStaffAvailabilitiesByStaffId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffAvailabilitiesByStaffId(dc: DataConnect, vars: ListStaffAvailabilitiesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffAvailabilitiesByStaffId(vars: ListStaffAvailabilitiesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffAvailabilitiesByStaffId` Query requires an argument of type `ListStaffAvailabilitiesByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffAvailabilitiesByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listStaffAvailabilitiesByStaffId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffAvailabilitiesByStaffId` Query is of type `ListStaffAvailabilitiesByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffAvailabilitiesByStaffIdData { + staffAvailabilities: ({ + id: UUIDString; + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status: AvailabilityStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailability_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffAvailabilitiesByStaffId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffAvailabilitiesByStaffIdVariables } from '@dataconnect/generated'; +import { useListStaffAvailabilitiesByStaffId } from '@dataconnect/generated/react' + +export default function ListStaffAvailabilitiesByStaffIdComponent() { + // The `useListStaffAvailabilitiesByStaffId` Query hook requires an argument of type `ListStaffAvailabilitiesByStaffIdVariables`: + const listStaffAvailabilitiesByStaffIdVars: ListStaffAvailabilitiesByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffAvailabilitiesByStaffId(listStaffAvailabilitiesByStaffIdVars); + // Variables can be defined inline as well. + const query = useListStaffAvailabilitiesByStaffId({ staffId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffAvailabilitiesByStaffId(dataConnect, listStaffAvailabilitiesByStaffIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffAvailabilitiesByStaffId(listStaffAvailabilitiesByStaffIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffAvailabilitiesByStaffId(dataConnect, listStaffAvailabilitiesByStaffIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffAvailabilities); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getStaffAvailabilityByKey +You can execute the `getStaffAvailabilityByKey` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetStaffAvailabilityByKey(dc: DataConnect, vars: GetStaffAvailabilityByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetStaffAvailabilityByKey(vars: GetStaffAvailabilityByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getStaffAvailabilityByKey` Query requires an argument of type `GetStaffAvailabilityByKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetStaffAvailabilityByKeyVariables { + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; +} +``` +### Return Type +Recall that calling the `getStaffAvailabilityByKey` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getStaffAvailabilityByKey` Query is of type `GetStaffAvailabilityByKeyData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetStaffAvailabilityByKeyData { + staffAvailability?: { + id: UUIDString; + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status: AvailabilityStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailability_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getStaffAvailabilityByKey`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetStaffAvailabilityByKeyVariables } from '@dataconnect/generated'; +import { useGetStaffAvailabilityByKey } from '@dataconnect/generated/react' + +export default function GetStaffAvailabilityByKeyComponent() { + // The `useGetStaffAvailabilityByKey` Query hook requires an argument of type `GetStaffAvailabilityByKeyVariables`: + const getStaffAvailabilityByKeyVars: GetStaffAvailabilityByKeyVariables = { + staffId: ..., + day: ..., + slot: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetStaffAvailabilityByKey(getStaffAvailabilityByKeyVars); + // Variables can be defined inline as well. + const query = useGetStaffAvailabilityByKey({ staffId: ..., day: ..., slot: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetStaffAvailabilityByKey(dataConnect, getStaffAvailabilityByKeyVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffAvailabilityByKey(getStaffAvailabilityByKeyVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffAvailabilityByKey(dataConnect, getStaffAvailabilityByKeyVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffAvailability); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffAvailabilitiesByDay +You can execute the `listStaffAvailabilitiesByDay` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffAvailabilitiesByDay(dc: DataConnect, vars: ListStaffAvailabilitiesByDayVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffAvailabilitiesByDay(vars: ListStaffAvailabilitiesByDayVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffAvailabilitiesByDay` Query requires an argument of type `ListStaffAvailabilitiesByDayVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffAvailabilitiesByDayVariables { + day: DayOfWeek; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listStaffAvailabilitiesByDay` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffAvailabilitiesByDay` Query is of type `ListStaffAvailabilitiesByDayData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffAvailabilitiesByDayData { + staffAvailabilities: ({ + id: UUIDString; + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status: AvailabilityStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailability_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffAvailabilitiesByDay`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffAvailabilitiesByDayVariables } from '@dataconnect/generated'; +import { useListStaffAvailabilitiesByDay } from '@dataconnect/generated/react' + +export default function ListStaffAvailabilitiesByDayComponent() { + // The `useListStaffAvailabilitiesByDay` Query hook requires an argument of type `ListStaffAvailabilitiesByDayVariables`: + const listStaffAvailabilitiesByDayVars: ListStaffAvailabilitiesByDayVariables = { + day: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffAvailabilitiesByDay(listStaffAvailabilitiesByDayVars); + // Variables can be defined inline as well. + const query = useListStaffAvailabilitiesByDay({ day: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffAvailabilitiesByDay(dataConnect, listStaffAvailabilitiesByDayVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffAvailabilitiesByDay(listStaffAvailabilitiesByDayVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffAvailabilitiesByDay(dataConnect, listStaffAvailabilitiesByDayVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffAvailabilities); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listRecentPayments +You can execute the `listRecentPayments` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListRecentPayments(dc: DataConnect, vars?: ListRecentPaymentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListRecentPayments(vars?: ListRecentPaymentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listRecentPayments` Query has an optional argument of type `ListRecentPaymentsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListRecentPaymentsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listRecentPayments` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listRecentPayments` Query is of type `ListRecentPaymentsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListRecentPaymentsData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + role: { + name: string; + costPerHour: number; + }; + shift: { + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + description?: string | null; + }; + }; + }; + invoice: { + status: InvoiceStatus; + invoiceNumber: string; + issueDate: TimestampString; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + }; + } & RecentPayment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listRecentPayments`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListRecentPaymentsVariables } from '@dataconnect/generated'; +import { useListRecentPayments } from '@dataconnect/generated/react' + +export default function ListRecentPaymentsComponent() { + // The `useListRecentPayments` Query hook has an optional argument of type `ListRecentPaymentsVariables`: + const listRecentPaymentsVars: ListRecentPaymentsVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListRecentPayments(listRecentPaymentsVars); + // Variables can be defined inline as well. + const query = useListRecentPayments({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListRecentPaymentsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListRecentPayments(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListRecentPayments(dataConnect, listRecentPaymentsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPayments(listRecentPaymentsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListRecentPayments(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPayments(dataConnect, listRecentPaymentsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.recentPayments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getRecentPaymentById +You can execute the `getRecentPaymentById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetRecentPaymentById(dc: DataConnect, vars: GetRecentPaymentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetRecentPaymentById(vars: GetRecentPaymentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getRecentPaymentById` Query requires an argument of type `GetRecentPaymentByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetRecentPaymentByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getRecentPaymentById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getRecentPaymentById` Query is of type `GetRecentPaymentByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetRecentPaymentByIdData { + recentPayment?: { + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + role: { + name: string; + costPerHour: number; + }; + shift: { + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + description?: string | null; + }; + }; + }; + invoice: { + status: InvoiceStatus; + invoiceNumber: string; + issueDate: TimestampString; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + }; + } & RecentPayment_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getRecentPaymentById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetRecentPaymentByIdVariables } from '@dataconnect/generated'; +import { useGetRecentPaymentById } from '@dataconnect/generated/react' + +export default function GetRecentPaymentByIdComponent() { + // The `useGetRecentPaymentById` Query hook requires an argument of type `GetRecentPaymentByIdVariables`: + const getRecentPaymentByIdVars: GetRecentPaymentByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetRecentPaymentById(getRecentPaymentByIdVars); + // Variables can be defined inline as well. + const query = useGetRecentPaymentById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetRecentPaymentById(dataConnect, getRecentPaymentByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetRecentPaymentById(getRecentPaymentByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetRecentPaymentById(dataConnect, getRecentPaymentByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.recentPayment); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listRecentPaymentsByStaffId +You can execute the `listRecentPaymentsByStaffId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListRecentPaymentsByStaffId(dc: DataConnect, vars: ListRecentPaymentsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListRecentPaymentsByStaffId(vars: ListRecentPaymentsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listRecentPaymentsByStaffId` Query requires an argument of type `ListRecentPaymentsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListRecentPaymentsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listRecentPaymentsByStaffId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listRecentPaymentsByStaffId` Query is of type `ListRecentPaymentsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListRecentPaymentsByStaffIdData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + status: ApplicationStatus; + shiftRole: { + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listRecentPaymentsByStaffId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListRecentPaymentsByStaffIdVariables } from '@dataconnect/generated'; +import { useListRecentPaymentsByStaffId } from '@dataconnect/generated/react' + +export default function ListRecentPaymentsByStaffIdComponent() { + // The `useListRecentPaymentsByStaffId` Query hook requires an argument of type `ListRecentPaymentsByStaffIdVariables`: + const listRecentPaymentsByStaffIdVars: ListRecentPaymentsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListRecentPaymentsByStaffId(listRecentPaymentsByStaffIdVars); + // Variables can be defined inline as well. + const query = useListRecentPaymentsByStaffId({ staffId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListRecentPaymentsByStaffId(dataConnect, listRecentPaymentsByStaffIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPaymentsByStaffId(listRecentPaymentsByStaffIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPaymentsByStaffId(dataConnect, listRecentPaymentsByStaffIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.recentPayments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listRecentPaymentsByApplicationId +You can execute the `listRecentPaymentsByApplicationId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListRecentPaymentsByApplicationId(dc: DataConnect, vars: ListRecentPaymentsByApplicationIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListRecentPaymentsByApplicationId(vars: ListRecentPaymentsByApplicationIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listRecentPaymentsByApplicationId` Query requires an argument of type `ListRecentPaymentsByApplicationIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListRecentPaymentsByApplicationIdVariables { + applicationId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listRecentPaymentsByApplicationId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listRecentPaymentsByApplicationId` Query is of type `ListRecentPaymentsByApplicationIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListRecentPaymentsByApplicationIdData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + status: ApplicationStatus; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listRecentPaymentsByApplicationId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListRecentPaymentsByApplicationIdVariables } from '@dataconnect/generated'; +import { useListRecentPaymentsByApplicationId } from '@dataconnect/generated/react' + +export default function ListRecentPaymentsByApplicationIdComponent() { + // The `useListRecentPaymentsByApplicationId` Query hook requires an argument of type `ListRecentPaymentsByApplicationIdVariables`: + const listRecentPaymentsByApplicationIdVars: ListRecentPaymentsByApplicationIdVariables = { + applicationId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListRecentPaymentsByApplicationId(listRecentPaymentsByApplicationIdVars); + // Variables can be defined inline as well. + const query = useListRecentPaymentsByApplicationId({ applicationId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListRecentPaymentsByApplicationId(dataConnect, listRecentPaymentsByApplicationIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPaymentsByApplicationId(listRecentPaymentsByApplicationIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPaymentsByApplicationId(dataConnect, listRecentPaymentsByApplicationIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.recentPayments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listRecentPaymentsByInvoiceId +You can execute the `listRecentPaymentsByInvoiceId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListRecentPaymentsByInvoiceId(dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListRecentPaymentsByInvoiceId(vars: ListRecentPaymentsByInvoiceIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listRecentPaymentsByInvoiceId` Query requires an argument of type `ListRecentPaymentsByInvoiceIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListRecentPaymentsByInvoiceIdVariables { + invoiceId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listRecentPaymentsByInvoiceId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listRecentPaymentsByInvoiceId` Query is of type `ListRecentPaymentsByInvoiceIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListRecentPaymentsByInvoiceIdData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + staffId: UUIDString; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listRecentPaymentsByInvoiceId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListRecentPaymentsByInvoiceIdVariables } from '@dataconnect/generated'; +import { useListRecentPaymentsByInvoiceId } from '@dataconnect/generated/react' + +export default function ListRecentPaymentsByInvoiceIdComponent() { + // The `useListRecentPaymentsByInvoiceId` Query hook requires an argument of type `ListRecentPaymentsByInvoiceIdVariables`: + const listRecentPaymentsByInvoiceIdVars: ListRecentPaymentsByInvoiceIdVariables = { + invoiceId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListRecentPaymentsByInvoiceId(listRecentPaymentsByInvoiceIdVars); + // Variables can be defined inline as well. + const query = useListRecentPaymentsByInvoiceId({ invoiceId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListRecentPaymentsByInvoiceId(dataConnect, listRecentPaymentsByInvoiceIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPaymentsByInvoiceId(listRecentPaymentsByInvoiceIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPaymentsByInvoiceId(dataConnect, listRecentPaymentsByInvoiceIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.recentPayments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listRecentPaymentsByStatus +You can execute the `listRecentPaymentsByStatus` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListRecentPaymentsByStatus(dc: DataConnect, vars: ListRecentPaymentsByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListRecentPaymentsByStatus(vars: ListRecentPaymentsByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listRecentPaymentsByStatus` Query requires an argument of type `ListRecentPaymentsByStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListRecentPaymentsByStatusVariables { + status: RecentPaymentStatus; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listRecentPaymentsByStatus` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listRecentPaymentsByStatus` Query is of type `ListRecentPaymentsByStatusData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListRecentPaymentsByStatusData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listRecentPaymentsByStatus`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListRecentPaymentsByStatusVariables } from '@dataconnect/generated'; +import { useListRecentPaymentsByStatus } from '@dataconnect/generated/react' + +export default function ListRecentPaymentsByStatusComponent() { + // The `useListRecentPaymentsByStatus` Query hook requires an argument of type `ListRecentPaymentsByStatusVariables`: + const listRecentPaymentsByStatusVars: ListRecentPaymentsByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListRecentPaymentsByStatus(listRecentPaymentsByStatusVars); + // Variables can be defined inline as well. + const query = useListRecentPaymentsByStatus({ status: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListRecentPaymentsByStatus(dataConnect, listRecentPaymentsByStatusVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPaymentsByStatus(listRecentPaymentsByStatusVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPaymentsByStatus(dataConnect, listRecentPaymentsByStatusVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.recentPayments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listRecentPaymentsByInvoiceIds +You can execute the `listRecentPaymentsByInvoiceIds` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListRecentPaymentsByInvoiceIds(dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListRecentPaymentsByInvoiceIds(vars: ListRecentPaymentsByInvoiceIdsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listRecentPaymentsByInvoiceIds` Query requires an argument of type `ListRecentPaymentsByInvoiceIdsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListRecentPaymentsByInvoiceIdsVariables { + invoiceIds: UUIDString[]; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listRecentPaymentsByInvoiceIds` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listRecentPaymentsByInvoiceIds` Query is of type `ListRecentPaymentsByInvoiceIdsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListRecentPaymentsByInvoiceIdsData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + shiftRole: { + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + locationAddress?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listRecentPaymentsByInvoiceIds`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListRecentPaymentsByInvoiceIdsVariables } from '@dataconnect/generated'; +import { useListRecentPaymentsByInvoiceIds } from '@dataconnect/generated/react' + +export default function ListRecentPaymentsByInvoiceIdsComponent() { + // The `useListRecentPaymentsByInvoiceIds` Query hook requires an argument of type `ListRecentPaymentsByInvoiceIdsVariables`: + const listRecentPaymentsByInvoiceIdsVars: ListRecentPaymentsByInvoiceIdsVariables = { + invoiceIds: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListRecentPaymentsByInvoiceIds(listRecentPaymentsByInvoiceIdsVars); + // Variables can be defined inline as well. + const query = useListRecentPaymentsByInvoiceIds({ invoiceIds: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListRecentPaymentsByInvoiceIds(dataConnect, listRecentPaymentsByInvoiceIdsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPaymentsByInvoiceIds(listRecentPaymentsByInvoiceIdsVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPaymentsByInvoiceIds(dataConnect, listRecentPaymentsByInvoiceIdsVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.recentPayments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listRecentPaymentsByBusinessId +You can execute the `listRecentPaymentsByBusinessId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListRecentPaymentsByBusinessId(dc: DataConnect, vars: ListRecentPaymentsByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListRecentPaymentsByBusinessId(vars: ListRecentPaymentsByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listRecentPaymentsByBusinessId` Query requires an argument of type `ListRecentPaymentsByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListRecentPaymentsByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listRecentPaymentsByBusinessId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listRecentPaymentsByBusinessId` Query is of type `ListRecentPaymentsByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListRecentPaymentsByBusinessIdData { + recentPayments: ({ + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + application: { + id: UUIDString; + staffId: UUIDString; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + shiftRole: { + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + description?: string | null; + } & Shift_Key; + }; + } & Application_Key; + invoice: { + id: UUIDString; + invoiceNumber: string; + status: InvoiceStatus; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + order: { + id: UUIDString; + eventName?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; + } & Invoice_Key; + } & RecentPayment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listRecentPaymentsByBusinessId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListRecentPaymentsByBusinessIdVariables } from '@dataconnect/generated'; +import { useListRecentPaymentsByBusinessId } from '@dataconnect/generated/react' + +export default function ListRecentPaymentsByBusinessIdComponent() { + // The `useListRecentPaymentsByBusinessId` Query hook requires an argument of type `ListRecentPaymentsByBusinessIdVariables`: + const listRecentPaymentsByBusinessIdVars: ListRecentPaymentsByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListRecentPaymentsByBusinessId(listRecentPaymentsByBusinessIdVars); + // Variables can be defined inline as well. + const query = useListRecentPaymentsByBusinessId({ businessId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListRecentPaymentsByBusinessId(dataConnect, listRecentPaymentsByBusinessIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPaymentsByBusinessId(listRecentPaymentsByBusinessIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListRecentPaymentsByBusinessId(dataConnect, listRecentPaymentsByBusinessIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.recentPayments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listBusinesses +You can execute the `listBusinesses` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListBusinesses(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListBusinesses(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listBusinesses` Query has no variables. +### Return Type +Recall that calling the `listBusinesses` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listBusinesses` Query is of type `ListBusinessesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListBusinessesData { + businesses: ({ + id: UUIDString; + businessName: string; + contactName?: string | null; + userId: string; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup: BusinessRateGroup; + status: BusinessStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & Business_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listBusinesses`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListBusinesses } from '@dataconnect/generated/react' + +export default function ListBusinessesComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListBusinesses(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListBusinesses(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListBusinesses(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListBusinesses(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.businesses); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getBusinessesByUserId +You can execute the `getBusinessesByUserId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetBusinessesByUserId(dc: DataConnect, vars: GetBusinessesByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetBusinessesByUserId(vars: GetBusinessesByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getBusinessesByUserId` Query requires an argument of type `GetBusinessesByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetBusinessesByUserIdVariables { + userId: string; +} +``` +### Return Type +Recall that calling the `getBusinessesByUserId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getBusinessesByUserId` Query is of type `GetBusinessesByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetBusinessesByUserIdData { + businesses: ({ + id: UUIDString; + businessName: string; + contactName?: string | null; + userId: string; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup: BusinessRateGroup; + status: BusinessStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & Business_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getBusinessesByUserId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetBusinessesByUserIdVariables } from '@dataconnect/generated'; +import { useGetBusinessesByUserId } from '@dataconnect/generated/react' + +export default function GetBusinessesByUserIdComponent() { + // The `useGetBusinessesByUserId` Query hook requires an argument of type `GetBusinessesByUserIdVariables`: + const getBusinessesByUserIdVars: GetBusinessesByUserIdVariables = { + userId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetBusinessesByUserId(getBusinessesByUserIdVars); + // Variables can be defined inline as well. + const query = useGetBusinessesByUserId({ userId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetBusinessesByUserId(dataConnect, getBusinessesByUserIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetBusinessesByUserId(getBusinessesByUserIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetBusinessesByUserId(dataConnect, getBusinessesByUserIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.businesses); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getBusinessById +You can execute the `getBusinessById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetBusinessById(dc: DataConnect, vars: GetBusinessByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetBusinessById(vars: GetBusinessByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getBusinessById` Query requires an argument of type `GetBusinessByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetBusinessByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getBusinessById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getBusinessById` Query is of type `GetBusinessByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetBusinessByIdData { + business?: { + id: UUIDString; + businessName: string; + contactName?: string | null; + userId: string; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup: BusinessRateGroup; + status: BusinessStatus; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & Business_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getBusinessById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetBusinessByIdVariables } from '@dataconnect/generated'; +import { useGetBusinessById } from '@dataconnect/generated/react' + +export default function GetBusinessByIdComponent() { + // The `useGetBusinessById` Query hook requires an argument of type `GetBusinessByIdVariables`: + const getBusinessByIdVars: GetBusinessByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetBusinessById(getBusinessByIdVars); + // Variables can be defined inline as well. + const query = useGetBusinessById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetBusinessById(dataConnect, getBusinessByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetBusinessById(getBusinessByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetBusinessById(dataConnect, getBusinessByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.business); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listConversations +You can execute the `listConversations` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListConversations(dc: DataConnect, vars?: ListConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListConversations(vars?: ListConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listConversations` Query has an optional argument of type `ListConversationsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListConversationsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listConversations` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listConversations` Query is of type `ListConversationsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListConversationsData { + conversations: ({ + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listConversations`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListConversationsVariables } from '@dataconnect/generated'; +import { useListConversations } from '@dataconnect/generated/react' + +export default function ListConversationsComponent() { + // The `useListConversations` Query hook has an optional argument of type `ListConversationsVariables`: + const listConversationsVars: ListConversationsVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListConversations(listConversationsVars); + // Variables can be defined inline as well. + const query = useListConversations({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListConversationsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListConversations(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListConversations(dataConnect, listConversationsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListConversations(listConversationsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListConversations(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListConversations(dataConnect, listConversationsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.conversations); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getConversationById +You can execute the `getConversationById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetConversationById(dc: DataConnect, vars: GetConversationByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetConversationById(vars: GetConversationByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getConversationById` Query requires an argument of type `GetConversationByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetConversationByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getConversationById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getConversationById` Query is of type `GetConversationByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetConversationByIdData { + conversation?: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getConversationById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetConversationByIdVariables } from '@dataconnect/generated'; +import { useGetConversationById } from '@dataconnect/generated/react' + +export default function GetConversationByIdComponent() { + // The `useGetConversationById` Query hook requires an argument of type `GetConversationByIdVariables`: + const getConversationByIdVars: GetConversationByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetConversationById(getConversationByIdVars); + // Variables can be defined inline as well. + const query = useGetConversationById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetConversationById(dataConnect, getConversationByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetConversationById(getConversationByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetConversationById(dataConnect, getConversationByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.conversation); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listConversationsByType +You can execute the `listConversationsByType` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListConversationsByType(dc: DataConnect, vars: ListConversationsByTypeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListConversationsByType(vars: ListConversationsByTypeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listConversationsByType` Query requires an argument of type `ListConversationsByTypeVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListConversationsByTypeVariables { + conversationType: ConversationType; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listConversationsByType` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listConversationsByType` Query is of type `ListConversationsByTypeData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListConversationsByTypeData { + conversations: ({ + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listConversationsByType`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListConversationsByTypeVariables } from '@dataconnect/generated'; +import { useListConversationsByType } from '@dataconnect/generated/react' + +export default function ListConversationsByTypeComponent() { + // The `useListConversationsByType` Query hook requires an argument of type `ListConversationsByTypeVariables`: + const listConversationsByTypeVars: ListConversationsByTypeVariables = { + conversationType: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListConversationsByType(listConversationsByTypeVars); + // Variables can be defined inline as well. + const query = useListConversationsByType({ conversationType: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListConversationsByType(dataConnect, listConversationsByTypeVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListConversationsByType(listConversationsByTypeVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListConversationsByType(dataConnect, listConversationsByTypeVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.conversations); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listConversationsByStatus +You can execute the `listConversationsByStatus` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListConversationsByStatus(dc: DataConnect, vars: ListConversationsByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListConversationsByStatus(vars: ListConversationsByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listConversationsByStatus` Query requires an argument of type `ListConversationsByStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListConversationsByStatusVariables { + status: ConversationStatus; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listConversationsByStatus` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listConversationsByStatus` Query is of type `ListConversationsByStatusData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListConversationsByStatusData { + conversations: ({ + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listConversationsByStatus`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListConversationsByStatusVariables } from '@dataconnect/generated'; +import { useListConversationsByStatus } from '@dataconnect/generated/react' + +export default function ListConversationsByStatusComponent() { + // The `useListConversationsByStatus` Query hook requires an argument of type `ListConversationsByStatusVariables`: + const listConversationsByStatusVars: ListConversationsByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListConversationsByStatus(listConversationsByStatusVars); + // Variables can be defined inline as well. + const query = useListConversationsByStatus({ status: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListConversationsByStatus(dataConnect, listConversationsByStatusVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListConversationsByStatus(listConversationsByStatusVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListConversationsByStatus(dataConnect, listConversationsByStatusVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.conversations); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterConversations +You can execute the `filterConversations` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterConversations(dc: DataConnect, vars?: FilterConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterConversations(vars?: FilterConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterConversations` Query has an optional argument of type `FilterConversationsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterConversationsVariables { + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + lastMessageAfter?: TimestampString | null; + lastMessageBefore?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `filterConversations` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterConversations` Query is of type `FilterConversationsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterConversationsData { + conversations: ({ + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterConversations`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterConversationsVariables } from '@dataconnect/generated'; +import { useFilterConversations } from '@dataconnect/generated/react' + +export default function FilterConversationsComponent() { + // The `useFilterConversations` Query hook has an optional argument of type `FilterConversationsVariables`: + const filterConversationsVars: FilterConversationsVariables = { + status: ..., // optional + conversationType: ..., // optional + isGroup: ..., // optional + lastMessageAfter: ..., // optional + lastMessageBefore: ..., // optional + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterConversations(filterConversationsVars); + // Variables can be defined inline as well. + const query = useFilterConversations({ status: ..., conversationType: ..., isGroup: ..., lastMessageAfter: ..., lastMessageBefore: ..., offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterConversationsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterConversations(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterConversations(dataConnect, filterConversationsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterConversations(filterConversationsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterConversations(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterConversations(dataConnect, filterConversationsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.conversations); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listOrders +You can execute the `listOrders` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListOrders(dc: DataConnect, vars?: ListOrdersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListOrders(vars?: ListOrdersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listOrders` Query has an optional argument of type `ListOrdersVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListOrdersVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listOrders` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listOrders` Query is of type `ListOrdersData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListOrdersData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listOrders`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListOrdersVariables } from '@dataconnect/generated'; +import { useListOrders } from '@dataconnect/generated/react' + +export default function ListOrdersComponent() { + // The `useListOrders` Query hook has an optional argument of type `ListOrdersVariables`: + const listOrdersVars: ListOrdersVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListOrders(listOrdersVars); + // Variables can be defined inline as well. + const query = useListOrders({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListOrdersVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListOrders(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListOrders(dataConnect, listOrdersVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListOrders(listOrdersVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListOrders(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListOrders(dataConnect, listOrdersVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.orders); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getOrderById +You can execute the `getOrderById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetOrderById(dc: DataConnect, vars: GetOrderByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetOrderById(vars: GetOrderByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getOrderById` Query requires an argument of type `GetOrderByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetOrderByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getOrderById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getOrderById` Query is of type `GetOrderByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetOrderByIdData { + order?: { + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getOrderById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetOrderByIdVariables } from '@dataconnect/generated'; +import { useGetOrderById } from '@dataconnect/generated/react' + +export default function GetOrderByIdComponent() { + // The `useGetOrderById` Query hook requires an argument of type `GetOrderByIdVariables`: + const getOrderByIdVars: GetOrderByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetOrderById(getOrderByIdVars); + // Variables can be defined inline as well. + const query = useGetOrderById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetOrderById(dataConnect, getOrderByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetOrderById(getOrderByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetOrderById(dataConnect, getOrderByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.order); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getOrdersByBusinessId +You can execute the `getOrdersByBusinessId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetOrdersByBusinessId(dc: DataConnect, vars: GetOrdersByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetOrdersByBusinessId(vars: GetOrdersByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getOrdersByBusinessId` Query requires an argument of type `GetOrdersByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetOrdersByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `getOrdersByBusinessId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getOrdersByBusinessId` Query is of type `GetOrdersByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetOrdersByBusinessIdData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getOrdersByBusinessId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetOrdersByBusinessIdVariables } from '@dataconnect/generated'; +import { useGetOrdersByBusinessId } from '@dataconnect/generated/react' + +export default function GetOrdersByBusinessIdComponent() { + // The `useGetOrdersByBusinessId` Query hook requires an argument of type `GetOrdersByBusinessIdVariables`: + const getOrdersByBusinessIdVars: GetOrdersByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetOrdersByBusinessId(getOrdersByBusinessIdVars); + // Variables can be defined inline as well. + const query = useGetOrdersByBusinessId({ businessId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetOrdersByBusinessId(dataConnect, getOrdersByBusinessIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetOrdersByBusinessId(getOrdersByBusinessIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetOrdersByBusinessId(dataConnect, getOrdersByBusinessIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.orders); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getOrdersByVendorId +You can execute the `getOrdersByVendorId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetOrdersByVendorId(dc: DataConnect, vars: GetOrdersByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetOrdersByVendorId(vars: GetOrdersByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getOrdersByVendorId` Query requires an argument of type `GetOrdersByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetOrdersByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `getOrdersByVendorId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getOrdersByVendorId` Query is of type `GetOrdersByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetOrdersByVendorIdData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getOrdersByVendorId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetOrdersByVendorIdVariables } from '@dataconnect/generated'; +import { useGetOrdersByVendorId } from '@dataconnect/generated/react' + +export default function GetOrdersByVendorIdComponent() { + // The `useGetOrdersByVendorId` Query hook requires an argument of type `GetOrdersByVendorIdVariables`: + const getOrdersByVendorIdVars: GetOrdersByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetOrdersByVendorId(getOrdersByVendorIdVars); + // Variables can be defined inline as well. + const query = useGetOrdersByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetOrdersByVendorId(dataConnect, getOrdersByVendorIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetOrdersByVendorId(getOrdersByVendorIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetOrdersByVendorId(dataConnect, getOrdersByVendorIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.orders); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getOrdersByStatus +You can execute the `getOrdersByStatus` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetOrdersByStatus(dc: DataConnect, vars: GetOrdersByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetOrdersByStatus(vars: GetOrdersByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getOrdersByStatus` Query requires an argument of type `GetOrdersByStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetOrdersByStatusVariables { + status: OrderStatus; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `getOrdersByStatus` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getOrdersByStatus` Query is of type `GetOrdersByStatusData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetOrdersByStatusData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getOrdersByStatus`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetOrdersByStatusVariables } from '@dataconnect/generated'; +import { useGetOrdersByStatus } from '@dataconnect/generated/react' + +export default function GetOrdersByStatusComponent() { + // The `useGetOrdersByStatus` Query hook requires an argument of type `GetOrdersByStatusVariables`: + const getOrdersByStatusVars: GetOrdersByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetOrdersByStatus(getOrdersByStatusVars); + // Variables can be defined inline as well. + const query = useGetOrdersByStatus({ status: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetOrdersByStatus(dataConnect, getOrdersByStatusVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetOrdersByStatus(getOrdersByStatusVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetOrdersByStatus(dataConnect, getOrdersByStatusVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.orders); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getOrdersByDateRange +You can execute the `getOrdersByDateRange` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetOrdersByDateRange(dc: DataConnect, vars: GetOrdersByDateRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetOrdersByDateRange(vars: GetOrdersByDateRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getOrdersByDateRange` Query requires an argument of type `GetOrdersByDateRangeVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetOrdersByDateRangeVariables { + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `getOrdersByDateRange` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getOrdersByDateRange` Query is of type `GetOrdersByDateRangeData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetOrdersByDateRangeData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getOrdersByDateRange`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetOrdersByDateRangeVariables } from '@dataconnect/generated'; +import { useGetOrdersByDateRange } from '@dataconnect/generated/react' + +export default function GetOrdersByDateRangeComponent() { + // The `useGetOrdersByDateRange` Query hook requires an argument of type `GetOrdersByDateRangeVariables`: + const getOrdersByDateRangeVars: GetOrdersByDateRangeVariables = { + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetOrdersByDateRange(getOrdersByDateRangeVars); + // Variables can be defined inline as well. + const query = useGetOrdersByDateRange({ start: ..., end: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetOrdersByDateRange(dataConnect, getOrdersByDateRangeVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetOrdersByDateRange(getOrdersByDateRangeVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetOrdersByDateRange(dataConnect, getOrdersByDateRangeVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.orders); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getRapidOrders +You can execute the `getRapidOrders` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetRapidOrders(dc: DataConnect, vars?: GetRapidOrdersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetRapidOrders(vars?: GetRapidOrdersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getRapidOrders` Query has an optional argument of type `GetRapidOrdersVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetRapidOrdersVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `getRapidOrders` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getRapidOrders` Query is of type `GetRapidOrdersData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetRapidOrdersData { + orders: ({ + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + poReference?: string | null; + detectedConflicts?: unknown | null; + notes?: string | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + email?: string | null; + contactName?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + } & Order_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getRapidOrders`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetRapidOrdersVariables } from '@dataconnect/generated'; +import { useGetRapidOrders } from '@dataconnect/generated/react' + +export default function GetRapidOrdersComponent() { + // The `useGetRapidOrders` Query hook has an optional argument of type `GetRapidOrdersVariables`: + const getRapidOrdersVars: GetRapidOrdersVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetRapidOrders(getRapidOrdersVars); + // Variables can be defined inline as well. + const query = useGetRapidOrders({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `GetRapidOrdersVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useGetRapidOrders(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetRapidOrders(dataConnect, getRapidOrdersVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetRapidOrders(getRapidOrdersVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useGetRapidOrders(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetRapidOrders(dataConnect, getRapidOrdersVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.orders); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listOrdersByBusinessAndTeamHub +You can execute the `listOrdersByBusinessAndTeamHub` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListOrdersByBusinessAndTeamHub(dc: DataConnect, vars: ListOrdersByBusinessAndTeamHubVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListOrdersByBusinessAndTeamHub(vars: ListOrdersByBusinessAndTeamHubVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listOrdersByBusinessAndTeamHub` Query requires an argument of type `ListOrdersByBusinessAndTeamHubVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListOrdersByBusinessAndTeamHubVariables { + businessId: UUIDString; + teamHubId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listOrdersByBusinessAndTeamHub` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listOrdersByBusinessAndTeamHub` Query is of type `ListOrdersByBusinessAndTeamHubData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListOrdersByBusinessAndTeamHubData { + orders: ({ + id: UUIDString; + eventName?: string | null; + orderType: OrderType; + status: OrderStatus; + duration?: OrderDuration | null; + businessId: UUIDString; + vendorId?: UUIDString | null; + teamHubId: UUIDString; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + requested?: number | null; + total?: number | null; + notes?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Order_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listOrdersByBusinessAndTeamHub`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListOrdersByBusinessAndTeamHubVariables } from '@dataconnect/generated'; +import { useListOrdersByBusinessAndTeamHub } from '@dataconnect/generated/react' + +export default function ListOrdersByBusinessAndTeamHubComponent() { + // The `useListOrdersByBusinessAndTeamHub` Query hook requires an argument of type `ListOrdersByBusinessAndTeamHubVariables`: + const listOrdersByBusinessAndTeamHubVars: ListOrdersByBusinessAndTeamHubVariables = { + businessId: ..., + teamHubId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListOrdersByBusinessAndTeamHub(listOrdersByBusinessAndTeamHubVars); + // Variables can be defined inline as well. + const query = useListOrdersByBusinessAndTeamHub({ businessId: ..., teamHubId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListOrdersByBusinessAndTeamHub(dataConnect, listOrdersByBusinessAndTeamHubVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListOrdersByBusinessAndTeamHub(listOrdersByBusinessAndTeamHubVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListOrdersByBusinessAndTeamHub(dataConnect, listOrdersByBusinessAndTeamHubVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.orders); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffRoles +You can execute the `listStaffRoles` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffRoles(dc: DataConnect, vars?: ListStaffRolesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffRoles(vars?: ListStaffRolesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffRoles` Query has an optional argument of type `ListStaffRolesVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffRolesVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listStaffRoles` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffRoles` Query is of type `ListStaffRolesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffRolesData { + staffRoles: ({ + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + staff: { + id: UUIDString; + fullName: string; + userId: string; + email?: string | null; + phone?: string | null; + } & Staff_Key; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + } & StaffRole_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffRoles`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffRolesVariables } from '@dataconnect/generated'; +import { useListStaffRoles } from '@dataconnect/generated/react' + +export default function ListStaffRolesComponent() { + // The `useListStaffRoles` Query hook has an optional argument of type `ListStaffRolesVariables`: + const listStaffRolesVars: ListStaffRolesVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffRoles(listStaffRolesVars); + // Variables can be defined inline as well. + const query = useListStaffRoles({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListStaffRolesVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListStaffRoles(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffRoles(dataConnect, listStaffRolesVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffRoles(listStaffRolesVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListStaffRoles(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffRoles(dataConnect, listStaffRolesVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffRoles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getStaffRoleByKey +You can execute the `getStaffRoleByKey` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetStaffRoleByKey(dc: DataConnect, vars: GetStaffRoleByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetStaffRoleByKey(vars: GetStaffRoleByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getStaffRoleByKey` Query requires an argument of type `GetStaffRoleByKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetStaffRoleByKeyVariables { + staffId: UUIDString; + roleId: UUIDString; +} +``` +### Return Type +Recall that calling the `getStaffRoleByKey` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getStaffRoleByKey` Query is of type `GetStaffRoleByKeyData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetStaffRoleByKeyData { + staffRole?: { + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + staff: { + id: UUIDString; + fullName: string; + userId: string; + email?: string | null; + phone?: string | null; + } & Staff_Key; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + } & StaffRole_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getStaffRoleByKey`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetStaffRoleByKeyVariables } from '@dataconnect/generated'; +import { useGetStaffRoleByKey } from '@dataconnect/generated/react' + +export default function GetStaffRoleByKeyComponent() { + // The `useGetStaffRoleByKey` Query hook requires an argument of type `GetStaffRoleByKeyVariables`: + const getStaffRoleByKeyVars: GetStaffRoleByKeyVariables = { + staffId: ..., + roleId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetStaffRoleByKey(getStaffRoleByKeyVars); + // Variables can be defined inline as well. + const query = useGetStaffRoleByKey({ staffId: ..., roleId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetStaffRoleByKey(dataConnect, getStaffRoleByKeyVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffRoleByKey(getStaffRoleByKeyVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffRoleByKey(dataConnect, getStaffRoleByKeyVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffRole); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffRolesByStaffId +You can execute the `listStaffRolesByStaffId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffRolesByStaffId(dc: DataConnect, vars: ListStaffRolesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffRolesByStaffId(vars: ListStaffRolesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffRolesByStaffId` Query requires an argument of type `ListStaffRolesByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffRolesByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listStaffRolesByStaffId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffRolesByStaffId` Query is of type `ListStaffRolesByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffRolesByStaffIdData { + staffRoles: ({ + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + } & StaffRole_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffRolesByStaffId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffRolesByStaffIdVariables } from '@dataconnect/generated'; +import { useListStaffRolesByStaffId } from '@dataconnect/generated/react' + +export default function ListStaffRolesByStaffIdComponent() { + // The `useListStaffRolesByStaffId` Query hook requires an argument of type `ListStaffRolesByStaffIdVariables`: + const listStaffRolesByStaffIdVars: ListStaffRolesByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffRolesByStaffId(listStaffRolesByStaffIdVars); + // Variables can be defined inline as well. + const query = useListStaffRolesByStaffId({ staffId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffRolesByStaffId(dataConnect, listStaffRolesByStaffIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffRolesByStaffId(listStaffRolesByStaffIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffRolesByStaffId(dataConnect, listStaffRolesByStaffIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffRoles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffRolesByRoleId +You can execute the `listStaffRolesByRoleId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffRolesByRoleId(dc: DataConnect, vars: ListStaffRolesByRoleIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffRolesByRoleId(vars: ListStaffRolesByRoleIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffRolesByRoleId` Query requires an argument of type `ListStaffRolesByRoleIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffRolesByRoleIdVariables { + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listStaffRolesByRoleId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffRolesByRoleId` Query is of type `ListStaffRolesByRoleIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffRolesByRoleIdData { + staffRoles: ({ + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + staff: { + id: UUIDString; + fullName: string; + userId: string; + email?: string | null; + phone?: string | null; + } & Staff_Key; + } & StaffRole_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffRolesByRoleId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffRolesByRoleIdVariables } from '@dataconnect/generated'; +import { useListStaffRolesByRoleId } from '@dataconnect/generated/react' + +export default function ListStaffRolesByRoleIdComponent() { + // The `useListStaffRolesByRoleId` Query hook requires an argument of type `ListStaffRolesByRoleIdVariables`: + const listStaffRolesByRoleIdVars: ListStaffRolesByRoleIdVariables = { + roleId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffRolesByRoleId(listStaffRolesByRoleIdVars); + // Variables can be defined inline as well. + const query = useListStaffRolesByRoleId({ roleId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffRolesByRoleId(dataConnect, listStaffRolesByRoleIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffRolesByRoleId(listStaffRolesByRoleIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffRolesByRoleId(dataConnect, listStaffRolesByRoleIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffRoles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterStaffRoles +You can execute the `filterStaffRoles` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterStaffRoles(dc: DataConnect, vars?: FilterStaffRolesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterStaffRoles(vars?: FilterStaffRolesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterStaffRoles` Query has an optional argument of type `FilterStaffRolesVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterStaffRolesVariables { + staffId?: UUIDString | null; + roleId?: UUIDString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `filterStaffRoles` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterStaffRoles` Query is of type `FilterStaffRolesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterStaffRolesData { + staffRoles: ({ + id: UUIDString; + staffId: UUIDString; + roleId: UUIDString; + createdAt?: TimestampString | null; + roleType?: RoleType | null; + } & StaffRole_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterStaffRoles`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterStaffRolesVariables } from '@dataconnect/generated'; +import { useFilterStaffRoles } from '@dataconnect/generated/react' + +export default function FilterStaffRolesComponent() { + // The `useFilterStaffRoles` Query hook has an optional argument of type `FilterStaffRolesVariables`: + const filterStaffRolesVars: FilterStaffRolesVariables = { + staffId: ..., // optional + roleId: ..., // optional + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterStaffRoles(filterStaffRolesVars); + // Variables can be defined inline as well. + const query = useFilterStaffRoles({ staffId: ..., roleId: ..., offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterStaffRolesVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterStaffRoles(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterStaffRoles(dataConnect, filterStaffRolesVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterStaffRoles(filterStaffRolesVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterStaffRoles(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterStaffRoles(dataConnect, filterStaffRolesVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffRoles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listTaskComments +You can execute the `listTaskComments` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListTaskComments(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListTaskComments(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listTaskComments` Query has no variables. +### Return Type +Recall that calling the `listTaskComments` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listTaskComments` Query is of type `ListTaskCommentsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListTaskCommentsData { + taskComments: ({ + id: UUIDString; + taskId: UUIDString; + teamMemberId: UUIDString; + comment: string; + isSystem: boolean; + createdAt?: TimestampString | null; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + } & TaskComment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listTaskComments`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListTaskComments } from '@dataconnect/generated/react' + +export default function ListTaskCommentsComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListTaskComments(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListTaskComments(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListTaskComments(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListTaskComments(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.taskComments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getTaskCommentById +You can execute the `getTaskCommentById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetTaskCommentById(dc: DataConnect, vars: GetTaskCommentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetTaskCommentById(vars: GetTaskCommentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getTaskCommentById` Query requires an argument of type `GetTaskCommentByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetTaskCommentByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getTaskCommentById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getTaskCommentById` Query is of type `GetTaskCommentByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetTaskCommentByIdData { + taskComment?: { + id: UUIDString; + taskId: UUIDString; + teamMemberId: UUIDString; + comment: string; + isSystem: boolean; + createdAt?: TimestampString | null; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + } & TaskComment_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getTaskCommentById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetTaskCommentByIdVariables } from '@dataconnect/generated'; +import { useGetTaskCommentById } from '@dataconnect/generated/react' + +export default function GetTaskCommentByIdComponent() { + // The `useGetTaskCommentById` Query hook requires an argument of type `GetTaskCommentByIdVariables`: + const getTaskCommentByIdVars: GetTaskCommentByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetTaskCommentById(getTaskCommentByIdVars); + // Variables can be defined inline as well. + const query = useGetTaskCommentById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetTaskCommentById(dataConnect, getTaskCommentByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetTaskCommentById(getTaskCommentByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetTaskCommentById(dataConnect, getTaskCommentByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.taskComment); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getTaskCommentsByTaskId +You can execute the `getTaskCommentsByTaskId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetTaskCommentsByTaskId(dc: DataConnect, vars: GetTaskCommentsByTaskIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetTaskCommentsByTaskId(vars: GetTaskCommentsByTaskIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getTaskCommentsByTaskId` Query requires an argument of type `GetTaskCommentsByTaskIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetTaskCommentsByTaskIdVariables { + taskId: UUIDString; +} +``` +### Return Type +Recall that calling the `getTaskCommentsByTaskId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getTaskCommentsByTaskId` Query is of type `GetTaskCommentsByTaskIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetTaskCommentsByTaskIdData { + taskComments: ({ + id: UUIDString; + taskId: UUIDString; + teamMemberId: UUIDString; + comment: string; + isSystem: boolean; + createdAt?: TimestampString | null; + teamMember: { + user: { + fullName?: string | null; + email?: string | null; + }; + }; + } & TaskComment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getTaskCommentsByTaskId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetTaskCommentsByTaskIdVariables } from '@dataconnect/generated'; +import { useGetTaskCommentsByTaskId } from '@dataconnect/generated/react' + +export default function GetTaskCommentsByTaskIdComponent() { + // The `useGetTaskCommentsByTaskId` Query hook requires an argument of type `GetTaskCommentsByTaskIdVariables`: + const getTaskCommentsByTaskIdVars: GetTaskCommentsByTaskIdVariables = { + taskId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetTaskCommentsByTaskId(getTaskCommentsByTaskIdVars); + // Variables can be defined inline as well. + const query = useGetTaskCommentsByTaskId({ taskId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetTaskCommentsByTaskId(dataConnect, getTaskCommentsByTaskIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetTaskCommentsByTaskId(getTaskCommentsByTaskIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetTaskCommentsByTaskId(dataConnect, getTaskCommentsByTaskIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.taskComments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listDocuments +You can execute the `listDocuments` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListDocuments(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListDocuments(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listDocuments` Query has no variables. +### Return Type +Recall that calling the `listDocuments` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listDocuments` Query is of type `ListDocumentsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListDocumentsData { + documents: ({ + id: UUIDString; + documentType: DocumentType; + name: string; + description?: string | null; + createdAt?: TimestampString | null; + } & Document_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listDocuments`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListDocuments } from '@dataconnect/generated/react' + +export default function ListDocumentsComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListDocuments(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListDocuments(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListDocuments(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListDocuments(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.documents); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getDocumentById +You can execute the `getDocumentById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetDocumentById(dc: DataConnect, vars: GetDocumentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetDocumentById(vars: GetDocumentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getDocumentById` Query requires an argument of type `GetDocumentByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetDocumentByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getDocumentById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getDocumentById` Query is of type `GetDocumentByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetDocumentByIdData { + document?: { + id: UUIDString; + documentType: DocumentType; + name: string; + description?: string | null; + createdAt?: TimestampString | null; + } & Document_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getDocumentById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetDocumentByIdVariables } from '@dataconnect/generated'; +import { useGetDocumentById } from '@dataconnect/generated/react' + +export default function GetDocumentByIdComponent() { + // The `useGetDocumentById` Query hook requires an argument of type `GetDocumentByIdVariables`: + const getDocumentByIdVars: GetDocumentByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetDocumentById(getDocumentByIdVars); + // Variables can be defined inline as well. + const query = useGetDocumentById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetDocumentById(dataConnect, getDocumentByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetDocumentById(getDocumentByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetDocumentById(dataConnect, getDocumentByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.document); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterDocuments +You can execute the `filterDocuments` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterDocuments(dc: DataConnect, vars?: FilterDocumentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterDocuments(vars?: FilterDocumentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterDocuments` Query has an optional argument of type `FilterDocumentsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterDocumentsVariables { + documentType?: DocumentType | null; +} +``` +### Return Type +Recall that calling the `filterDocuments` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterDocuments` Query is of type `FilterDocumentsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterDocumentsData { + documents: ({ + id: UUIDString; + documentType: DocumentType; + name: string; + description?: string | null; + createdAt?: TimestampString | null; + } & Document_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterDocuments`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterDocumentsVariables } from '@dataconnect/generated'; +import { useFilterDocuments } from '@dataconnect/generated/react' + +export default function FilterDocumentsComponent() { + // The `useFilterDocuments` Query hook has an optional argument of type `FilterDocumentsVariables`: + const filterDocumentsVars: FilterDocumentsVariables = { + documentType: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterDocuments(filterDocumentsVars); + // Variables can be defined inline as well. + const query = useFilterDocuments({ documentType: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterDocumentsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterDocuments(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterDocuments(dataConnect, filterDocumentsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterDocuments(filterDocumentsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterDocuments(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterDocuments(dataConnect, filterDocumentsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.documents); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftsForCoverage +You can execute the `listShiftsForCoverage` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftsForCoverage(dc: DataConnect, vars: ListShiftsForCoverageVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftsForCoverage(vars: ListShiftsForCoverageVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftsForCoverage` Query requires an argument of type `ListShiftsForCoverageVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftsForCoverageVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that calling the `listShiftsForCoverage` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftsForCoverage` Query is of type `ListShiftsForCoverageData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftsForCoverageData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftsForCoverage`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftsForCoverageVariables } from '@dataconnect/generated'; +import { useListShiftsForCoverage } from '@dataconnect/generated/react' + +export default function ListShiftsForCoverageComponent() { + // The `useListShiftsForCoverage` Query hook requires an argument of type `ListShiftsForCoverageVariables`: + const listShiftsForCoverageVars: ListShiftsForCoverageVariables = { + businessId: ..., + startDate: ..., + endDate: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftsForCoverage(listShiftsForCoverageVars); + // Variables can be defined inline as well. + const query = useListShiftsForCoverage({ businessId: ..., startDate: ..., endDate: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftsForCoverage(dataConnect, listShiftsForCoverageVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForCoverage(listShiftsForCoverageVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForCoverage(dataConnect, listShiftsForCoverageVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listApplicationsForCoverage +You can execute the `listApplicationsForCoverage` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListApplicationsForCoverage(dc: DataConnect, vars: ListApplicationsForCoverageVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListApplicationsForCoverage(vars: ListApplicationsForCoverageVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listApplicationsForCoverage` Query requires an argument of type `ListApplicationsForCoverageVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListApplicationsForCoverageVariables { + shiftIds: UUIDString[]; +} +``` +### Return Type +Recall that calling the `listApplicationsForCoverage` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listApplicationsForCoverage` Query is of type `ListApplicationsForCoverageData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListApplicationsForCoverageData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listApplicationsForCoverage`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListApplicationsForCoverageVariables } from '@dataconnect/generated'; +import { useListApplicationsForCoverage } from '@dataconnect/generated/react' + +export default function ListApplicationsForCoverageComponent() { + // The `useListApplicationsForCoverage` Query hook requires an argument of type `ListApplicationsForCoverageVariables`: + const listApplicationsForCoverageVars: ListApplicationsForCoverageVariables = { + shiftIds: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListApplicationsForCoverage(listApplicationsForCoverageVars); + // Variables can be defined inline as well. + const query = useListApplicationsForCoverage({ shiftIds: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListApplicationsForCoverage(dataConnect, listApplicationsForCoverageVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListApplicationsForCoverage(listApplicationsForCoverageVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListApplicationsForCoverage(dataConnect, listApplicationsForCoverageVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftsForDailyOpsByBusiness +You can execute the `listShiftsForDailyOpsByBusiness` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftsForDailyOpsByBusiness(dc: DataConnect, vars: ListShiftsForDailyOpsByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftsForDailyOpsByBusiness(vars: ListShiftsForDailyOpsByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftsForDailyOpsByBusiness` Query requires an argument of type `ListShiftsForDailyOpsByBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftsForDailyOpsByBusinessVariables { + businessId: UUIDString; + date: TimestampString; +} +``` +### Return Type +Recall that calling the `listShiftsForDailyOpsByBusiness` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftsForDailyOpsByBusiness` Query is of type `ListShiftsForDailyOpsByBusinessData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftsForDailyOpsByBusinessData { + shifts: ({ + id: UUIDString; + title: string; + location?: string | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftsForDailyOpsByBusiness`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftsForDailyOpsByBusinessVariables } from '@dataconnect/generated'; +import { useListShiftsForDailyOpsByBusiness } from '@dataconnect/generated/react' + +export default function ListShiftsForDailyOpsByBusinessComponent() { + // The `useListShiftsForDailyOpsByBusiness` Query hook requires an argument of type `ListShiftsForDailyOpsByBusinessVariables`: + const listShiftsForDailyOpsByBusinessVars: ListShiftsForDailyOpsByBusinessVariables = { + businessId: ..., + date: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftsForDailyOpsByBusiness(listShiftsForDailyOpsByBusinessVars); + // Variables can be defined inline as well. + const query = useListShiftsForDailyOpsByBusiness({ businessId: ..., date: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftsForDailyOpsByBusiness(dataConnect, listShiftsForDailyOpsByBusinessVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForDailyOpsByBusiness(listShiftsForDailyOpsByBusinessVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForDailyOpsByBusiness(dataConnect, listShiftsForDailyOpsByBusinessVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftsForDailyOpsByVendor +You can execute the `listShiftsForDailyOpsByVendor` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftsForDailyOpsByVendor(dc: DataConnect, vars: ListShiftsForDailyOpsByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftsForDailyOpsByVendor(vars: ListShiftsForDailyOpsByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftsForDailyOpsByVendor` Query requires an argument of type `ListShiftsForDailyOpsByVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftsForDailyOpsByVendorVariables { + vendorId: UUIDString; + date: TimestampString; +} +``` +### Return Type +Recall that calling the `listShiftsForDailyOpsByVendor` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftsForDailyOpsByVendor` Query is of type `ListShiftsForDailyOpsByVendorData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftsForDailyOpsByVendorData { + shifts: ({ + id: UUIDString; + title: string; + location?: string | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftsForDailyOpsByVendor`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftsForDailyOpsByVendorVariables } from '@dataconnect/generated'; +import { useListShiftsForDailyOpsByVendor } from '@dataconnect/generated/react' + +export default function ListShiftsForDailyOpsByVendorComponent() { + // The `useListShiftsForDailyOpsByVendor` Query hook requires an argument of type `ListShiftsForDailyOpsByVendorVariables`: + const listShiftsForDailyOpsByVendorVars: ListShiftsForDailyOpsByVendorVariables = { + vendorId: ..., + date: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftsForDailyOpsByVendor(listShiftsForDailyOpsByVendorVars); + // Variables can be defined inline as well. + const query = useListShiftsForDailyOpsByVendor({ vendorId: ..., date: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftsForDailyOpsByVendor(dataConnect, listShiftsForDailyOpsByVendorVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForDailyOpsByVendor(listShiftsForDailyOpsByVendorVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForDailyOpsByVendor(dataConnect, listShiftsForDailyOpsByVendorVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listApplicationsForDailyOps +You can execute the `listApplicationsForDailyOps` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListApplicationsForDailyOps(dc: DataConnect, vars: ListApplicationsForDailyOpsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListApplicationsForDailyOps(vars: ListApplicationsForDailyOpsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listApplicationsForDailyOps` Query requires an argument of type `ListApplicationsForDailyOpsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListApplicationsForDailyOpsVariables { + shiftIds: UUIDString[]; +} +``` +### Return Type +Recall that calling the `listApplicationsForDailyOps` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listApplicationsForDailyOps` Query is of type `ListApplicationsForDailyOpsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListApplicationsForDailyOpsData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listApplicationsForDailyOps`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListApplicationsForDailyOpsVariables } from '@dataconnect/generated'; +import { useListApplicationsForDailyOps } from '@dataconnect/generated/react' + +export default function ListApplicationsForDailyOpsComponent() { + // The `useListApplicationsForDailyOps` Query hook requires an argument of type `ListApplicationsForDailyOpsVariables`: + const listApplicationsForDailyOpsVars: ListApplicationsForDailyOpsVariables = { + shiftIds: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListApplicationsForDailyOps(listApplicationsForDailyOpsVars); + // Variables can be defined inline as well. + const query = useListApplicationsForDailyOps({ shiftIds: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListApplicationsForDailyOps(dataConnect, listApplicationsForDailyOpsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListApplicationsForDailyOps(listApplicationsForDailyOpsVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListApplicationsForDailyOps(dataConnect, listApplicationsForDailyOpsVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftsForForecastByBusiness +You can execute the `listShiftsForForecastByBusiness` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftsForForecastByBusiness(dc: DataConnect, vars: ListShiftsForForecastByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftsForForecastByBusiness(vars: ListShiftsForForecastByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftsForForecastByBusiness` Query requires an argument of type `ListShiftsForForecastByBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftsForForecastByBusinessVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that calling the `listShiftsForForecastByBusiness` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftsForForecastByBusiness` Query is of type `ListShiftsForForecastByBusinessData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftsForForecastByBusinessData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + workersNeeded?: number | null; + hours?: number | null; + cost?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftsForForecastByBusiness`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftsForForecastByBusinessVariables } from '@dataconnect/generated'; +import { useListShiftsForForecastByBusiness } from '@dataconnect/generated/react' + +export default function ListShiftsForForecastByBusinessComponent() { + // The `useListShiftsForForecastByBusiness` Query hook requires an argument of type `ListShiftsForForecastByBusinessVariables`: + const listShiftsForForecastByBusinessVars: ListShiftsForForecastByBusinessVariables = { + businessId: ..., + startDate: ..., + endDate: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftsForForecastByBusiness(listShiftsForForecastByBusinessVars); + // Variables can be defined inline as well. + const query = useListShiftsForForecastByBusiness({ businessId: ..., startDate: ..., endDate: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftsForForecastByBusiness(dataConnect, listShiftsForForecastByBusinessVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForForecastByBusiness(listShiftsForForecastByBusinessVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForForecastByBusiness(dataConnect, listShiftsForForecastByBusinessVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftsForForecastByVendor +You can execute the `listShiftsForForecastByVendor` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftsForForecastByVendor(dc: DataConnect, vars: ListShiftsForForecastByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftsForForecastByVendor(vars: ListShiftsForForecastByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftsForForecastByVendor` Query requires an argument of type `ListShiftsForForecastByVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftsForForecastByVendorVariables { + vendorId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that calling the `listShiftsForForecastByVendor` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftsForForecastByVendor` Query is of type `ListShiftsForForecastByVendorData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftsForForecastByVendorData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + workersNeeded?: number | null; + hours?: number | null; + cost?: number | null; + status?: ShiftStatus | null; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftsForForecastByVendor`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftsForForecastByVendorVariables } from '@dataconnect/generated'; +import { useListShiftsForForecastByVendor } from '@dataconnect/generated/react' + +export default function ListShiftsForForecastByVendorComponent() { + // The `useListShiftsForForecastByVendor` Query hook requires an argument of type `ListShiftsForForecastByVendorVariables`: + const listShiftsForForecastByVendorVars: ListShiftsForForecastByVendorVariables = { + vendorId: ..., + startDate: ..., + endDate: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftsForForecastByVendor(listShiftsForForecastByVendorVars); + // Variables can be defined inline as well. + const query = useListShiftsForForecastByVendor({ vendorId: ..., startDate: ..., endDate: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftsForForecastByVendor(dataConnect, listShiftsForForecastByVendorVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForForecastByVendor(listShiftsForForecastByVendorVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForForecastByVendor(dataConnect, listShiftsForForecastByVendorVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftsForNoShowRangeByBusiness +You can execute the `listShiftsForNoShowRangeByBusiness` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftsForNoShowRangeByBusiness(dc: DataConnect, vars: ListShiftsForNoShowRangeByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftsForNoShowRangeByBusiness(vars: ListShiftsForNoShowRangeByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftsForNoShowRangeByBusiness` Query requires an argument of type `ListShiftsForNoShowRangeByBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftsForNoShowRangeByBusinessVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that calling the `listShiftsForNoShowRangeByBusiness` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftsForNoShowRangeByBusiness` Query is of type `ListShiftsForNoShowRangeByBusinessData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftsForNoShowRangeByBusinessData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftsForNoShowRangeByBusiness`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftsForNoShowRangeByBusinessVariables } from '@dataconnect/generated'; +import { useListShiftsForNoShowRangeByBusiness } from '@dataconnect/generated/react' + +export default function ListShiftsForNoShowRangeByBusinessComponent() { + // The `useListShiftsForNoShowRangeByBusiness` Query hook requires an argument of type `ListShiftsForNoShowRangeByBusinessVariables`: + const listShiftsForNoShowRangeByBusinessVars: ListShiftsForNoShowRangeByBusinessVariables = { + businessId: ..., + startDate: ..., + endDate: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftsForNoShowRangeByBusiness(listShiftsForNoShowRangeByBusinessVars); + // Variables can be defined inline as well. + const query = useListShiftsForNoShowRangeByBusiness({ businessId: ..., startDate: ..., endDate: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftsForNoShowRangeByBusiness(dataConnect, listShiftsForNoShowRangeByBusinessVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForNoShowRangeByBusiness(listShiftsForNoShowRangeByBusinessVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForNoShowRangeByBusiness(dataConnect, listShiftsForNoShowRangeByBusinessVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftsForNoShowRangeByVendor +You can execute the `listShiftsForNoShowRangeByVendor` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftsForNoShowRangeByVendor(dc: DataConnect, vars: ListShiftsForNoShowRangeByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftsForNoShowRangeByVendor(vars: ListShiftsForNoShowRangeByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftsForNoShowRangeByVendor` Query requires an argument of type `ListShiftsForNoShowRangeByVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftsForNoShowRangeByVendorVariables { + vendorId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that calling the `listShiftsForNoShowRangeByVendor` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftsForNoShowRangeByVendor` Query is of type `ListShiftsForNoShowRangeByVendorData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftsForNoShowRangeByVendorData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftsForNoShowRangeByVendor`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftsForNoShowRangeByVendorVariables } from '@dataconnect/generated'; +import { useListShiftsForNoShowRangeByVendor } from '@dataconnect/generated/react' + +export default function ListShiftsForNoShowRangeByVendorComponent() { + // The `useListShiftsForNoShowRangeByVendor` Query hook requires an argument of type `ListShiftsForNoShowRangeByVendorVariables`: + const listShiftsForNoShowRangeByVendorVars: ListShiftsForNoShowRangeByVendorVariables = { + vendorId: ..., + startDate: ..., + endDate: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftsForNoShowRangeByVendor(listShiftsForNoShowRangeByVendorVars); + // Variables can be defined inline as well. + const query = useListShiftsForNoShowRangeByVendor({ vendorId: ..., startDate: ..., endDate: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftsForNoShowRangeByVendor(dataConnect, listShiftsForNoShowRangeByVendorVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForNoShowRangeByVendor(listShiftsForNoShowRangeByVendorVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForNoShowRangeByVendor(dataConnect, listShiftsForNoShowRangeByVendorVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listApplicationsForNoShowRange +You can execute the `listApplicationsForNoShowRange` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListApplicationsForNoShowRange(dc: DataConnect, vars: ListApplicationsForNoShowRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListApplicationsForNoShowRange(vars: ListApplicationsForNoShowRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listApplicationsForNoShowRange` Query requires an argument of type `ListApplicationsForNoShowRangeVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListApplicationsForNoShowRangeVariables { + shiftIds: UUIDString[]; +} +``` +### Return Type +Recall that calling the `listApplicationsForNoShowRange` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listApplicationsForNoShowRange` Query is of type `ListApplicationsForNoShowRangeData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListApplicationsForNoShowRangeData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listApplicationsForNoShowRange`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListApplicationsForNoShowRangeVariables } from '@dataconnect/generated'; +import { useListApplicationsForNoShowRange } from '@dataconnect/generated/react' + +export default function ListApplicationsForNoShowRangeComponent() { + // The `useListApplicationsForNoShowRange` Query hook requires an argument of type `ListApplicationsForNoShowRangeVariables`: + const listApplicationsForNoShowRangeVars: ListApplicationsForNoShowRangeVariables = { + shiftIds: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListApplicationsForNoShowRange(listApplicationsForNoShowRangeVars); + // Variables can be defined inline as well. + const query = useListApplicationsForNoShowRange({ shiftIds: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListApplicationsForNoShowRange(dataConnect, listApplicationsForNoShowRangeVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListApplicationsForNoShowRange(listApplicationsForNoShowRangeVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListApplicationsForNoShowRange(dataConnect, listApplicationsForNoShowRangeVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffForNoShowReport +You can execute the `listStaffForNoShowReport` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffForNoShowReport(dc: DataConnect, vars: ListStaffForNoShowReportVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffForNoShowReport(vars: ListStaffForNoShowReportVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffForNoShowReport` Query requires an argument of type `ListStaffForNoShowReportVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffForNoShowReportVariables { + staffIds: UUIDString[]; +} +``` +### Return Type +Recall that calling the `listStaffForNoShowReport` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffForNoShowReport` Query is of type `ListStaffForNoShowReportData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffForNoShowReportData { + staffs: ({ + id: UUIDString; + fullName: string; + noShowCount?: number | null; + reliabilityScore?: number | null; + } & Staff_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffForNoShowReport`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffForNoShowReportVariables } from '@dataconnect/generated'; +import { useListStaffForNoShowReport } from '@dataconnect/generated/react' + +export default function ListStaffForNoShowReportComponent() { + // The `useListStaffForNoShowReport` Query hook requires an argument of type `ListStaffForNoShowReportVariables`: + const listStaffForNoShowReportVars: ListStaffForNoShowReportVariables = { + staffIds: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffForNoShowReport(listStaffForNoShowReportVars); + // Variables can be defined inline as well. + const query = useListStaffForNoShowReport({ staffIds: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffForNoShowReport(dataConnect, listStaffForNoShowReportVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffForNoShowReport(listStaffForNoShowReportVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffForNoShowReport(dataConnect, listStaffForNoShowReportVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listInvoicesForSpendByBusiness +You can execute the `listInvoicesForSpendByBusiness` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListInvoicesForSpendByBusiness(dc: DataConnect, vars: ListInvoicesForSpendByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListInvoicesForSpendByBusiness(vars: ListInvoicesForSpendByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listInvoicesForSpendByBusiness` Query requires an argument of type `ListInvoicesForSpendByBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListInvoicesForSpendByBusinessVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that calling the `listInvoicesForSpendByBusiness` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listInvoicesForSpendByBusiness` Query is of type `ListInvoicesForSpendByBusinessData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListInvoicesForSpendByBusinessData { + invoices: ({ + id: UUIDString; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + status: InvoiceStatus; + invoiceNumber: string; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + } & Invoice_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listInvoicesForSpendByBusiness`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListInvoicesForSpendByBusinessVariables } from '@dataconnect/generated'; +import { useListInvoicesForSpendByBusiness } from '@dataconnect/generated/react' + +export default function ListInvoicesForSpendByBusinessComponent() { + // The `useListInvoicesForSpendByBusiness` Query hook requires an argument of type `ListInvoicesForSpendByBusinessVariables`: + const listInvoicesForSpendByBusinessVars: ListInvoicesForSpendByBusinessVariables = { + businessId: ..., + startDate: ..., + endDate: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListInvoicesForSpendByBusiness(listInvoicesForSpendByBusinessVars); + // Variables can be defined inline as well. + const query = useListInvoicesForSpendByBusiness({ businessId: ..., startDate: ..., endDate: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListInvoicesForSpendByBusiness(dataConnect, listInvoicesForSpendByBusinessVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesForSpendByBusiness(listInvoicesForSpendByBusinessVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesForSpendByBusiness(dataConnect, listInvoicesForSpendByBusinessVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoices); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listInvoicesForSpendByVendor +You can execute the `listInvoicesForSpendByVendor` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListInvoicesForSpendByVendor(dc: DataConnect, vars: ListInvoicesForSpendByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListInvoicesForSpendByVendor(vars: ListInvoicesForSpendByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listInvoicesForSpendByVendor` Query requires an argument of type `ListInvoicesForSpendByVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListInvoicesForSpendByVendorVariables { + vendorId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that calling the `listInvoicesForSpendByVendor` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listInvoicesForSpendByVendor` Query is of type `ListInvoicesForSpendByVendorData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListInvoicesForSpendByVendorData { + invoices: ({ + id: UUIDString; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + status: InvoiceStatus; + invoiceNumber: string; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + } & Invoice_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listInvoicesForSpendByVendor`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListInvoicesForSpendByVendorVariables } from '@dataconnect/generated'; +import { useListInvoicesForSpendByVendor } from '@dataconnect/generated/react' + +export default function ListInvoicesForSpendByVendorComponent() { + // The `useListInvoicesForSpendByVendor` Query hook requires an argument of type `ListInvoicesForSpendByVendorVariables`: + const listInvoicesForSpendByVendorVars: ListInvoicesForSpendByVendorVariables = { + vendorId: ..., + startDate: ..., + endDate: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListInvoicesForSpendByVendor(listInvoicesForSpendByVendorVars); + // Variables can be defined inline as well. + const query = useListInvoicesForSpendByVendor({ vendorId: ..., startDate: ..., endDate: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListInvoicesForSpendByVendor(dataConnect, listInvoicesForSpendByVendorVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesForSpendByVendor(listInvoicesForSpendByVendorVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesForSpendByVendor(dataConnect, listInvoicesForSpendByVendorVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoices); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listInvoicesForSpendByOrder +You can execute the `listInvoicesForSpendByOrder` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListInvoicesForSpendByOrder(dc: DataConnect, vars: ListInvoicesForSpendByOrderVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListInvoicesForSpendByOrder(vars: ListInvoicesForSpendByOrderVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listInvoicesForSpendByOrder` Query requires an argument of type `ListInvoicesForSpendByOrderVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListInvoicesForSpendByOrderVariables { + orderId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that calling the `listInvoicesForSpendByOrder` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listInvoicesForSpendByOrder` Query is of type `ListInvoicesForSpendByOrderData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListInvoicesForSpendByOrderData { + invoices: ({ + id: UUIDString; + issueDate: TimestampString; + dueDate: TimestampString; + amount: number; + status: InvoiceStatus; + invoiceNumber: string; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + } & Invoice_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listInvoicesForSpendByOrder`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListInvoicesForSpendByOrderVariables } from '@dataconnect/generated'; +import { useListInvoicesForSpendByOrder } from '@dataconnect/generated/react' + +export default function ListInvoicesForSpendByOrderComponent() { + // The `useListInvoicesForSpendByOrder` Query hook requires an argument of type `ListInvoicesForSpendByOrderVariables`: + const listInvoicesForSpendByOrderVars: ListInvoicesForSpendByOrderVariables = { + orderId: ..., + startDate: ..., + endDate: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListInvoicesForSpendByOrder(listInvoicesForSpendByOrderVars); + // Variables can be defined inline as well. + const query = useListInvoicesForSpendByOrder({ orderId: ..., startDate: ..., endDate: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListInvoicesForSpendByOrder(dataConnect, listInvoicesForSpendByOrderVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesForSpendByOrder(listInvoicesForSpendByOrderVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesForSpendByOrder(dataConnect, listInvoicesForSpendByOrderVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoices); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listTimesheetsForSpend +You can execute the `listTimesheetsForSpend` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListTimesheetsForSpend(dc: DataConnect, vars: ListTimesheetsForSpendVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListTimesheetsForSpend(vars: ListTimesheetsForSpendVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listTimesheetsForSpend` Query requires an argument of type `ListTimesheetsForSpendVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListTimesheetsForSpendVariables { + startTime: TimestampString; + endTime: TimestampString; +} +``` +### Return Type +Recall that calling the `listTimesheetsForSpend` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listTimesheetsForSpend` Query is of type `ListTimesheetsForSpendData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListTimesheetsForSpendData { + shiftRoles: ({ + id: UUIDString; + hours?: number | null; + totalValue?: number | null; + shift: { + title: string; + location?: string | null; + status?: ShiftStatus | null; + date?: TimestampString | null; + order: { + business: { + businessName: string; + }; + }; + }; + role: { + costPerHour: number; + }; + })[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listTimesheetsForSpend`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListTimesheetsForSpendVariables } from '@dataconnect/generated'; +import { useListTimesheetsForSpend } from '@dataconnect/generated/react' + +export default function ListTimesheetsForSpendComponent() { + // The `useListTimesheetsForSpend` Query hook requires an argument of type `ListTimesheetsForSpendVariables`: + const listTimesheetsForSpendVars: ListTimesheetsForSpendVariables = { + startTime: ..., + endTime: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListTimesheetsForSpend(listTimesheetsForSpendVars); + // Variables can be defined inline as well. + const query = useListTimesheetsForSpend({ startTime: ..., endTime: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListTimesheetsForSpend(dataConnect, listTimesheetsForSpendVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListTimesheetsForSpend(listTimesheetsForSpendVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListTimesheetsForSpend(dataConnect, listTimesheetsForSpendVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shiftRoles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftsForPerformanceByBusiness +You can execute the `listShiftsForPerformanceByBusiness` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftsForPerformanceByBusiness(dc: DataConnect, vars: ListShiftsForPerformanceByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftsForPerformanceByBusiness(vars: ListShiftsForPerformanceByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftsForPerformanceByBusiness` Query requires an argument of type `ListShiftsForPerformanceByBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftsForPerformanceByBusinessVariables { + businessId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that calling the `listShiftsForPerformanceByBusiness` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftsForPerformanceByBusiness` Query is of type `ListShiftsForPerformanceByBusinessData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftsForPerformanceByBusinessData { + shifts: ({ + id: UUIDString; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + createdAt?: TimestampString | null; + filledAt?: TimestampString | null; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftsForPerformanceByBusiness`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftsForPerformanceByBusinessVariables } from '@dataconnect/generated'; +import { useListShiftsForPerformanceByBusiness } from '@dataconnect/generated/react' + +export default function ListShiftsForPerformanceByBusinessComponent() { + // The `useListShiftsForPerformanceByBusiness` Query hook requires an argument of type `ListShiftsForPerformanceByBusinessVariables`: + const listShiftsForPerformanceByBusinessVars: ListShiftsForPerformanceByBusinessVariables = { + businessId: ..., + startDate: ..., + endDate: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftsForPerformanceByBusiness(listShiftsForPerformanceByBusinessVars); + // Variables can be defined inline as well. + const query = useListShiftsForPerformanceByBusiness({ businessId: ..., startDate: ..., endDate: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftsForPerformanceByBusiness(dataConnect, listShiftsForPerformanceByBusinessVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForPerformanceByBusiness(listShiftsForPerformanceByBusinessVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForPerformanceByBusiness(dataConnect, listShiftsForPerformanceByBusinessVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftsForPerformanceByVendor +You can execute the `listShiftsForPerformanceByVendor` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftsForPerformanceByVendor(dc: DataConnect, vars: ListShiftsForPerformanceByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftsForPerformanceByVendor(vars: ListShiftsForPerformanceByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftsForPerformanceByVendor` Query requires an argument of type `ListShiftsForPerformanceByVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftsForPerformanceByVendorVariables { + vendorId: UUIDString; + startDate: TimestampString; + endDate: TimestampString; +} +``` +### Return Type +Recall that calling the `listShiftsForPerformanceByVendor` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftsForPerformanceByVendor` Query is of type `ListShiftsForPerformanceByVendorData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftsForPerformanceByVendorData { + shifts: ({ + id: UUIDString; + workersNeeded?: number | null; + filled?: number | null; + status?: ShiftStatus | null; + createdAt?: TimestampString | null; + filledAt?: TimestampString | null; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftsForPerformanceByVendor`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftsForPerformanceByVendorVariables } from '@dataconnect/generated'; +import { useListShiftsForPerformanceByVendor } from '@dataconnect/generated/react' + +export default function ListShiftsForPerformanceByVendorComponent() { + // The `useListShiftsForPerformanceByVendor` Query hook requires an argument of type `ListShiftsForPerformanceByVendorVariables`: + const listShiftsForPerformanceByVendorVars: ListShiftsForPerformanceByVendorVariables = { + vendorId: ..., + startDate: ..., + endDate: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftsForPerformanceByVendor(listShiftsForPerformanceByVendorVars); + // Variables can be defined inline as well. + const query = useListShiftsForPerformanceByVendor({ vendorId: ..., startDate: ..., endDate: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftsForPerformanceByVendor(dataConnect, listShiftsForPerformanceByVendorVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForPerformanceByVendor(listShiftsForPerformanceByVendorVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftsForPerformanceByVendor(dataConnect, listShiftsForPerformanceByVendorVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listApplicationsForPerformance +You can execute the `listApplicationsForPerformance` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListApplicationsForPerformance(dc: DataConnect, vars: ListApplicationsForPerformanceVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListApplicationsForPerformance(vars: ListApplicationsForPerformanceVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listApplicationsForPerformance` Query requires an argument of type `ListApplicationsForPerformanceVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListApplicationsForPerformanceVariables { + shiftIds: UUIDString[]; +} +``` +### Return Type +Recall that calling the `listApplicationsForPerformance` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listApplicationsForPerformance` Query is of type `ListApplicationsForPerformanceData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListApplicationsForPerformanceData { + applications: ({ + id: UUIDString; + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + } & Application_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listApplicationsForPerformance`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListApplicationsForPerformanceVariables } from '@dataconnect/generated'; +import { useListApplicationsForPerformance } from '@dataconnect/generated/react' + +export default function ListApplicationsForPerformanceComponent() { + // The `useListApplicationsForPerformance` Query hook requires an argument of type `ListApplicationsForPerformanceVariables`: + const listApplicationsForPerformanceVars: ListApplicationsForPerformanceVariables = { + shiftIds: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListApplicationsForPerformance(listApplicationsForPerformanceVars); + // Variables can be defined inline as well. + const query = useListApplicationsForPerformance({ shiftIds: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListApplicationsForPerformance(dataConnect, listApplicationsForPerformanceVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListApplicationsForPerformance(listApplicationsForPerformanceVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListApplicationsForPerformance(dataConnect, listApplicationsForPerformanceVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.applications); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffForPerformance +You can execute the `listStaffForPerformance` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffForPerformance(dc: DataConnect, vars: ListStaffForPerformanceVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffForPerformance(vars: ListStaffForPerformanceVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffForPerformance` Query requires an argument of type `ListStaffForPerformanceVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffForPerformanceVariables { + staffIds: UUIDString[]; +} +``` +### Return Type +Recall that calling the `listStaffForPerformance` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffForPerformance` Query is of type `ListStaffForPerformanceData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffForPerformanceData { + staffs: ({ + id: UUIDString; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + reliabilityScore?: number | null; + } & Staff_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffForPerformance`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffForPerformanceVariables } from '@dataconnect/generated'; +import { useListStaffForPerformance } from '@dataconnect/generated/react' + +export default function ListStaffForPerformanceComponent() { + // The `useListStaffForPerformance` Query hook requires an argument of type `ListStaffForPerformanceVariables`: + const listStaffForPerformanceVars: ListStaffForPerformanceVariables = { + staffIds: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffForPerformance(listStaffForPerformanceVars); + // Variables can be defined inline as well. + const query = useListStaffForPerformance({ staffIds: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffForPerformance(dataConnect, listStaffForPerformanceVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffForPerformance(listStaffForPerformanceVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffForPerformance(dataConnect, listStaffForPerformanceVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listRoles +You can execute the `listRoles` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListRoles(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListRoles(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listRoles` Query has no variables. +### Return Type +Recall that calling the `listRoles` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listRoles` Query is of type `ListRolesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListRolesData { + roles: ({ + id: UUIDString; + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; + createdAt?: TimestampString | null; + } & Role_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listRoles`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListRoles } from '@dataconnect/generated/react' + +export default function ListRolesComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListRoles(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListRoles(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListRoles(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListRoles(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.roles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getRoleById +You can execute the `getRoleById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetRoleById(dc: DataConnect, vars: GetRoleByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetRoleById(vars: GetRoleByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getRoleById` Query requires an argument of type `GetRoleByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetRoleByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getRoleById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getRoleById` Query is of type `GetRoleByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetRoleByIdData { + role?: { + id: UUIDString; + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; + createdAt?: TimestampString | null; + } & Role_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getRoleById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetRoleByIdVariables } from '@dataconnect/generated'; +import { useGetRoleById } from '@dataconnect/generated/react' + +export default function GetRoleByIdComponent() { + // The `useGetRoleById` Query hook requires an argument of type `GetRoleByIdVariables`: + const getRoleByIdVars: GetRoleByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetRoleById(getRoleByIdVars); + // Variables can be defined inline as well. + const query = useGetRoleById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetRoleById(dataConnect, getRoleByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetRoleById(getRoleByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetRoleById(dataConnect, getRoleByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.role); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listRolesByVendorId +You can execute the `listRolesByVendorId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListRolesByVendorId(dc: DataConnect, vars: ListRolesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListRolesByVendorId(vars: ListRolesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listRolesByVendorId` Query requires an argument of type `ListRolesByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListRolesByVendorIdVariables { + vendorId: UUIDString; +} +``` +### Return Type +Recall that calling the `listRolesByVendorId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listRolesByVendorId` Query is of type `ListRolesByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListRolesByVendorIdData { + roles: ({ + id: UUIDString; + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; + createdAt?: TimestampString | null; + } & Role_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listRolesByVendorId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListRolesByVendorIdVariables } from '@dataconnect/generated'; +import { useListRolesByVendorId } from '@dataconnect/generated/react' + +export default function ListRolesByVendorIdComponent() { + // The `useListRolesByVendorId` Query hook requires an argument of type `ListRolesByVendorIdVariables`: + const listRolesByVendorIdVars: ListRolesByVendorIdVariables = { + vendorId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListRolesByVendorId(listRolesByVendorIdVars); + // Variables can be defined inline as well. + const query = useListRolesByVendorId({ vendorId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListRolesByVendorId(dataConnect, listRolesByVendorIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListRolesByVendorId(listRolesByVendorIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListRolesByVendorId(dataConnect, listRolesByVendorIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.roles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listRolesByroleCategoryId +You can execute the `listRolesByroleCategoryId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListRolesByroleCategoryId(dc: DataConnect, vars: ListRolesByroleCategoryIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListRolesByroleCategoryId(vars: ListRolesByroleCategoryIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listRolesByroleCategoryId` Query requires an argument of type `ListRolesByroleCategoryIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListRolesByroleCategoryIdVariables { + roleCategoryId: UUIDString; +} +``` +### Return Type +Recall that calling the `listRolesByroleCategoryId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listRolesByroleCategoryId` Query is of type `ListRolesByroleCategoryIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListRolesByroleCategoryIdData { + roles: ({ + id: UUIDString; + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; + createdAt?: TimestampString | null; + } & Role_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listRolesByroleCategoryId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListRolesByroleCategoryIdVariables } from '@dataconnect/generated'; +import { useListRolesByroleCategoryId } from '@dataconnect/generated/react' + +export default function ListRolesByroleCategoryIdComponent() { + // The `useListRolesByroleCategoryId` Query hook requires an argument of type `ListRolesByroleCategoryIdVariables`: + const listRolesByroleCategoryIdVars: ListRolesByroleCategoryIdVariables = { + roleCategoryId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListRolesByroleCategoryId(listRolesByroleCategoryIdVars); + // Variables can be defined inline as well. + const query = useListRolesByroleCategoryId({ roleCategoryId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListRolesByroleCategoryId(dataConnect, listRolesByroleCategoryIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListRolesByroleCategoryId(listRolesByroleCategoryIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListRolesByroleCategoryId(dataConnect, listRolesByroleCategoryIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.roles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getShiftRoleById +You can execute the `getShiftRoleById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetShiftRoleById(dc: DataConnect, vars: GetShiftRoleByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetShiftRoleById(vars: GetShiftRoleByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getShiftRoleById` Query requires an argument of type `GetShiftRoleByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetShiftRoleByIdVariables { + shiftId: UUIDString; + roleId: UUIDString; +} +``` +### Return Type +Recall that calling the `getShiftRoleById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getShiftRoleById` Query is of type `GetShiftRoleByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetShiftRoleByIdData { + shiftRole?: { + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + order: { + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + companyLogoUrl?: string | null; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + teamHub: { + hubName: string; + }; + }; + }; + } & ShiftRole_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getShiftRoleById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetShiftRoleByIdVariables } from '@dataconnect/generated'; +import { useGetShiftRoleById } from '@dataconnect/generated/react' + +export default function GetShiftRoleByIdComponent() { + // The `useGetShiftRoleById` Query hook requires an argument of type `GetShiftRoleByIdVariables`: + const getShiftRoleByIdVars: GetShiftRoleByIdVariables = { + shiftId: ..., + roleId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetShiftRoleById(getShiftRoleByIdVars); + // Variables can be defined inline as well. + const query = useGetShiftRoleById({ shiftId: ..., roleId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetShiftRoleById(dataConnect, getShiftRoleByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetShiftRoleById(getShiftRoleByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetShiftRoleById(dataConnect, getShiftRoleByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shiftRole); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftRolesByShiftId +You can execute the `listShiftRolesByShiftId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftRolesByShiftId(dc: DataConnect, vars: ListShiftRolesByShiftIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftRolesByShiftId(vars: ListShiftRolesByShiftIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftRolesByShiftId` Query requires an argument of type `ListShiftRolesByShiftIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftRolesByShiftIdVariables { + shiftId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listShiftRolesByShiftId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftRolesByShiftId` Query is of type `ListShiftRolesByShiftIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftRolesByShiftIdData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + order: { + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + }; + }; + } & ShiftRole_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftRolesByShiftId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftRolesByShiftIdVariables } from '@dataconnect/generated'; +import { useListShiftRolesByShiftId } from '@dataconnect/generated/react' + +export default function ListShiftRolesByShiftIdComponent() { + // The `useListShiftRolesByShiftId` Query hook requires an argument of type `ListShiftRolesByShiftIdVariables`: + const listShiftRolesByShiftIdVars: ListShiftRolesByShiftIdVariables = { + shiftId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftRolesByShiftId(listShiftRolesByShiftIdVars); + // Variables can be defined inline as well. + const query = useListShiftRolesByShiftId({ shiftId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftRolesByShiftId(dataConnect, listShiftRolesByShiftIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByShiftId(listShiftRolesByShiftIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByShiftId(dataConnect, listShiftRolesByShiftIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shiftRoles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftRolesByRoleId +You can execute the `listShiftRolesByRoleId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftRolesByRoleId(dc: DataConnect, vars: ListShiftRolesByRoleIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftRolesByRoleId(vars: ListShiftRolesByRoleIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftRolesByRoleId` Query requires an argument of type `ListShiftRolesByRoleIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftRolesByRoleIdVariables { + roleId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listShiftRolesByRoleId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftRolesByRoleId` Query is of type `ListShiftRolesByRoleIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftRolesByRoleIdData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + order: { + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + }; + }; + } & ShiftRole_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftRolesByRoleId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftRolesByRoleIdVariables } from '@dataconnect/generated'; +import { useListShiftRolesByRoleId } from '@dataconnect/generated/react' + +export default function ListShiftRolesByRoleIdComponent() { + // The `useListShiftRolesByRoleId` Query hook requires an argument of type `ListShiftRolesByRoleIdVariables`: + const listShiftRolesByRoleIdVars: ListShiftRolesByRoleIdVariables = { + roleId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftRolesByRoleId(listShiftRolesByRoleIdVars); + // Variables can be defined inline as well. + const query = useListShiftRolesByRoleId({ roleId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftRolesByRoleId(dataConnect, listShiftRolesByRoleIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByRoleId(listShiftRolesByRoleIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByRoleId(dataConnect, listShiftRolesByRoleIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shiftRoles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftRolesByShiftIdAndTimeRange +You can execute the `listShiftRolesByShiftIdAndTimeRange` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftRolesByShiftIdAndTimeRange(dc: DataConnect, vars: ListShiftRolesByShiftIdAndTimeRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftRolesByShiftIdAndTimeRange(vars: ListShiftRolesByShiftIdAndTimeRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftRolesByShiftIdAndTimeRange` Query requires an argument of type `ListShiftRolesByShiftIdAndTimeRangeVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftRolesByShiftIdAndTimeRangeVariables { + shiftId: UUIDString; + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listShiftRolesByShiftIdAndTimeRange` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftRolesByShiftIdAndTimeRange` Query is of type `ListShiftRolesByShiftIdAndTimeRangeData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftRolesByShiftIdAndTimeRangeData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + order: { + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + }; + }; + } & ShiftRole_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftRolesByShiftIdAndTimeRange`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftRolesByShiftIdAndTimeRangeVariables } from '@dataconnect/generated'; +import { useListShiftRolesByShiftIdAndTimeRange } from '@dataconnect/generated/react' + +export default function ListShiftRolesByShiftIdAndTimeRangeComponent() { + // The `useListShiftRolesByShiftIdAndTimeRange` Query hook requires an argument of type `ListShiftRolesByShiftIdAndTimeRangeVariables`: + const listShiftRolesByShiftIdAndTimeRangeVars: ListShiftRolesByShiftIdAndTimeRangeVariables = { + shiftId: ..., + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftRolesByShiftIdAndTimeRange(listShiftRolesByShiftIdAndTimeRangeVars); + // Variables can be defined inline as well. + const query = useListShiftRolesByShiftIdAndTimeRange({ shiftId: ..., start: ..., end: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftRolesByShiftIdAndTimeRange(dataConnect, listShiftRolesByShiftIdAndTimeRangeVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByShiftIdAndTimeRange(listShiftRolesByShiftIdAndTimeRangeVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByShiftIdAndTimeRange(dataConnect, listShiftRolesByShiftIdAndTimeRangeVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shiftRoles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftRolesByVendorId +You can execute the `listShiftRolesByVendorId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftRolesByVendorId(dc: DataConnect, vars: ListShiftRolesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftRolesByVendorId(vars: ListShiftRolesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftRolesByVendorId` Query requires an argument of type `ListShiftRolesByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftRolesByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listShiftRolesByVendorId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftRolesByVendorId` Query is of type `ListShiftRolesByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftRolesByVendorIdData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + description?: string | null; + orderId: UUIDString; + status?: ShiftStatus | null; + durationDays?: number | null; + order: { + id: UUIDString; + eventName?: string | null; + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status: OrderStatus; + date?: TimestampString | null; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor?: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Order_Key; + } & Shift_Key; + } & ShiftRole_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftRolesByVendorId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftRolesByVendorIdVariables } from '@dataconnect/generated'; +import { useListShiftRolesByVendorId } from '@dataconnect/generated/react' + +export default function ListShiftRolesByVendorIdComponent() { + // The `useListShiftRolesByVendorId` Query hook requires an argument of type `ListShiftRolesByVendorIdVariables`: + const listShiftRolesByVendorIdVars: ListShiftRolesByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftRolesByVendorId(listShiftRolesByVendorIdVars); + // Variables can be defined inline as well. + const query = useListShiftRolesByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftRolesByVendorId(dataConnect, listShiftRolesByVendorIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByVendorId(listShiftRolesByVendorIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByVendorId(dataConnect, listShiftRolesByVendorIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shiftRoles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftRolesByBusinessAndDateRange +You can execute the `listShiftRolesByBusinessAndDateRange` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftRolesByBusinessAndDateRange(dc: DataConnect, vars: ListShiftRolesByBusinessAndDateRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftRolesByBusinessAndDateRange(vars: ListShiftRolesByBusinessAndDateRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftRolesByBusinessAndDateRange` Query requires an argument of type `ListShiftRolesByBusinessAndDateRangeVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftRolesByBusinessAndDateRangeVariables { + businessId: UUIDString; + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; + status?: ShiftStatus | null; +} +``` +### Return Type +Recall that calling the `listShiftRolesByBusinessAndDateRange` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftRolesByBusinessAndDateRange` Query is of type `ListShiftRolesByBusinessAndDateRangeData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftRolesByBusinessAndDateRangeData { + shiftRoles: ({ + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + hours?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + } & Role_Key; + shift: { + id: UUIDString; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + title: string; + status?: ShiftStatus | null; + order: { + id: UUIDString; + eventName?: string | null; + } & Order_Key; + } & Shift_Key; + } & ShiftRole_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftRolesByBusinessAndDateRange`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftRolesByBusinessAndDateRangeVariables } from '@dataconnect/generated'; +import { useListShiftRolesByBusinessAndDateRange } from '@dataconnect/generated/react' + +export default function ListShiftRolesByBusinessAndDateRangeComponent() { + // The `useListShiftRolesByBusinessAndDateRange` Query hook requires an argument of type `ListShiftRolesByBusinessAndDateRangeVariables`: + const listShiftRolesByBusinessAndDateRangeVars: ListShiftRolesByBusinessAndDateRangeVariables = { + businessId: ..., + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional + status: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftRolesByBusinessAndDateRange(listShiftRolesByBusinessAndDateRangeVars); + // Variables can be defined inline as well. + const query = useListShiftRolesByBusinessAndDateRange({ businessId: ..., start: ..., end: ..., offset: ..., limit: ..., status: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftRolesByBusinessAndDateRange(dataConnect, listShiftRolesByBusinessAndDateRangeVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByBusinessAndDateRange(listShiftRolesByBusinessAndDateRangeVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByBusinessAndDateRange(dataConnect, listShiftRolesByBusinessAndDateRangeVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shiftRoles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftRolesByBusinessAndOrder +You can execute the `listShiftRolesByBusinessAndOrder` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftRolesByBusinessAndOrder(dc: DataConnect, vars: ListShiftRolesByBusinessAndOrderVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftRolesByBusinessAndOrder(vars: ListShiftRolesByBusinessAndOrderVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftRolesByBusinessAndOrder` Query requires an argument of type `ListShiftRolesByBusinessAndOrderVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftRolesByBusinessAndOrderVariables { + businessId: UUIDString; + orderId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listShiftRolesByBusinessAndOrder` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftRolesByBusinessAndOrder` Query is of type `ListShiftRolesByBusinessAndOrderData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftRolesByBusinessAndOrderData { + shiftRoles: ({ + id: UUIDString; + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + breakType?: BreakDuration | null; + totalValue?: number | null; + createdAt?: TimestampString | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + title: string; + date?: TimestampString | null; + orderId: UUIDString; + location?: string | null; + locationAddress?: string | null; + order: { + vendorId?: UUIDString | null; + eventName?: string | null; + date?: TimestampString | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Shift_Key; + } & ShiftRole_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftRolesByBusinessAndOrder`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftRolesByBusinessAndOrderVariables } from '@dataconnect/generated'; +import { useListShiftRolesByBusinessAndOrder } from '@dataconnect/generated/react' + +export default function ListShiftRolesByBusinessAndOrderComponent() { + // The `useListShiftRolesByBusinessAndOrder` Query hook requires an argument of type `ListShiftRolesByBusinessAndOrderVariables`: + const listShiftRolesByBusinessAndOrderVars: ListShiftRolesByBusinessAndOrderVariables = { + businessId: ..., + orderId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftRolesByBusinessAndOrder(listShiftRolesByBusinessAndOrderVars); + // Variables can be defined inline as well. + const query = useListShiftRolesByBusinessAndOrder({ businessId: ..., orderId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftRolesByBusinessAndOrder(dataConnect, listShiftRolesByBusinessAndOrderVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByBusinessAndOrder(listShiftRolesByBusinessAndOrderVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByBusinessAndOrder(dataConnect, listShiftRolesByBusinessAndOrderVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shiftRoles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftRolesByBusinessDateRangeCompletedOrders +You can execute the `listShiftRolesByBusinessDateRangeCompletedOrders` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftRolesByBusinessDateRangeCompletedOrders(dc: DataConnect, vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftRolesByBusinessDateRangeCompletedOrders(vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftRolesByBusinessDateRangeCompletedOrders` Query requires an argument of type `ListShiftRolesByBusinessDateRangeCompletedOrdersVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftRolesByBusinessDateRangeCompletedOrdersVariables { + businessId: UUIDString; + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listShiftRolesByBusinessDateRangeCompletedOrders` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftRolesByBusinessDateRangeCompletedOrders` Query is of type `ListShiftRolesByBusinessDateRangeCompletedOrdersData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftRolesByBusinessDateRangeCompletedOrdersData { + shiftRoles: ({ + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + hours?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + costPerHour: number; + } & Role_Key; + shift: { + id: UUIDString; + date?: TimestampString | null; + location?: string | null; + locationAddress?: string | null; + title: string; + status?: ShiftStatus | null; + order: { + id: UUIDString; + orderType: OrderType; + } & Order_Key; + } & Shift_Key; + } & ShiftRole_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftRolesByBusinessDateRangeCompletedOrders`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftRolesByBusinessDateRangeCompletedOrdersVariables } from '@dataconnect/generated'; +import { useListShiftRolesByBusinessDateRangeCompletedOrders } from '@dataconnect/generated/react' + +export default function ListShiftRolesByBusinessDateRangeCompletedOrdersComponent() { + // The `useListShiftRolesByBusinessDateRangeCompletedOrders` Query hook requires an argument of type `ListShiftRolesByBusinessDateRangeCompletedOrdersVariables`: + const listShiftRolesByBusinessDateRangeCompletedOrdersVars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables = { + businessId: ..., + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftRolesByBusinessDateRangeCompletedOrders(listShiftRolesByBusinessDateRangeCompletedOrdersVars); + // Variables can be defined inline as well. + const query = useListShiftRolesByBusinessDateRangeCompletedOrders({ businessId: ..., start: ..., end: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftRolesByBusinessDateRangeCompletedOrders(dataConnect, listShiftRolesByBusinessDateRangeCompletedOrdersVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByBusinessDateRangeCompletedOrders(listShiftRolesByBusinessDateRangeCompletedOrdersVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByBusinessDateRangeCompletedOrders(dataConnect, listShiftRolesByBusinessDateRangeCompletedOrdersVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shiftRoles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listShiftRolesByBusinessAndDatesSummary +You can execute the `listShiftRolesByBusinessAndDatesSummary` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListShiftRolesByBusinessAndDatesSummary(dc: DataConnect, vars: ListShiftRolesByBusinessAndDatesSummaryVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListShiftRolesByBusinessAndDatesSummary(vars: ListShiftRolesByBusinessAndDatesSummaryVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listShiftRolesByBusinessAndDatesSummary` Query requires an argument of type `ListShiftRolesByBusinessAndDatesSummaryVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListShiftRolesByBusinessAndDatesSummaryVariables { + businessId: UUIDString; + start: TimestampString; + end: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listShiftRolesByBusinessAndDatesSummary` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listShiftRolesByBusinessAndDatesSummary` Query is of type `ListShiftRolesByBusinessAndDatesSummaryData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListShiftRolesByBusinessAndDatesSummaryData { + shiftRoles: ({ + roleId: UUIDString; + hours?: number | null; + totalValue?: number | null; + role: { + id: UUIDString; + name: string; + } & Role_Key; + })[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listShiftRolesByBusinessAndDatesSummary`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListShiftRolesByBusinessAndDatesSummaryVariables } from '@dataconnect/generated'; +import { useListShiftRolesByBusinessAndDatesSummary } from '@dataconnect/generated/react' + +export default function ListShiftRolesByBusinessAndDatesSummaryComponent() { + // The `useListShiftRolesByBusinessAndDatesSummary` Query hook requires an argument of type `ListShiftRolesByBusinessAndDatesSummaryVariables`: + const listShiftRolesByBusinessAndDatesSummaryVars: ListShiftRolesByBusinessAndDatesSummaryVariables = { + businessId: ..., + start: ..., + end: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListShiftRolesByBusinessAndDatesSummary(listShiftRolesByBusinessAndDatesSummaryVars); + // Variables can be defined inline as well. + const query = useListShiftRolesByBusinessAndDatesSummary({ businessId: ..., start: ..., end: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListShiftRolesByBusinessAndDatesSummary(dataConnect, listShiftRolesByBusinessAndDatesSummaryVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByBusinessAndDatesSummary(listShiftRolesByBusinessAndDatesSummaryVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListShiftRolesByBusinessAndDatesSummary(dataConnect, listShiftRolesByBusinessAndDatesSummaryVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shiftRoles); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getCompletedShiftsByBusinessId +You can execute the `getCompletedShiftsByBusinessId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetCompletedShiftsByBusinessId(dc: DataConnect, vars: GetCompletedShiftsByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetCompletedShiftsByBusinessId(vars: GetCompletedShiftsByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getCompletedShiftsByBusinessId` Query requires an argument of type `GetCompletedShiftsByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetCompletedShiftsByBusinessIdVariables { + businessId: UUIDString; + dateFrom: TimestampString; + dateTo: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `getCompletedShiftsByBusinessId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getCompletedShiftsByBusinessId` Query is of type `GetCompletedShiftsByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetCompletedShiftsByBusinessIdData { + shifts: ({ + id: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + workersNeeded?: number | null; + filled?: number | null; + createdAt?: TimestampString | null; + order: { + status: OrderStatus; + }; + } & Shift_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getCompletedShiftsByBusinessId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetCompletedShiftsByBusinessIdVariables } from '@dataconnect/generated'; +import { useGetCompletedShiftsByBusinessId } from '@dataconnect/generated/react' + +export default function GetCompletedShiftsByBusinessIdComponent() { + // The `useGetCompletedShiftsByBusinessId` Query hook requires an argument of type `GetCompletedShiftsByBusinessIdVariables`: + const getCompletedShiftsByBusinessIdVars: GetCompletedShiftsByBusinessIdVariables = { + businessId: ..., + dateFrom: ..., + dateTo: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetCompletedShiftsByBusinessId(getCompletedShiftsByBusinessIdVars); + // Variables can be defined inline as well. + const query = useGetCompletedShiftsByBusinessId({ businessId: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetCompletedShiftsByBusinessId(dataConnect, getCompletedShiftsByBusinessIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetCompletedShiftsByBusinessId(getCompletedShiftsByBusinessIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetCompletedShiftsByBusinessId(dataConnect, getCompletedShiftsByBusinessIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.shifts); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listTaxForms +You can execute the `listTaxForms` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListTaxForms(dc: DataConnect, vars?: ListTaxFormsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListTaxForms(vars?: ListTaxFormsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listTaxForms` Query has an optional argument of type `ListTaxFormsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListTaxFormsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listTaxForms` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listTaxForms` Query is of type `ListTaxFormsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListTaxFormsData { + taxForms: ({ + id: UUIDString; + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + street?: string | null; + country?: string | null; + apt?: string | null; + state?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & TaxForm_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listTaxForms`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListTaxFormsVariables } from '@dataconnect/generated'; +import { useListTaxForms } from '@dataconnect/generated/react' + +export default function ListTaxFormsComponent() { + // The `useListTaxForms` Query hook has an optional argument of type `ListTaxFormsVariables`: + const listTaxFormsVars: ListTaxFormsVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListTaxForms(listTaxFormsVars); + // Variables can be defined inline as well. + const query = useListTaxForms({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListTaxFormsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListTaxForms(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListTaxForms(dataConnect, listTaxFormsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListTaxForms(listTaxFormsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListTaxForms(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListTaxForms(dataConnect, listTaxFormsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.taxForms); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getTaxFormById +You can execute the `getTaxFormById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetTaxFormById(dc: DataConnect, vars: GetTaxFormByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetTaxFormById(vars: GetTaxFormByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getTaxFormById` Query requires an argument of type `GetTaxFormByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetTaxFormByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getTaxFormById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getTaxFormById` Query is of type `GetTaxFormByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetTaxFormByIdData { + taxForm?: { + id: UUIDString; + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + street?: string | null; + country?: string | null; + apt?: string | null; + state?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & TaxForm_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getTaxFormById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetTaxFormByIdVariables } from '@dataconnect/generated'; +import { useGetTaxFormById } from '@dataconnect/generated/react' + +export default function GetTaxFormByIdComponent() { + // The `useGetTaxFormById` Query hook requires an argument of type `GetTaxFormByIdVariables`: + const getTaxFormByIdVars: GetTaxFormByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetTaxFormById(getTaxFormByIdVars); + // Variables can be defined inline as well. + const query = useGetTaxFormById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetTaxFormById(dataConnect, getTaxFormByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetTaxFormById(getTaxFormByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetTaxFormById(dataConnect, getTaxFormByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.taxForm); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getTaxFormsByStaffId +You can execute the `getTaxFormsByStaffId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetTaxFormsByStaffId(dc: DataConnect, vars: GetTaxFormsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetTaxFormsByStaffId(vars: GetTaxFormsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getTaxFormsByStaffId` Query requires an argument of type `GetTaxFormsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetTaxFormsByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `getTaxFormsByStaffId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getTaxFormsByStaffId` Query is of type `GetTaxFormsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetTaxFormsByStaffIdData { + taxForms: ({ + id: UUIDString; + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + street?: string | null; + country?: string | null; + apt?: string | null; + state?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & TaxForm_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getTaxFormsByStaffId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetTaxFormsByStaffIdVariables } from '@dataconnect/generated'; +import { useGetTaxFormsByStaffId } from '@dataconnect/generated/react' + +export default function GetTaxFormsByStaffIdComponent() { + // The `useGetTaxFormsByStaffId` Query hook requires an argument of type `GetTaxFormsByStaffIdVariables`: + const getTaxFormsByStaffIdVars: GetTaxFormsByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetTaxFormsByStaffId(getTaxFormsByStaffIdVars); + // Variables can be defined inline as well. + const query = useGetTaxFormsByStaffId({ staffId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetTaxFormsByStaffId(dataConnect, getTaxFormsByStaffIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetTaxFormsByStaffId(getTaxFormsByStaffIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetTaxFormsByStaffId(dataConnect, getTaxFormsByStaffIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.taxForms); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listTaxFormsWhere +You can execute the `listTaxFormsWhere` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListTaxFormsWhere(dc: DataConnect, vars?: ListTaxFormsWhereVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListTaxFormsWhere(vars?: ListTaxFormsWhereVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listTaxFormsWhere` Query has an optional argument of type `ListTaxFormsWhereVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListTaxFormsWhereVariables { + formType?: TaxFormType | null; + status?: TaxFormStatus | null; + staffId?: UUIDString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listTaxFormsWhere` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listTaxFormsWhere` Query is of type `ListTaxFormsWhereData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListTaxFormsWhereData { + taxForms: ({ + id: UUIDString; + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + street?: string | null; + country?: string | null; + apt?: string | null; + state?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & TaxForm_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listTaxFormsWhere`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListTaxFormsWhereVariables } from '@dataconnect/generated'; +import { useListTaxFormsWhere } from '@dataconnect/generated/react' + +export default function ListTaxFormsWhereComponent() { + // The `useListTaxFormsWhere` Query hook has an optional argument of type `ListTaxFormsWhereVariables`: + const listTaxFormsWhereVars: ListTaxFormsWhereVariables = { + formType: ..., // optional + status: ..., // optional + staffId: ..., // optional + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListTaxFormsWhere(listTaxFormsWhereVars); + // Variables can be defined inline as well. + const query = useListTaxFormsWhere({ formType: ..., status: ..., staffId: ..., offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListTaxFormsWhereVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListTaxFormsWhere(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListTaxFormsWhere(dataConnect, listTaxFormsWhereVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListTaxFormsWhere(listTaxFormsWhereVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListTaxFormsWhere(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListTaxFormsWhere(dataConnect, listTaxFormsWhereVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.taxForms); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listFaqDatas +You can execute the `listFaqDatas` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListFaqDatas(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListFaqDatas(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listFaqDatas` Query has no variables. +### Return Type +Recall that calling the `listFaqDatas` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listFaqDatas` Query is of type `ListFaqDatasData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListFaqDatasData { + faqDatas: ({ + id: UUIDString; + category: string; + questions?: unknown[] | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & FaqData_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listFaqDatas`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListFaqDatas } from '@dataconnect/generated/react' + +export default function ListFaqDatasComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListFaqDatas(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListFaqDatas(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListFaqDatas(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListFaqDatas(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.faqDatas); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getFaqDataById +You can execute the `getFaqDataById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetFaqDataById(dc: DataConnect, vars: GetFaqDataByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetFaqDataById(vars: GetFaqDataByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getFaqDataById` Query requires an argument of type `GetFaqDataByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetFaqDataByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getFaqDataById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getFaqDataById` Query is of type `GetFaqDataByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetFaqDataByIdData { + faqData?: { + id: UUIDString; + category: string; + questions?: unknown[] | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & FaqData_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getFaqDataById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetFaqDataByIdVariables } from '@dataconnect/generated'; +import { useGetFaqDataById } from '@dataconnect/generated/react' + +export default function GetFaqDataByIdComponent() { + // The `useGetFaqDataById` Query hook requires an argument of type `GetFaqDataByIdVariables`: + const getFaqDataByIdVars: GetFaqDataByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetFaqDataById(getFaqDataByIdVars); + // Variables can be defined inline as well. + const query = useGetFaqDataById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetFaqDataById(dataConnect, getFaqDataByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetFaqDataById(getFaqDataByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetFaqDataById(dataConnect, getFaqDataByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.faqData); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterFaqDatas +You can execute the `filterFaqDatas` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterFaqDatas(dc: DataConnect, vars?: FilterFaqDatasVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterFaqDatas(vars?: FilterFaqDatasVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterFaqDatas` Query has an optional argument of type `FilterFaqDatasVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterFaqDatasVariables { + category?: string | null; +} +``` +### Return Type +Recall that calling the `filterFaqDatas` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterFaqDatas` Query is of type `FilterFaqDatasData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterFaqDatasData { + faqDatas: ({ + id: UUIDString; + category: string; + questions?: unknown[] | null; + } & FaqData_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterFaqDatas`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterFaqDatasVariables } from '@dataconnect/generated'; +import { useFilterFaqDatas } from '@dataconnect/generated/react' + +export default function FilterFaqDatasComponent() { + // The `useFilterFaqDatas` Query hook has an optional argument of type `FilterFaqDatasVariables`: + const filterFaqDatasVars: FilterFaqDatasVariables = { + category: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterFaqDatas(filterFaqDatasVars); + // Variables can be defined inline as well. + const query = useFilterFaqDatas({ category: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterFaqDatasVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterFaqDatas(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterFaqDatas(dataConnect, filterFaqDatasVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterFaqDatas(filterFaqDatasVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterFaqDatas(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterFaqDatas(dataConnect, filterFaqDatasVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.faqDatas); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getStaffCourseById +You can execute the `getStaffCourseById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetStaffCourseById(dc: DataConnect, vars: GetStaffCourseByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetStaffCourseById(vars: GetStaffCourseByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getStaffCourseById` Query requires an argument of type `GetStaffCourseByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetStaffCourseByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getStaffCourseById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getStaffCourseById` Query is of type `GetStaffCourseByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetStaffCourseByIdData { + staffCourse?: { + id: UUIDString; + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & StaffCourse_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getStaffCourseById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetStaffCourseByIdVariables } from '@dataconnect/generated'; +import { useGetStaffCourseById } from '@dataconnect/generated/react' + +export default function GetStaffCourseByIdComponent() { + // The `useGetStaffCourseById` Query hook requires an argument of type `GetStaffCourseByIdVariables`: + const getStaffCourseByIdVars: GetStaffCourseByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetStaffCourseById(getStaffCourseByIdVars); + // Variables can be defined inline as well. + const query = useGetStaffCourseById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetStaffCourseById(dataConnect, getStaffCourseByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffCourseById(getStaffCourseByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffCourseById(dataConnect, getStaffCourseByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffCourse); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffCoursesByStaffId +You can execute the `listStaffCoursesByStaffId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffCoursesByStaffId(dc: DataConnect, vars: ListStaffCoursesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffCoursesByStaffId(vars: ListStaffCoursesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffCoursesByStaffId` Query requires an argument of type `ListStaffCoursesByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffCoursesByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listStaffCoursesByStaffId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffCoursesByStaffId` Query is of type `ListStaffCoursesByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffCoursesByStaffIdData { + staffCourses: ({ + id: UUIDString; + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & StaffCourse_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffCoursesByStaffId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffCoursesByStaffIdVariables } from '@dataconnect/generated'; +import { useListStaffCoursesByStaffId } from '@dataconnect/generated/react' + +export default function ListStaffCoursesByStaffIdComponent() { + // The `useListStaffCoursesByStaffId` Query hook requires an argument of type `ListStaffCoursesByStaffIdVariables`: + const listStaffCoursesByStaffIdVars: ListStaffCoursesByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffCoursesByStaffId(listStaffCoursesByStaffIdVars); + // Variables can be defined inline as well. + const query = useListStaffCoursesByStaffId({ staffId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffCoursesByStaffId(dataConnect, listStaffCoursesByStaffIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffCoursesByStaffId(listStaffCoursesByStaffIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffCoursesByStaffId(dataConnect, listStaffCoursesByStaffIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffCourses); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffCoursesByCourseId +You can execute the `listStaffCoursesByCourseId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffCoursesByCourseId(dc: DataConnect, vars: ListStaffCoursesByCourseIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffCoursesByCourseId(vars: ListStaffCoursesByCourseIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffCoursesByCourseId` Query requires an argument of type `ListStaffCoursesByCourseIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffCoursesByCourseIdVariables { + courseId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listStaffCoursesByCourseId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffCoursesByCourseId` Query is of type `ListStaffCoursesByCourseIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffCoursesByCourseIdData { + staffCourses: ({ + id: UUIDString; + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & StaffCourse_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffCoursesByCourseId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffCoursesByCourseIdVariables } from '@dataconnect/generated'; +import { useListStaffCoursesByCourseId } from '@dataconnect/generated/react' + +export default function ListStaffCoursesByCourseIdComponent() { + // The `useListStaffCoursesByCourseId` Query hook requires an argument of type `ListStaffCoursesByCourseIdVariables`: + const listStaffCoursesByCourseIdVars: ListStaffCoursesByCourseIdVariables = { + courseId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffCoursesByCourseId(listStaffCoursesByCourseIdVars); + // Variables can be defined inline as well. + const query = useListStaffCoursesByCourseId({ courseId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffCoursesByCourseId(dataConnect, listStaffCoursesByCourseIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffCoursesByCourseId(listStaffCoursesByCourseIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffCoursesByCourseId(dataConnect, listStaffCoursesByCourseIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffCourses); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getStaffCourseByStaffAndCourse +You can execute the `getStaffCourseByStaffAndCourse` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetStaffCourseByStaffAndCourse(dc: DataConnect, vars: GetStaffCourseByStaffAndCourseVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetStaffCourseByStaffAndCourse(vars: GetStaffCourseByStaffAndCourseVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getStaffCourseByStaffAndCourse` Query requires an argument of type `GetStaffCourseByStaffAndCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetStaffCourseByStaffAndCourseVariables { + staffId: UUIDString; + courseId: UUIDString; +} +``` +### Return Type +Recall that calling the `getStaffCourseByStaffAndCourse` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getStaffCourseByStaffAndCourse` Query is of type `GetStaffCourseByStaffAndCourseData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetStaffCourseByStaffAndCourseData { + staffCourses: ({ + id: UUIDString; + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + } & StaffCourse_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getStaffCourseByStaffAndCourse`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetStaffCourseByStaffAndCourseVariables } from '@dataconnect/generated'; +import { useGetStaffCourseByStaffAndCourse } from '@dataconnect/generated/react' + +export default function GetStaffCourseByStaffAndCourseComponent() { + // The `useGetStaffCourseByStaffAndCourse` Query hook requires an argument of type `GetStaffCourseByStaffAndCourseVariables`: + const getStaffCourseByStaffAndCourseVars: GetStaffCourseByStaffAndCourseVariables = { + staffId: ..., + courseId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetStaffCourseByStaffAndCourse(getStaffCourseByStaffAndCourseVars); + // Variables can be defined inline as well. + const query = useGetStaffCourseByStaffAndCourse({ staffId: ..., courseId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetStaffCourseByStaffAndCourse(dataConnect, getStaffCourseByStaffAndCourseVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffCourseByStaffAndCourse(getStaffCourseByStaffAndCourseVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffCourseByStaffAndCourse(dataConnect, getStaffCourseByStaffAndCourseVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffCourses); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listActivityLogs +You can execute the `listActivityLogs` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListActivityLogs(dc: DataConnect, vars?: ListActivityLogsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListActivityLogs(vars?: ListActivityLogsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listActivityLogs` Query has an optional argument of type `ListActivityLogsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListActivityLogsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listActivityLogs` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listActivityLogs` Query is of type `ListActivityLogsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListActivityLogsData { + activityLogs: ({ + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listActivityLogs`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListActivityLogsVariables } from '@dataconnect/generated'; +import { useListActivityLogs } from '@dataconnect/generated/react' + +export default function ListActivityLogsComponent() { + // The `useListActivityLogs` Query hook has an optional argument of type `ListActivityLogsVariables`: + const listActivityLogsVars: ListActivityLogsVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListActivityLogs(listActivityLogsVars); + // Variables can be defined inline as well. + const query = useListActivityLogs({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListActivityLogsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListActivityLogs(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListActivityLogs(dataConnect, listActivityLogsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListActivityLogs(listActivityLogsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListActivityLogs(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListActivityLogs(dataConnect, listActivityLogsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.activityLogs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getActivityLogById +You can execute the `getActivityLogById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetActivityLogById(dc: DataConnect, vars: GetActivityLogByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetActivityLogById(vars: GetActivityLogByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getActivityLogById` Query requires an argument of type `GetActivityLogByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetActivityLogByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getActivityLogById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getActivityLogById` Query is of type `GetActivityLogByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetActivityLogByIdData { + activityLog?: { + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getActivityLogById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetActivityLogByIdVariables } from '@dataconnect/generated'; +import { useGetActivityLogById } from '@dataconnect/generated/react' + +export default function GetActivityLogByIdComponent() { + // The `useGetActivityLogById` Query hook requires an argument of type `GetActivityLogByIdVariables`: + const getActivityLogByIdVars: GetActivityLogByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetActivityLogById(getActivityLogByIdVars); + // Variables can be defined inline as well. + const query = useGetActivityLogById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetActivityLogById(dataConnect, getActivityLogByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetActivityLogById(getActivityLogByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetActivityLogById(dataConnect, getActivityLogByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.activityLog); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listActivityLogsByUserId +You can execute the `listActivityLogsByUserId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListActivityLogsByUserId(dc: DataConnect, vars: ListActivityLogsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListActivityLogsByUserId(vars: ListActivityLogsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listActivityLogsByUserId` Query requires an argument of type `ListActivityLogsByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListActivityLogsByUserIdVariables { + userId: string; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listActivityLogsByUserId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listActivityLogsByUserId` Query is of type `ListActivityLogsByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListActivityLogsByUserIdData { + activityLogs: ({ + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listActivityLogsByUserId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListActivityLogsByUserIdVariables } from '@dataconnect/generated'; +import { useListActivityLogsByUserId } from '@dataconnect/generated/react' + +export default function ListActivityLogsByUserIdComponent() { + // The `useListActivityLogsByUserId` Query hook requires an argument of type `ListActivityLogsByUserIdVariables`: + const listActivityLogsByUserIdVars: ListActivityLogsByUserIdVariables = { + userId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListActivityLogsByUserId(listActivityLogsByUserIdVars); + // Variables can be defined inline as well. + const query = useListActivityLogsByUserId({ userId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListActivityLogsByUserId(dataConnect, listActivityLogsByUserIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListActivityLogsByUserId(listActivityLogsByUserIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListActivityLogsByUserId(dataConnect, listActivityLogsByUserIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.activityLogs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listUnreadActivityLogsByUserId +You can execute the `listUnreadActivityLogsByUserId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListUnreadActivityLogsByUserId(dc: DataConnect, vars: ListUnreadActivityLogsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListUnreadActivityLogsByUserId(vars: ListUnreadActivityLogsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listUnreadActivityLogsByUserId` Query requires an argument of type `ListUnreadActivityLogsByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListUnreadActivityLogsByUserIdVariables { + userId: string; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listUnreadActivityLogsByUserId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listUnreadActivityLogsByUserId` Query is of type `ListUnreadActivityLogsByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListUnreadActivityLogsByUserIdData { + activityLogs: ({ + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listUnreadActivityLogsByUserId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListUnreadActivityLogsByUserIdVariables } from '@dataconnect/generated'; +import { useListUnreadActivityLogsByUserId } from '@dataconnect/generated/react' + +export default function ListUnreadActivityLogsByUserIdComponent() { + // The `useListUnreadActivityLogsByUserId` Query hook requires an argument of type `ListUnreadActivityLogsByUserIdVariables`: + const listUnreadActivityLogsByUserIdVars: ListUnreadActivityLogsByUserIdVariables = { + userId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListUnreadActivityLogsByUserId(listUnreadActivityLogsByUserIdVars); + // Variables can be defined inline as well. + const query = useListUnreadActivityLogsByUserId({ userId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListUnreadActivityLogsByUserId(dataConnect, listUnreadActivityLogsByUserIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListUnreadActivityLogsByUserId(listUnreadActivityLogsByUserIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListUnreadActivityLogsByUserId(dataConnect, listUnreadActivityLogsByUserIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.activityLogs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterActivityLogs +You can execute the `filterActivityLogs` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterActivityLogs(dc: DataConnect, vars?: FilterActivityLogsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterActivityLogs(vars?: FilterActivityLogsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterActivityLogs` Query has an optional argument of type `FilterActivityLogsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterActivityLogsVariables { + userId?: string | null; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + isRead?: boolean | null; + activityType?: ActivityType | null; + iconType?: ActivityIconType | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `filterActivityLogs` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterActivityLogs` Query is of type `FilterActivityLogsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterActivityLogsData { + activityLogs: ({ + id: UUIDString; + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & ActivityLog_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterActivityLogs`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterActivityLogsVariables } from '@dataconnect/generated'; +import { useFilterActivityLogs } from '@dataconnect/generated/react' + +export default function FilterActivityLogsComponent() { + // The `useFilterActivityLogs` Query hook has an optional argument of type `FilterActivityLogsVariables`: + const filterActivityLogsVars: FilterActivityLogsVariables = { + userId: ..., // optional + dateFrom: ..., // optional + dateTo: ..., // optional + isRead: ..., // optional + activityType: ..., // optional + iconType: ..., // optional + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterActivityLogs(filterActivityLogsVars); + // Variables can be defined inline as well. + const query = useFilterActivityLogs({ userId: ..., dateFrom: ..., dateTo: ..., isRead: ..., activityType: ..., iconType: ..., offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterActivityLogsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterActivityLogs(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterActivityLogs(dataConnect, filterActivityLogsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterActivityLogs(filterActivityLogsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterActivityLogs(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterActivityLogs(dataConnect, filterActivityLogsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.activityLogs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listBenefitsData +You can execute the `listBenefitsData` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListBenefitsData(dc: DataConnect, vars?: ListBenefitsDataVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListBenefitsData(vars?: ListBenefitsDataVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listBenefitsData` Query has an optional argument of type `ListBenefitsDataVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListBenefitsDataVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listBenefitsData` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listBenefitsData` Query is of type `ListBenefitsDataData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListBenefitsDataData { + benefitsDatas: ({ + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listBenefitsData`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListBenefitsDataVariables } from '@dataconnect/generated'; +import { useListBenefitsData } from '@dataconnect/generated/react' + +export default function ListBenefitsDataComponent() { + // The `useListBenefitsData` Query hook has an optional argument of type `ListBenefitsDataVariables`: + const listBenefitsDataVars: ListBenefitsDataVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListBenefitsData(listBenefitsDataVars); + // Variables can be defined inline as well. + const query = useListBenefitsData({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListBenefitsDataVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListBenefitsData(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListBenefitsData(dataConnect, listBenefitsDataVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListBenefitsData(listBenefitsDataVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListBenefitsData(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListBenefitsData(dataConnect, listBenefitsDataVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.benefitsDatas); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getBenefitsDataByKey +You can execute the `getBenefitsDataByKey` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetBenefitsDataByKey(dc: DataConnect, vars: GetBenefitsDataByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetBenefitsDataByKey(vars: GetBenefitsDataByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getBenefitsDataByKey` Query requires an argument of type `GetBenefitsDataByKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetBenefitsDataByKeyVariables { + staffId: UUIDString; + vendorBenefitPlanId: UUIDString; +} +``` +### Return Type +Recall that calling the `getBenefitsDataByKey` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getBenefitsDataByKey` Query is of type `GetBenefitsDataByKeyData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetBenefitsDataByKeyData { + benefitsData?: { + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getBenefitsDataByKey`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetBenefitsDataByKeyVariables } from '@dataconnect/generated'; +import { useGetBenefitsDataByKey } from '@dataconnect/generated/react' + +export default function GetBenefitsDataByKeyComponent() { + // The `useGetBenefitsDataByKey` Query hook requires an argument of type `GetBenefitsDataByKeyVariables`: + const getBenefitsDataByKeyVars: GetBenefitsDataByKeyVariables = { + staffId: ..., + vendorBenefitPlanId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetBenefitsDataByKey(getBenefitsDataByKeyVars); + // Variables can be defined inline as well. + const query = useGetBenefitsDataByKey({ staffId: ..., vendorBenefitPlanId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetBenefitsDataByKey(dataConnect, getBenefitsDataByKeyVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetBenefitsDataByKey(getBenefitsDataByKeyVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetBenefitsDataByKey(dataConnect, getBenefitsDataByKeyVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.benefitsData); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listBenefitsDataByStaffId +You can execute the `listBenefitsDataByStaffId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListBenefitsDataByStaffId(dc: DataConnect, vars: ListBenefitsDataByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListBenefitsDataByStaffId(vars: ListBenefitsDataByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listBenefitsDataByStaffId` Query requires an argument of type `ListBenefitsDataByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListBenefitsDataByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listBenefitsDataByStaffId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listBenefitsDataByStaffId` Query is of type `ListBenefitsDataByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListBenefitsDataByStaffIdData { + benefitsDatas: ({ + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listBenefitsDataByStaffId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListBenefitsDataByStaffIdVariables } from '@dataconnect/generated'; +import { useListBenefitsDataByStaffId } from '@dataconnect/generated/react' + +export default function ListBenefitsDataByStaffIdComponent() { + // The `useListBenefitsDataByStaffId` Query hook requires an argument of type `ListBenefitsDataByStaffIdVariables`: + const listBenefitsDataByStaffIdVars: ListBenefitsDataByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListBenefitsDataByStaffId(listBenefitsDataByStaffIdVars); + // Variables can be defined inline as well. + const query = useListBenefitsDataByStaffId({ staffId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListBenefitsDataByStaffId(dataConnect, listBenefitsDataByStaffIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListBenefitsDataByStaffId(listBenefitsDataByStaffIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListBenefitsDataByStaffId(dataConnect, listBenefitsDataByStaffIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.benefitsDatas); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listBenefitsDataByVendorBenefitPlanId +You can execute the `listBenefitsDataByVendorBenefitPlanId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListBenefitsDataByVendorBenefitPlanId(dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListBenefitsDataByVendorBenefitPlanId(vars: ListBenefitsDataByVendorBenefitPlanIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listBenefitsDataByVendorBenefitPlanId` Query requires an argument of type `ListBenefitsDataByVendorBenefitPlanIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListBenefitsDataByVendorBenefitPlanIdVariables { + vendorBenefitPlanId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listBenefitsDataByVendorBenefitPlanId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listBenefitsDataByVendorBenefitPlanId` Query is of type `ListBenefitsDataByVendorBenefitPlanIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListBenefitsDataByVendorBenefitPlanIdData { + benefitsDatas: ({ + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listBenefitsDataByVendorBenefitPlanId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListBenefitsDataByVendorBenefitPlanIdVariables } from '@dataconnect/generated'; +import { useListBenefitsDataByVendorBenefitPlanId } from '@dataconnect/generated/react' + +export default function ListBenefitsDataByVendorBenefitPlanIdComponent() { + // The `useListBenefitsDataByVendorBenefitPlanId` Query hook requires an argument of type `ListBenefitsDataByVendorBenefitPlanIdVariables`: + const listBenefitsDataByVendorBenefitPlanIdVars: ListBenefitsDataByVendorBenefitPlanIdVariables = { + vendorBenefitPlanId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListBenefitsDataByVendorBenefitPlanId(listBenefitsDataByVendorBenefitPlanIdVars); + // Variables can be defined inline as well. + const query = useListBenefitsDataByVendorBenefitPlanId({ vendorBenefitPlanId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListBenefitsDataByVendorBenefitPlanId(dataConnect, listBenefitsDataByVendorBenefitPlanIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListBenefitsDataByVendorBenefitPlanId(listBenefitsDataByVendorBenefitPlanIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListBenefitsDataByVendorBenefitPlanId(dataConnect, listBenefitsDataByVendorBenefitPlanIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.benefitsDatas); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listBenefitsDataByVendorBenefitPlanIds +You can execute the `listBenefitsDataByVendorBenefitPlanIds` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListBenefitsDataByVendorBenefitPlanIds(dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListBenefitsDataByVendorBenefitPlanIds(vars: ListBenefitsDataByVendorBenefitPlanIdsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listBenefitsDataByVendorBenefitPlanIds` Query requires an argument of type `ListBenefitsDataByVendorBenefitPlanIdsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListBenefitsDataByVendorBenefitPlanIdsVariables { + vendorBenefitPlanIds: UUIDString[]; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listBenefitsDataByVendorBenefitPlanIds` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listBenefitsDataByVendorBenefitPlanIds` Query is of type `ListBenefitsDataByVendorBenefitPlanIdsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListBenefitsDataByVendorBenefitPlanIdsData { + benefitsDatas: ({ + id: UUIDString; + vendorBenefitPlanId: UUIDString; + current: number; + staffId: UUIDString; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendorBenefitPlan: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + } & VendorBenefitPlan_Key; + } & BenefitsData_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listBenefitsDataByVendorBenefitPlanIds`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListBenefitsDataByVendorBenefitPlanIdsVariables } from '@dataconnect/generated'; +import { useListBenefitsDataByVendorBenefitPlanIds } from '@dataconnect/generated/react' + +export default function ListBenefitsDataByVendorBenefitPlanIdsComponent() { + // The `useListBenefitsDataByVendorBenefitPlanIds` Query hook requires an argument of type `ListBenefitsDataByVendorBenefitPlanIdsVariables`: + const listBenefitsDataByVendorBenefitPlanIdsVars: ListBenefitsDataByVendorBenefitPlanIdsVariables = { + vendorBenefitPlanIds: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListBenefitsDataByVendorBenefitPlanIds(listBenefitsDataByVendorBenefitPlanIdsVars); + // Variables can be defined inline as well. + const query = useListBenefitsDataByVendorBenefitPlanIds({ vendorBenefitPlanIds: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListBenefitsDataByVendorBenefitPlanIds(dataConnect, listBenefitsDataByVendorBenefitPlanIdsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListBenefitsDataByVendorBenefitPlanIds(listBenefitsDataByVendorBenefitPlanIdsVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListBenefitsDataByVendorBenefitPlanIds(dataConnect, listBenefitsDataByVendorBenefitPlanIdsVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.benefitsDatas); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaff +You can execute the `listStaff` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaff(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaff(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaff` Query has no variables. +### Return Type +Recall that calling the `listStaff` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaff` Query is of type `ListStaffData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffData { + staffs: ({ + id: UUIDString; + userId: string; + fullName: string; + level?: string | null; + role?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + ownerId?: UUIDString | null; + createdAt?: TimestampString | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + } & Staff_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaff`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListStaff } from '@dataconnect/generated/react' + +export default function ListStaffComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaff(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaff(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaff(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaff(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getStaffById +You can execute the `getStaffById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetStaffById(dc: DataConnect, vars: GetStaffByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetStaffById(vars: GetStaffByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getStaffById` Query requires an argument of type `GetStaffByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetStaffByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getStaffById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getStaffById` Query is of type `GetStaffByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetStaffByIdData { + staff?: { + id: UUIDString; + userId: string; + fullName: string; + role?: string | null; + level?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + ownerId?: UUIDString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + } & Staff_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getStaffById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetStaffByIdVariables } from '@dataconnect/generated'; +import { useGetStaffById } from '@dataconnect/generated/react' + +export default function GetStaffByIdComponent() { + // The `useGetStaffById` Query hook requires an argument of type `GetStaffByIdVariables`: + const getStaffByIdVars: GetStaffByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetStaffById(getStaffByIdVars); + // Variables can be defined inline as well. + const query = useGetStaffById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetStaffById(dataConnect, getStaffByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffById(getStaffByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffById(dataConnect, getStaffByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staff); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getStaffByUserId +You can execute the `getStaffByUserId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetStaffByUserId(dc: DataConnect, vars: GetStaffByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetStaffByUserId(vars: GetStaffByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getStaffByUserId` Query requires an argument of type `GetStaffByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetStaffByUserIdVariables { + userId: string; +} +``` +### Return Type +Recall that calling the `getStaffByUserId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getStaffByUserId` Query is of type `GetStaffByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetStaffByUserIdData { + staffs: ({ + id: UUIDString; + userId: string; + fullName: string; + level?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + ownerId?: UUIDString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + } & Staff_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getStaffByUserId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetStaffByUserIdVariables } from '@dataconnect/generated'; +import { useGetStaffByUserId } from '@dataconnect/generated/react' + +export default function GetStaffByUserIdComponent() { + // The `useGetStaffByUserId` Query hook requires an argument of type `GetStaffByUserIdVariables`: + const getStaffByUserIdVars: GetStaffByUserIdVariables = { + userId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetStaffByUserId(getStaffByUserIdVars); + // Variables can be defined inline as well. + const query = useGetStaffByUserId({ userId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetStaffByUserId(dataConnect, getStaffByUserIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffByUserId(getStaffByUserIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffByUserId(dataConnect, getStaffByUserIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterStaff +You can execute the `filterStaff` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterStaff(dc: DataConnect, vars?: FilterStaffVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterStaff(vars?: FilterStaffVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterStaff` Query has an optional argument of type `FilterStaffVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterStaffVariables { + ownerId?: UUIDString | null; + fullName?: string | null; + level?: string | null; + email?: string | null; +} +``` +### Return Type +Recall that calling the `filterStaff` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterStaff` Query is of type `FilterStaffData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterStaffData { + staffs: ({ + id: UUIDString; + userId: string; + fullName: string; + level?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + averageRating?: number | null; + reliabilityScore?: number | null; + totalShifts?: number | null; + ownerId?: UUIDString | null; + isRecommended?: boolean | null; + skills?: string[] | null; + industries?: string[] | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + } & Staff_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterStaff`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterStaffVariables } from '@dataconnect/generated'; +import { useFilterStaff } from '@dataconnect/generated/react' + +export default function FilterStaffComponent() { + // The `useFilterStaff` Query hook has an optional argument of type `FilterStaffVariables`: + const filterStaffVars: FilterStaffVariables = { + ownerId: ..., // optional + fullName: ..., // optional + level: ..., // optional + email: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterStaff(filterStaffVars); + // Variables can be defined inline as well. + const query = useFilterStaff({ ownerId: ..., fullName: ..., level: ..., email: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterStaffVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterStaff(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterStaff(dataConnect, filterStaffVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterStaff(filterStaffVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterStaff(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterStaff(dataConnect, filterStaffVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listTasks +You can execute the `listTasks` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListTasks(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListTasks(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listTasks` Query has no variables. +### Return Type +Recall that calling the `listTasks` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listTasks` Query is of type `ListTasksData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListTasksData { + tasks: ({ + id: UUIDString; + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Task_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listTasks`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListTasks } from '@dataconnect/generated/react' + +export default function ListTasksComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListTasks(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListTasks(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListTasks(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListTasks(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.tasks); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getTaskById +You can execute the `getTaskById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetTaskById(dc: DataConnect, vars: GetTaskByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetTaskById(vars: GetTaskByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getTaskById` Query requires an argument of type `GetTaskByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetTaskByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getTaskById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getTaskById` Query is of type `GetTaskByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetTaskByIdData { + task?: { + id: UUIDString; + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Task_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getTaskById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetTaskByIdVariables } from '@dataconnect/generated'; +import { useGetTaskById } from '@dataconnect/generated/react' + +export default function GetTaskByIdComponent() { + // The `useGetTaskById` Query hook requires an argument of type `GetTaskByIdVariables`: + const getTaskByIdVars: GetTaskByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetTaskById(getTaskByIdVars); + // Variables can be defined inline as well. + const query = useGetTaskById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetTaskById(dataConnect, getTaskByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetTaskById(getTaskByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetTaskById(dataConnect, getTaskByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.task); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getTasksByOwnerId +You can execute the `getTasksByOwnerId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetTasksByOwnerId(dc: DataConnect, vars: GetTasksByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetTasksByOwnerId(vars: GetTasksByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getTasksByOwnerId` Query requires an argument of type `GetTasksByOwnerIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetTasksByOwnerIdVariables { + ownerId: UUIDString; +} +``` +### Return Type +Recall that calling the `getTasksByOwnerId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getTasksByOwnerId` Query is of type `GetTasksByOwnerIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetTasksByOwnerIdData { + tasks: ({ + id: UUIDString; + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Task_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getTasksByOwnerId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetTasksByOwnerIdVariables } from '@dataconnect/generated'; +import { useGetTasksByOwnerId } from '@dataconnect/generated/react' + +export default function GetTasksByOwnerIdComponent() { + // The `useGetTasksByOwnerId` Query hook requires an argument of type `GetTasksByOwnerIdVariables`: + const getTasksByOwnerIdVars: GetTasksByOwnerIdVariables = { + ownerId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetTasksByOwnerId(getTasksByOwnerIdVars); + // Variables can be defined inline as well. + const query = useGetTasksByOwnerId({ ownerId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetTasksByOwnerId(dataConnect, getTasksByOwnerIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetTasksByOwnerId(getTasksByOwnerIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetTasksByOwnerId(dataConnect, getTasksByOwnerIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.tasks); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterTasks +You can execute the `filterTasks` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterTasks(dc: DataConnect, vars?: FilterTasksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterTasks(vars?: FilterTasksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterTasks` Query has an optional argument of type `FilterTasksVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterTasksVariables { + status?: TaskStatus | null; + priority?: TaskPriority | null; +} +``` +### Return Type +Recall that calling the `filterTasks` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterTasks` Query is of type `FilterTasksData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterTasksData { + tasks: ({ + id: UUIDString; + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Task_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterTasks`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterTasksVariables } from '@dataconnect/generated'; +import { useFilterTasks } from '@dataconnect/generated/react' + +export default function FilterTasksComponent() { + // The `useFilterTasks` Query hook has an optional argument of type `FilterTasksVariables`: + const filterTasksVars: FilterTasksVariables = { + status: ..., // optional + priority: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterTasks(filterTasksVars); + // Variables can be defined inline as well. + const query = useFilterTasks({ status: ..., priority: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterTasksVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterTasks(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterTasks(dataConnect, filterTasksVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterTasks(filterTasksVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterTasks(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterTasks(dataConnect, filterTasksVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.tasks); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listTeamHubs +You can execute the `listTeamHubs` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListTeamHubs(dc: DataConnect, vars?: ListTeamHubsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListTeamHubs(vars?: ListTeamHubsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listTeamHubs` Query has an optional argument of type `ListTeamHubsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListTeamHubsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listTeamHubs` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listTeamHubs` Query is of type `ListTeamHubsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListTeamHubsData { + teamHubs: ({ + id: UUIDString; + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive: boolean; + departments?: unknown | null; + } & TeamHub_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listTeamHubs`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListTeamHubsVariables } from '@dataconnect/generated'; +import { useListTeamHubs } from '@dataconnect/generated/react' + +export default function ListTeamHubsComponent() { + // The `useListTeamHubs` Query hook has an optional argument of type `ListTeamHubsVariables`: + const listTeamHubsVars: ListTeamHubsVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListTeamHubs(listTeamHubsVars); + // Variables can be defined inline as well. + const query = useListTeamHubs({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListTeamHubsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListTeamHubs(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListTeamHubs(dataConnect, listTeamHubsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListTeamHubs(listTeamHubsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListTeamHubs(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListTeamHubs(dataConnect, listTeamHubsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.teamHubs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getTeamHubById +You can execute the `getTeamHubById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetTeamHubById(dc: DataConnect, vars: GetTeamHubByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetTeamHubById(vars: GetTeamHubByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getTeamHubById` Query requires an argument of type `GetTeamHubByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetTeamHubByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getTeamHubById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getTeamHubById` Query is of type `GetTeamHubByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetTeamHubByIdData { + teamHub?: { + id: UUIDString; + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive: boolean; + departments?: unknown | null; + } & TeamHub_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getTeamHubById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetTeamHubByIdVariables } from '@dataconnect/generated'; +import { useGetTeamHubById } from '@dataconnect/generated/react' + +export default function GetTeamHubByIdComponent() { + // The `useGetTeamHubById` Query hook requires an argument of type `GetTeamHubByIdVariables`: + const getTeamHubByIdVars: GetTeamHubByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetTeamHubById(getTeamHubByIdVars); + // Variables can be defined inline as well. + const query = useGetTeamHubById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetTeamHubById(dataConnect, getTeamHubByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamHubById(getTeamHubByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamHubById(dataConnect, getTeamHubByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.teamHub); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getTeamHubsByTeamId +You can execute the `getTeamHubsByTeamId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetTeamHubsByTeamId(dc: DataConnect, vars: GetTeamHubsByTeamIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetTeamHubsByTeamId(vars: GetTeamHubsByTeamIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getTeamHubsByTeamId` Query requires an argument of type `GetTeamHubsByTeamIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetTeamHubsByTeamIdVariables { + teamId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `getTeamHubsByTeamId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getTeamHubsByTeamId` Query is of type `GetTeamHubsByTeamIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetTeamHubsByTeamIdData { + teamHubs: ({ + id: UUIDString; + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive: boolean; + departments?: unknown | null; + } & TeamHub_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getTeamHubsByTeamId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetTeamHubsByTeamIdVariables } from '@dataconnect/generated'; +import { useGetTeamHubsByTeamId } from '@dataconnect/generated/react' + +export default function GetTeamHubsByTeamIdComponent() { + // The `useGetTeamHubsByTeamId` Query hook requires an argument of type `GetTeamHubsByTeamIdVariables`: + const getTeamHubsByTeamIdVars: GetTeamHubsByTeamIdVariables = { + teamId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetTeamHubsByTeamId(getTeamHubsByTeamIdVars); + // Variables can be defined inline as well. + const query = useGetTeamHubsByTeamId({ teamId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetTeamHubsByTeamId(dataConnect, getTeamHubsByTeamIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamHubsByTeamId(getTeamHubsByTeamIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamHubsByTeamId(dataConnect, getTeamHubsByTeamIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.teamHubs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listTeamHubsByOwnerId +You can execute the `listTeamHubsByOwnerId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListTeamHubsByOwnerId(dc: DataConnect, vars: ListTeamHubsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListTeamHubsByOwnerId(vars: ListTeamHubsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listTeamHubsByOwnerId` Query requires an argument of type `ListTeamHubsByOwnerIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListTeamHubsByOwnerIdVariables { + ownerId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listTeamHubsByOwnerId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listTeamHubsByOwnerId` Query is of type `ListTeamHubsByOwnerIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListTeamHubsByOwnerIdData { + teamHubs: ({ + id: UUIDString; + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive: boolean; + departments?: unknown | null; + } & TeamHub_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listTeamHubsByOwnerId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListTeamHubsByOwnerIdVariables } from '@dataconnect/generated'; +import { useListTeamHubsByOwnerId } from '@dataconnect/generated/react' + +export default function ListTeamHubsByOwnerIdComponent() { + // The `useListTeamHubsByOwnerId` Query hook requires an argument of type `ListTeamHubsByOwnerIdVariables`: + const listTeamHubsByOwnerIdVars: ListTeamHubsByOwnerIdVariables = { + ownerId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListTeamHubsByOwnerId(listTeamHubsByOwnerIdVars); + // Variables can be defined inline as well. + const query = useListTeamHubsByOwnerId({ ownerId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListTeamHubsByOwnerId(dataConnect, listTeamHubsByOwnerIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListTeamHubsByOwnerId(listTeamHubsByOwnerIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListTeamHubsByOwnerId(dataConnect, listTeamHubsByOwnerIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.teamHubs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listClientFeedbacks +You can execute the `listClientFeedbacks` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListClientFeedbacks(dc: DataConnect, vars?: ListClientFeedbacksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListClientFeedbacks(vars?: ListClientFeedbacksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listClientFeedbacks` Query has an optional argument of type `ListClientFeedbacksVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListClientFeedbacksVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listClientFeedbacks` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listClientFeedbacks` Query is of type `ListClientFeedbacksData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListClientFeedbacksData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listClientFeedbacks`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListClientFeedbacksVariables } from '@dataconnect/generated'; +import { useListClientFeedbacks } from '@dataconnect/generated/react' + +export default function ListClientFeedbacksComponent() { + // The `useListClientFeedbacks` Query hook has an optional argument of type `ListClientFeedbacksVariables`: + const listClientFeedbacksVars: ListClientFeedbacksVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListClientFeedbacks(listClientFeedbacksVars); + // Variables can be defined inline as well. + const query = useListClientFeedbacks({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListClientFeedbacksVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListClientFeedbacks(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListClientFeedbacks(dataConnect, listClientFeedbacksVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListClientFeedbacks(listClientFeedbacksVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListClientFeedbacks(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListClientFeedbacks(dataConnect, listClientFeedbacksVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.clientFeedbacks); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getClientFeedbackById +You can execute the `getClientFeedbackById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetClientFeedbackById(dc: DataConnect, vars: GetClientFeedbackByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetClientFeedbackById(vars: GetClientFeedbackByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getClientFeedbackById` Query requires an argument of type `GetClientFeedbackByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetClientFeedbackByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getClientFeedbackById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getClientFeedbackById` Query is of type `GetClientFeedbackByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetClientFeedbackByIdData { + clientFeedback?: { + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getClientFeedbackById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetClientFeedbackByIdVariables } from '@dataconnect/generated'; +import { useGetClientFeedbackById } from '@dataconnect/generated/react' + +export default function GetClientFeedbackByIdComponent() { + // The `useGetClientFeedbackById` Query hook requires an argument of type `GetClientFeedbackByIdVariables`: + const getClientFeedbackByIdVars: GetClientFeedbackByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetClientFeedbackById(getClientFeedbackByIdVars); + // Variables can be defined inline as well. + const query = useGetClientFeedbackById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetClientFeedbackById(dataConnect, getClientFeedbackByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetClientFeedbackById(getClientFeedbackByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetClientFeedbackById(dataConnect, getClientFeedbackByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.clientFeedback); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listClientFeedbacksByBusinessId +You can execute the `listClientFeedbacksByBusinessId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListClientFeedbacksByBusinessId(dc: DataConnect, vars: ListClientFeedbacksByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListClientFeedbacksByBusinessId(vars: ListClientFeedbacksByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listClientFeedbacksByBusinessId` Query requires an argument of type `ListClientFeedbacksByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListClientFeedbacksByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listClientFeedbacksByBusinessId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listClientFeedbacksByBusinessId` Query is of type `ListClientFeedbacksByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListClientFeedbacksByBusinessIdData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listClientFeedbacksByBusinessId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListClientFeedbacksByBusinessIdVariables } from '@dataconnect/generated'; +import { useListClientFeedbacksByBusinessId } from '@dataconnect/generated/react' + +export default function ListClientFeedbacksByBusinessIdComponent() { + // The `useListClientFeedbacksByBusinessId` Query hook requires an argument of type `ListClientFeedbacksByBusinessIdVariables`: + const listClientFeedbacksByBusinessIdVars: ListClientFeedbacksByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListClientFeedbacksByBusinessId(listClientFeedbacksByBusinessIdVars); + // Variables can be defined inline as well. + const query = useListClientFeedbacksByBusinessId({ businessId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListClientFeedbacksByBusinessId(dataConnect, listClientFeedbacksByBusinessIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListClientFeedbacksByBusinessId(listClientFeedbacksByBusinessIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListClientFeedbacksByBusinessId(dataConnect, listClientFeedbacksByBusinessIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.clientFeedbacks); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listClientFeedbacksByVendorId +You can execute the `listClientFeedbacksByVendorId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListClientFeedbacksByVendorId(dc: DataConnect, vars: ListClientFeedbacksByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListClientFeedbacksByVendorId(vars: ListClientFeedbacksByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listClientFeedbacksByVendorId` Query requires an argument of type `ListClientFeedbacksByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListClientFeedbacksByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listClientFeedbacksByVendorId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listClientFeedbacksByVendorId` Query is of type `ListClientFeedbacksByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListClientFeedbacksByVendorIdData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listClientFeedbacksByVendorId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListClientFeedbacksByVendorIdVariables } from '@dataconnect/generated'; +import { useListClientFeedbacksByVendorId } from '@dataconnect/generated/react' + +export default function ListClientFeedbacksByVendorIdComponent() { + // The `useListClientFeedbacksByVendorId` Query hook requires an argument of type `ListClientFeedbacksByVendorIdVariables`: + const listClientFeedbacksByVendorIdVars: ListClientFeedbacksByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListClientFeedbacksByVendorId(listClientFeedbacksByVendorIdVars); + // Variables can be defined inline as well. + const query = useListClientFeedbacksByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListClientFeedbacksByVendorId(dataConnect, listClientFeedbacksByVendorIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListClientFeedbacksByVendorId(listClientFeedbacksByVendorIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListClientFeedbacksByVendorId(dataConnect, listClientFeedbacksByVendorIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.clientFeedbacks); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listClientFeedbacksByBusinessAndVendor +You can execute the `listClientFeedbacksByBusinessAndVendor` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListClientFeedbacksByBusinessAndVendor(dc: DataConnect, vars: ListClientFeedbacksByBusinessAndVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListClientFeedbacksByBusinessAndVendor(vars: ListClientFeedbacksByBusinessAndVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listClientFeedbacksByBusinessAndVendor` Query requires an argument of type `ListClientFeedbacksByBusinessAndVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListClientFeedbacksByBusinessAndVendorVariables { + businessId: UUIDString; + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listClientFeedbacksByBusinessAndVendor` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listClientFeedbacksByBusinessAndVendor` Query is of type `ListClientFeedbacksByBusinessAndVendorData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListClientFeedbacksByBusinessAndVendorData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdAt?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listClientFeedbacksByBusinessAndVendor`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListClientFeedbacksByBusinessAndVendorVariables } from '@dataconnect/generated'; +import { useListClientFeedbacksByBusinessAndVendor } from '@dataconnect/generated/react' + +export default function ListClientFeedbacksByBusinessAndVendorComponent() { + // The `useListClientFeedbacksByBusinessAndVendor` Query hook requires an argument of type `ListClientFeedbacksByBusinessAndVendorVariables`: + const listClientFeedbacksByBusinessAndVendorVars: ListClientFeedbacksByBusinessAndVendorVariables = { + businessId: ..., + vendorId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListClientFeedbacksByBusinessAndVendor(listClientFeedbacksByBusinessAndVendorVars); + // Variables can be defined inline as well. + const query = useListClientFeedbacksByBusinessAndVendor({ businessId: ..., vendorId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListClientFeedbacksByBusinessAndVendor(dataConnect, listClientFeedbacksByBusinessAndVendorVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListClientFeedbacksByBusinessAndVendor(listClientFeedbacksByBusinessAndVendorVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListClientFeedbacksByBusinessAndVendor(dataConnect, listClientFeedbacksByBusinessAndVendorVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.clientFeedbacks); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterClientFeedbacks +You can execute the `filterClientFeedbacks` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterClientFeedbacks(dc: DataConnect, vars?: FilterClientFeedbacksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterClientFeedbacks(vars?: FilterClientFeedbacksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterClientFeedbacks` Query has an optional argument of type `FilterClientFeedbacksVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterClientFeedbacksVariables { + businessId?: UUIDString | null; + vendorId?: UUIDString | null; + ratingMin?: number | null; + ratingMax?: number | null; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `filterClientFeedbacks` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterClientFeedbacks` Query is of type `FilterClientFeedbacksData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterClientFeedbacksData { + clientFeedbacks: ({ + id: UUIDString; + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterClientFeedbacks`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterClientFeedbacksVariables } from '@dataconnect/generated'; +import { useFilterClientFeedbacks } from '@dataconnect/generated/react' + +export default function FilterClientFeedbacksComponent() { + // The `useFilterClientFeedbacks` Query hook has an optional argument of type `FilterClientFeedbacksVariables`: + const filterClientFeedbacksVars: FilterClientFeedbacksVariables = { + businessId: ..., // optional + vendorId: ..., // optional + ratingMin: ..., // optional + ratingMax: ..., // optional + dateFrom: ..., // optional + dateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterClientFeedbacks(filterClientFeedbacksVars); + // Variables can be defined inline as well. + const query = useFilterClientFeedbacks({ businessId: ..., vendorId: ..., ratingMin: ..., ratingMax: ..., dateFrom: ..., dateTo: ..., offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterClientFeedbacksVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterClientFeedbacks(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterClientFeedbacks(dataConnect, filterClientFeedbacksVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterClientFeedbacks(filterClientFeedbacksVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterClientFeedbacks(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterClientFeedbacks(dataConnect, filterClientFeedbacksVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.clientFeedbacks); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listClientFeedbackRatingsByVendorId +You can execute the `listClientFeedbackRatingsByVendorId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListClientFeedbackRatingsByVendorId(dc: DataConnect, vars: ListClientFeedbackRatingsByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListClientFeedbackRatingsByVendorId(vars: ListClientFeedbackRatingsByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listClientFeedbackRatingsByVendorId` Query requires an argument of type `ListClientFeedbackRatingsByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListClientFeedbackRatingsByVendorIdVariables { + vendorId: UUIDString; + dateFrom?: TimestampString | null; + dateTo?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `listClientFeedbackRatingsByVendorId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listClientFeedbackRatingsByVendorId` Query is of type `ListClientFeedbackRatingsByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListClientFeedbackRatingsByVendorIdData { + clientFeedbacks: ({ + id: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + business: { + id: UUIDString; + businessName: string; + } & Business_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & ClientFeedback_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listClientFeedbackRatingsByVendorId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListClientFeedbackRatingsByVendorIdVariables } from '@dataconnect/generated'; +import { useListClientFeedbackRatingsByVendorId } from '@dataconnect/generated/react' + +export default function ListClientFeedbackRatingsByVendorIdComponent() { + // The `useListClientFeedbackRatingsByVendorId` Query hook requires an argument of type `ListClientFeedbackRatingsByVendorIdVariables`: + const listClientFeedbackRatingsByVendorIdVars: ListClientFeedbackRatingsByVendorIdVariables = { + vendorId: ..., + dateFrom: ..., // optional + dateTo: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListClientFeedbackRatingsByVendorId(listClientFeedbackRatingsByVendorIdVars); + // Variables can be defined inline as well. + const query = useListClientFeedbackRatingsByVendorId({ vendorId: ..., dateFrom: ..., dateTo: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListClientFeedbackRatingsByVendorId(dataConnect, listClientFeedbackRatingsByVendorIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListClientFeedbackRatingsByVendorId(listClientFeedbackRatingsByVendorIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListClientFeedbackRatingsByVendorId(dataConnect, listClientFeedbackRatingsByVendorIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.clientFeedbacks); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listUsers +You can execute the `listUsers` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListUsers(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListUsers(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listUsers` Query has no variables. +### Return Type +Recall that calling the `listUsers` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listUsers` Query is of type `ListUsersData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListUsersData { + users: ({ + id: string; + email?: string | null; + fullName?: string | null; + role: UserBaseRole; + userRole?: string | null; + photoUrl?: string | null; + createdDate?: TimestampString | null; + updatedDate?: TimestampString | null; + } & User_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listUsers`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListUsers } from '@dataconnect/generated/react' + +export default function ListUsersComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListUsers(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListUsers(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListUsers(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListUsers(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.users); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getUserById +You can execute the `getUserById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetUserById(dc: DataConnect, vars: GetUserByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetUserById(vars: GetUserByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getUserById` Query requires an argument of type `GetUserByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetUserByIdVariables { + id: string; +} +``` +### Return Type +Recall that calling the `getUserById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getUserById` Query is of type `GetUserByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetUserByIdData { + user?: { + id: string; + email?: string | null; + fullName?: string | null; + role: UserBaseRole; + userRole?: string | null; + photoUrl?: string | null; + } & User_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getUserById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetUserByIdVariables } from '@dataconnect/generated'; +import { useGetUserById } from '@dataconnect/generated/react' + +export default function GetUserByIdComponent() { + // The `useGetUserById` Query hook requires an argument of type `GetUserByIdVariables`: + const getUserByIdVars: GetUserByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetUserById(getUserByIdVars); + // Variables can be defined inline as well. + const query = useGetUserById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetUserById(dataConnect, getUserByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetUserById(getUserByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetUserById(dataConnect, getUserByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.user); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterUsers +You can execute the `filterUsers` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterUsers(dc: DataConnect, vars?: FilterUsersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterUsers(vars?: FilterUsersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterUsers` Query has an optional argument of type `FilterUsersVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterUsersVariables { + id?: string | null; + email?: string | null; + role?: UserBaseRole | null; + userRole?: string | null; +} +``` +### Return Type +Recall that calling the `filterUsers` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterUsers` Query is of type `FilterUsersData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterUsersData { + users: ({ + id: string; + email?: string | null; + fullName?: string | null; + role: UserBaseRole; + userRole?: string | null; + photoUrl?: string | null; + } & User_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterUsers`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterUsersVariables } from '@dataconnect/generated'; +import { useFilterUsers } from '@dataconnect/generated/react' + +export default function FilterUsersComponent() { + // The `useFilterUsers` Query hook has an optional argument of type `FilterUsersVariables`: + const filterUsersVars: FilterUsersVariables = { + id: ..., // optional + email: ..., // optional + role: ..., // optional + userRole: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterUsers(filterUsersVars); + // Variables can be defined inline as well. + const query = useFilterUsers({ id: ..., email: ..., role: ..., userRole: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterUsersVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterUsers(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterUsers(dataConnect, filterUsersVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterUsers(filterUsersVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterUsers(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterUsers(dataConnect, filterUsersVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.users); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getVendorById +You can execute the `getVendorById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetVendorById(dc: DataConnect, vars: GetVendorByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetVendorById(vars: GetVendorByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getVendorById` Query requires an argument of type `GetVendorByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetVendorByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getVendorById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getVendorById` Query is of type `GetVendorByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetVendorByIdData { + vendor?: { + id: UUIDString; + userId: string; + companyName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Vendor_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getVendorById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetVendorByIdVariables } from '@dataconnect/generated'; +import { useGetVendorById } from '@dataconnect/generated/react' + +export default function GetVendorByIdComponent() { + // The `useGetVendorById` Query hook requires an argument of type `GetVendorByIdVariables`: + const getVendorByIdVars: GetVendorByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetVendorById(getVendorByIdVars); + // Variables can be defined inline as well. + const query = useGetVendorById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetVendorById(dataConnect, getVendorByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetVendorById(getVendorByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetVendorById(dataConnect, getVendorByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.vendor); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getVendorByUserId +You can execute the `getVendorByUserId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetVendorByUserId(dc: DataConnect, vars: GetVendorByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetVendorByUserId(vars: GetVendorByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getVendorByUserId` Query requires an argument of type `GetVendorByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetVendorByUserIdVariables { + userId: string; +} +``` +### Return Type +Recall that calling the `getVendorByUserId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getVendorByUserId` Query is of type `GetVendorByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetVendorByUserIdData { + vendors: ({ + id: UUIDString; + userId: string; + companyName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Vendor_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getVendorByUserId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetVendorByUserIdVariables } from '@dataconnect/generated'; +import { useGetVendorByUserId } from '@dataconnect/generated/react' + +export default function GetVendorByUserIdComponent() { + // The `useGetVendorByUserId` Query hook requires an argument of type `GetVendorByUserIdVariables`: + const getVendorByUserIdVars: GetVendorByUserIdVariables = { + userId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetVendorByUserId(getVendorByUserIdVars); + // Variables can be defined inline as well. + const query = useGetVendorByUserId({ userId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetVendorByUserId(dataConnect, getVendorByUserIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetVendorByUserId(getVendorByUserIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetVendorByUserId(dataConnect, getVendorByUserIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.vendors); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listVendors +You can execute the `listVendors` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListVendors(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListVendors(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listVendors` Query has no variables. +### Return Type +Recall that calling the `listVendors` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listVendors` Query is of type `ListVendorsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListVendorsData { + vendors: ({ + id: UUIDString; + userId: string; + companyName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Vendor_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listVendors`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListVendors } from '@dataconnect/generated/react' + +export default function ListVendorsComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListVendors(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListVendors(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListVendors(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListVendors(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.vendors); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listCategories +You can execute the `listCategories` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListCategories(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListCategories(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listCategories` Query has no variables. +### Return Type +Recall that calling the `listCategories` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listCategories` Query is of type `ListCategoriesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListCategoriesData { + categories: ({ + id: UUIDString; + categoryId: string; + label: string; + icon?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Category_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listCategories`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListCategories } from '@dataconnect/generated/react' + +export default function ListCategoriesComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListCategories(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListCategories(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListCategories(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListCategories(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.categories); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getCategoryById +You can execute the `getCategoryById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetCategoryById(dc: DataConnect, vars: GetCategoryByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetCategoryById(vars: GetCategoryByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getCategoryById` Query requires an argument of type `GetCategoryByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetCategoryByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getCategoryById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getCategoryById` Query is of type `GetCategoryByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetCategoryByIdData { + category?: { + id: UUIDString; + categoryId: string; + label: string; + icon?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Category_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getCategoryById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetCategoryByIdVariables } from '@dataconnect/generated'; +import { useGetCategoryById } from '@dataconnect/generated/react' + +export default function GetCategoryByIdComponent() { + // The `useGetCategoryById` Query hook requires an argument of type `GetCategoryByIdVariables`: + const getCategoryByIdVars: GetCategoryByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetCategoryById(getCategoryByIdVars); + // Variables can be defined inline as well. + const query = useGetCategoryById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetCategoryById(dataConnect, getCategoryByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetCategoryById(getCategoryByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetCategoryById(dataConnect, getCategoryByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.category); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterCategories +You can execute the `filterCategories` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterCategories(dc: DataConnect, vars?: FilterCategoriesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterCategories(vars?: FilterCategoriesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterCategories` Query has an optional argument of type `FilterCategoriesVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterCategoriesVariables { + categoryId?: string | null; + label?: string | null; +} +``` +### Return Type +Recall that calling the `filterCategories` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterCategories` Query is of type `FilterCategoriesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterCategoriesData { + categories: ({ + id: UUIDString; + categoryId: string; + label: string; + icon?: string | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Category_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterCategories`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterCategoriesVariables } from '@dataconnect/generated'; +import { useFilterCategories } from '@dataconnect/generated/react' + +export default function FilterCategoriesComponent() { + // The `useFilterCategories` Query hook has an optional argument of type `FilterCategoriesVariables`: + const filterCategoriesVars: FilterCategoriesVariables = { + categoryId: ..., // optional + label: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterCategories(filterCategoriesVars); + // Variables can be defined inline as well. + const query = useFilterCategories({ categoryId: ..., label: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterCategoriesVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterCategories(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterCategories(dataConnect, filterCategoriesVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterCategories(filterCategoriesVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterCategories(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterCategories(dataConnect, filterCategoriesVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.categories); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listMessages +You can execute the `listMessages` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListMessages(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListMessages(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listMessages` Query has no variables. +### Return Type +Recall that calling the `listMessages` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listMessages` Query is of type `ListMessagesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListMessagesData { + messages: ({ + id: UUIDString; + conversationId: UUIDString; + senderId: string; + content: string; + isSystem?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + }; + } & Message_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listMessages`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListMessages } from '@dataconnect/generated/react' + +export default function ListMessagesComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListMessages(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListMessages(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListMessages(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListMessages(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.messages); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getMessageById +You can execute the `getMessageById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetMessageById(dc: DataConnect, vars: GetMessageByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetMessageById(vars: GetMessageByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getMessageById` Query requires an argument of type `GetMessageByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetMessageByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getMessageById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getMessageById` Query is of type `GetMessageByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetMessageByIdData { + message?: { + id: UUIDString; + conversationId: UUIDString; + senderId: string; + content: string; + isSystem?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + }; + } & Message_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getMessageById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetMessageByIdVariables } from '@dataconnect/generated'; +import { useGetMessageById } from '@dataconnect/generated/react' + +export default function GetMessageByIdComponent() { + // The `useGetMessageById` Query hook requires an argument of type `GetMessageByIdVariables`: + const getMessageByIdVars: GetMessageByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetMessageById(getMessageByIdVars); + // Variables can be defined inline as well. + const query = useGetMessageById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetMessageById(dataConnect, getMessageByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetMessageById(getMessageByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetMessageById(dataConnect, getMessageByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.message); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getMessagesByConversationId +You can execute the `getMessagesByConversationId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetMessagesByConversationId(dc: DataConnect, vars: GetMessagesByConversationIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetMessagesByConversationId(vars: GetMessagesByConversationIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getMessagesByConversationId` Query requires an argument of type `GetMessagesByConversationIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetMessagesByConversationIdVariables { + conversationId: UUIDString; +} +``` +### Return Type +Recall that calling the `getMessagesByConversationId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getMessagesByConversationId` Query is of type `GetMessagesByConversationIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetMessagesByConversationIdData { + messages: ({ + id: UUIDString; + conversationId: UUIDString; + senderId: string; + content: string; + isSystem?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + }; + } & Message_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getMessagesByConversationId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetMessagesByConversationIdVariables } from '@dataconnect/generated'; +import { useGetMessagesByConversationId } from '@dataconnect/generated/react' + +export default function GetMessagesByConversationIdComponent() { + // The `useGetMessagesByConversationId` Query hook requires an argument of type `GetMessagesByConversationIdVariables`: + const getMessagesByConversationIdVars: GetMessagesByConversationIdVariables = { + conversationId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetMessagesByConversationId(getMessagesByConversationIdVars); + // Variables can be defined inline as well. + const query = useGetMessagesByConversationId({ conversationId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetMessagesByConversationId(dataConnect, getMessagesByConversationIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetMessagesByConversationId(getMessagesByConversationIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetMessagesByConversationId(dataConnect, getMessagesByConversationIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.messages); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listUserConversations +You can execute the `listUserConversations` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListUserConversations(dc: DataConnect, vars?: ListUserConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListUserConversations(vars?: ListUserConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listUserConversations` Query has an optional argument of type `ListUserConversationsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListUserConversationsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listUserConversations` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listUserConversations` Query is of type `ListUserConversationsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListUserConversationsData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listUserConversations`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListUserConversationsVariables } from '@dataconnect/generated'; +import { useListUserConversations } from '@dataconnect/generated/react' + +export default function ListUserConversationsComponent() { + // The `useListUserConversations` Query hook has an optional argument of type `ListUserConversationsVariables`: + const listUserConversationsVars: ListUserConversationsVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListUserConversations(listUserConversationsVars); + // Variables can be defined inline as well. + const query = useListUserConversations({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListUserConversationsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListUserConversations(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListUserConversations(dataConnect, listUserConversationsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListUserConversations(listUserConversationsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListUserConversations(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListUserConversations(dataConnect, listUserConversationsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.userConversations); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getUserConversationByKey +You can execute the `getUserConversationByKey` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetUserConversationByKey(dc: DataConnect, vars: GetUserConversationByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetUserConversationByKey(vars: GetUserConversationByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getUserConversationByKey` Query requires an argument of type `GetUserConversationByKeyVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetUserConversationByKeyVariables { + conversationId: UUIDString; + userId: string; +} +``` +### Return Type +Recall that calling the `getUserConversationByKey` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getUserConversationByKey` Query is of type `GetUserConversationByKeyData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetUserConversationByKeyData { + userConversation?: { + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getUserConversationByKey`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetUserConversationByKeyVariables } from '@dataconnect/generated'; +import { useGetUserConversationByKey } from '@dataconnect/generated/react' + +export default function GetUserConversationByKeyComponent() { + // The `useGetUserConversationByKey` Query hook requires an argument of type `GetUserConversationByKeyVariables`: + const getUserConversationByKeyVars: GetUserConversationByKeyVariables = { + conversationId: ..., + userId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetUserConversationByKey(getUserConversationByKeyVars); + // Variables can be defined inline as well. + const query = useGetUserConversationByKey({ conversationId: ..., userId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetUserConversationByKey(dataConnect, getUserConversationByKeyVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetUserConversationByKey(getUserConversationByKeyVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetUserConversationByKey(dataConnect, getUserConversationByKeyVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.userConversation); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listUserConversationsByUserId +You can execute the `listUserConversationsByUserId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListUserConversationsByUserId(dc: DataConnect, vars: ListUserConversationsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListUserConversationsByUserId(vars: ListUserConversationsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listUserConversationsByUserId` Query requires an argument of type `ListUserConversationsByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListUserConversationsByUserIdVariables { + userId: string; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listUserConversationsByUserId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listUserConversationsByUserId` Query is of type `ListUserConversationsByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListUserConversationsByUserIdData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listUserConversationsByUserId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListUserConversationsByUserIdVariables } from '@dataconnect/generated'; +import { useListUserConversationsByUserId } from '@dataconnect/generated/react' + +export default function ListUserConversationsByUserIdComponent() { + // The `useListUserConversationsByUserId` Query hook requires an argument of type `ListUserConversationsByUserIdVariables`: + const listUserConversationsByUserIdVars: ListUserConversationsByUserIdVariables = { + userId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListUserConversationsByUserId(listUserConversationsByUserIdVars); + // Variables can be defined inline as well. + const query = useListUserConversationsByUserId({ userId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListUserConversationsByUserId(dataConnect, listUserConversationsByUserIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListUserConversationsByUserId(listUserConversationsByUserIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListUserConversationsByUserId(dataConnect, listUserConversationsByUserIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.userConversations); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listUnreadUserConversationsByUserId +You can execute the `listUnreadUserConversationsByUserId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListUnreadUserConversationsByUserId(dc: DataConnect, vars: ListUnreadUserConversationsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListUnreadUserConversationsByUserId(vars: ListUnreadUserConversationsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listUnreadUserConversationsByUserId` Query requires an argument of type `ListUnreadUserConversationsByUserIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListUnreadUserConversationsByUserIdVariables { + userId: string; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listUnreadUserConversationsByUserId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listUnreadUserConversationsByUserId` Query is of type `ListUnreadUserConversationsByUserIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListUnreadUserConversationsByUserIdData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + } & Conversation_Key; + } & UserConversation_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listUnreadUserConversationsByUserId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListUnreadUserConversationsByUserIdVariables } from '@dataconnect/generated'; +import { useListUnreadUserConversationsByUserId } from '@dataconnect/generated/react' + +export default function ListUnreadUserConversationsByUserIdComponent() { + // The `useListUnreadUserConversationsByUserId` Query hook requires an argument of type `ListUnreadUserConversationsByUserIdVariables`: + const listUnreadUserConversationsByUserIdVars: ListUnreadUserConversationsByUserIdVariables = { + userId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListUnreadUserConversationsByUserId(listUnreadUserConversationsByUserIdVars); + // Variables can be defined inline as well. + const query = useListUnreadUserConversationsByUserId({ userId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListUnreadUserConversationsByUserId(dataConnect, listUnreadUserConversationsByUserIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListUnreadUserConversationsByUserId(listUnreadUserConversationsByUserIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListUnreadUserConversationsByUserId(dataConnect, listUnreadUserConversationsByUserIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.userConversations); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listUserConversationsByConversationId +You can execute the `listUserConversationsByConversationId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListUserConversationsByConversationId(dc: DataConnect, vars: ListUserConversationsByConversationIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListUserConversationsByConversationId(vars: ListUserConversationsByConversationIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listUserConversationsByConversationId` Query requires an argument of type `ListUserConversationsByConversationIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListUserConversationsByConversationIdVariables { + conversationId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listUserConversationsByConversationId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listUserConversationsByConversationId` Query is of type `ListUserConversationsByConversationIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListUserConversationsByConversationIdData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listUserConversationsByConversationId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListUserConversationsByConversationIdVariables } from '@dataconnect/generated'; +import { useListUserConversationsByConversationId } from '@dataconnect/generated/react' + +export default function ListUserConversationsByConversationIdComponent() { + // The `useListUserConversationsByConversationId` Query hook requires an argument of type `ListUserConversationsByConversationIdVariables`: + const listUserConversationsByConversationIdVars: ListUserConversationsByConversationIdVariables = { + conversationId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListUserConversationsByConversationId(listUserConversationsByConversationIdVars); + // Variables can be defined inline as well. + const query = useListUserConversationsByConversationId({ conversationId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListUserConversationsByConversationId(dataConnect, listUserConversationsByConversationIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListUserConversationsByConversationId(listUserConversationsByConversationIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListUserConversationsByConversationId(dataConnect, listUserConversationsByConversationIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.userConversations); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterUserConversations +You can execute the `filterUserConversations` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterUserConversations(dc: DataConnect, vars?: FilterUserConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterUserConversations(vars?: FilterUserConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterUserConversations` Query has an optional argument of type `FilterUserConversationsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterUserConversationsVariables { + userId?: string | null; + conversationId?: UUIDString | null; + unreadMin?: number | null; + unreadMax?: number | null; + lastReadAfter?: TimestampString | null; + lastReadBefore?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `filterUserConversations` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterUserConversations` Query is of type `FilterUserConversationsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterUserConversationsData { + userConversations: ({ + id: UUIDString; + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; + createdAt?: TimestampString | null; + conversation: { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; + createdAt?: TimestampString | null; + } & Conversation_Key; + user: { + id: string; + fullName?: string | null; + photoUrl?: string | null; + } & User_Key; + } & UserConversation_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterUserConversations`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterUserConversationsVariables } from '@dataconnect/generated'; +import { useFilterUserConversations } from '@dataconnect/generated/react' + +export default function FilterUserConversationsComponent() { + // The `useFilterUserConversations` Query hook has an optional argument of type `FilterUserConversationsVariables`: + const filterUserConversationsVars: FilterUserConversationsVariables = { + userId: ..., // optional + conversationId: ..., // optional + unreadMin: ..., // optional + unreadMax: ..., // optional + lastReadAfter: ..., // optional + lastReadBefore: ..., // optional + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterUserConversations(filterUserConversationsVars); + // Variables can be defined inline as well. + const query = useFilterUserConversations({ userId: ..., conversationId: ..., unreadMin: ..., unreadMax: ..., lastReadAfter: ..., lastReadBefore: ..., offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterUserConversationsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterUserConversations(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterUserConversations(dataConnect, filterUserConversationsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterUserConversations(filterUserConversationsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterUserConversations(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterUserConversations(dataConnect, filterUserConversationsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.userConversations); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listHubs +You can execute the `listHubs` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListHubs(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListHubs(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listHubs` Query has no variables. +### Return Type +Recall that calling the `listHubs` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listHubs` Query is of type `ListHubsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListHubsData { + hubs: ({ + id: UUIDString; + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Hub_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listHubs`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListHubs } from '@dataconnect/generated/react' + +export default function ListHubsComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListHubs(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListHubs(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListHubs(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListHubs(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.hubs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getHubById +You can execute the `getHubById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetHubById(dc: DataConnect, vars: GetHubByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetHubById(vars: GetHubByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getHubById` Query requires an argument of type `GetHubByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetHubByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getHubById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getHubById` Query is of type `GetHubByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetHubByIdData { + hub?: { + id: UUIDString; + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Hub_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getHubById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetHubByIdVariables } from '@dataconnect/generated'; +import { useGetHubById } from '@dataconnect/generated/react' + +export default function GetHubByIdComponent() { + // The `useGetHubById` Query hook requires an argument of type `GetHubByIdVariables`: + const getHubByIdVars: GetHubByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetHubById(getHubByIdVars); + // Variables can be defined inline as well. + const query = useGetHubById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetHubById(dataConnect, getHubByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetHubById(getHubByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetHubById(dataConnect, getHubByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.hub); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getHubsByOwnerId +You can execute the `getHubsByOwnerId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetHubsByOwnerId(dc: DataConnect, vars: GetHubsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetHubsByOwnerId(vars: GetHubsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getHubsByOwnerId` Query requires an argument of type `GetHubsByOwnerIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetHubsByOwnerIdVariables { + ownerId: UUIDString; +} +``` +### Return Type +Recall that calling the `getHubsByOwnerId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getHubsByOwnerId` Query is of type `GetHubsByOwnerIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetHubsByOwnerIdData { + hubs: ({ + id: UUIDString; + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Hub_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getHubsByOwnerId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetHubsByOwnerIdVariables } from '@dataconnect/generated'; +import { useGetHubsByOwnerId } from '@dataconnect/generated/react' + +export default function GetHubsByOwnerIdComponent() { + // The `useGetHubsByOwnerId` Query hook requires an argument of type `GetHubsByOwnerIdVariables`: + const getHubsByOwnerIdVars: GetHubsByOwnerIdVariables = { + ownerId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetHubsByOwnerId(getHubsByOwnerIdVars); + // Variables can be defined inline as well. + const query = useGetHubsByOwnerId({ ownerId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetHubsByOwnerId(dataConnect, getHubsByOwnerIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetHubsByOwnerId(getHubsByOwnerIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetHubsByOwnerId(dataConnect, getHubsByOwnerIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.hubs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterHubs +You can execute the `filterHubs` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterHubs(dc: DataConnect, vars?: FilterHubsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterHubs(vars?: FilterHubsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterHubs` Query has an optional argument of type `FilterHubsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterHubsVariables { + ownerId?: UUIDString | null; + name?: string | null; + nfcTagId?: string | null; +} +``` +### Return Type +Recall that calling the `filterHubs` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterHubs` Query is of type `FilterHubsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterHubsData { + hubs: ({ + id: UUIDString; + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; + } & Hub_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterHubs`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterHubsVariables } from '@dataconnect/generated'; +import { useFilterHubs } from '@dataconnect/generated/react' + +export default function FilterHubsComponent() { + // The `useFilterHubs` Query hook has an optional argument of type `FilterHubsVariables`: + const filterHubsVars: FilterHubsVariables = { + ownerId: ..., // optional + name: ..., // optional + nfcTagId: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterHubs(filterHubsVars); + // Variables can be defined inline as well. + const query = useFilterHubs({ ownerId: ..., name: ..., nfcTagId: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterHubsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterHubs(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterHubs(dataConnect, filterHubsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterHubs(filterHubsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterHubs(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterHubs(dataConnect, filterHubsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.hubs); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listInvoices +You can execute the `listInvoices` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListInvoices(dc: DataConnect, vars?: ListInvoicesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListInvoices(vars?: ListInvoicesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listInvoices` Query has an optional argument of type `ListInvoicesVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListInvoicesVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listInvoices` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listInvoices` Query is of type `ListInvoicesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListInvoicesData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listInvoices`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListInvoicesVariables } from '@dataconnect/generated'; +import { useListInvoices } from '@dataconnect/generated/react' + +export default function ListInvoicesComponent() { + // The `useListInvoices` Query hook has an optional argument of type `ListInvoicesVariables`: + const listInvoicesVars: ListInvoicesVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListInvoices(listInvoicesVars); + // Variables can be defined inline as well. + const query = useListInvoices({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListInvoicesVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListInvoices(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListInvoices(dataConnect, listInvoicesVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListInvoices(listInvoicesVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListInvoices(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListInvoices(dataConnect, listInvoicesVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoices); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getInvoiceById +You can execute the `getInvoiceById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetInvoiceById(dc: DataConnect, vars: GetInvoiceByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetInvoiceById(vars: GetInvoiceByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getInvoiceById` Query requires an argument of type `GetInvoiceByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetInvoiceByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getInvoiceById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getInvoiceById` Query is of type `GetInvoiceByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetInvoiceByIdData { + invoice?: { + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getInvoiceById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetInvoiceByIdVariables } from '@dataconnect/generated'; +import { useGetInvoiceById } from '@dataconnect/generated/react' + +export default function GetInvoiceByIdComponent() { + // The `useGetInvoiceById` Query hook requires an argument of type `GetInvoiceByIdVariables`: + const getInvoiceByIdVars: GetInvoiceByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetInvoiceById(getInvoiceByIdVars); + // Variables can be defined inline as well. + const query = useGetInvoiceById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetInvoiceById(dataConnect, getInvoiceByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetInvoiceById(getInvoiceByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetInvoiceById(dataConnect, getInvoiceByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoice); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listInvoicesByVendorId +You can execute the `listInvoicesByVendorId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListInvoicesByVendorId(dc: DataConnect, vars: ListInvoicesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListInvoicesByVendorId(vars: ListInvoicesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listInvoicesByVendorId` Query requires an argument of type `ListInvoicesByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListInvoicesByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listInvoicesByVendorId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listInvoicesByVendorId` Query is of type `ListInvoicesByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListInvoicesByVendorIdData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listInvoicesByVendorId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListInvoicesByVendorIdVariables } from '@dataconnect/generated'; +import { useListInvoicesByVendorId } from '@dataconnect/generated/react' + +export default function ListInvoicesByVendorIdComponent() { + // The `useListInvoicesByVendorId` Query hook requires an argument of type `ListInvoicesByVendorIdVariables`: + const listInvoicesByVendorIdVars: ListInvoicesByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListInvoicesByVendorId(listInvoicesByVendorIdVars); + // Variables can be defined inline as well. + const query = useListInvoicesByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListInvoicesByVendorId(dataConnect, listInvoicesByVendorIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesByVendorId(listInvoicesByVendorIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesByVendorId(dataConnect, listInvoicesByVendorIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoices); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listInvoicesByBusinessId +You can execute the `listInvoicesByBusinessId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListInvoicesByBusinessId(dc: DataConnect, vars: ListInvoicesByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListInvoicesByBusinessId(vars: ListInvoicesByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listInvoicesByBusinessId` Query requires an argument of type `ListInvoicesByBusinessIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListInvoicesByBusinessIdVariables { + businessId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listInvoicesByBusinessId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listInvoicesByBusinessId` Query is of type `ListInvoicesByBusinessIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListInvoicesByBusinessIdData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listInvoicesByBusinessId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListInvoicesByBusinessIdVariables } from '@dataconnect/generated'; +import { useListInvoicesByBusinessId } from '@dataconnect/generated/react' + +export default function ListInvoicesByBusinessIdComponent() { + // The `useListInvoicesByBusinessId` Query hook requires an argument of type `ListInvoicesByBusinessIdVariables`: + const listInvoicesByBusinessIdVars: ListInvoicesByBusinessIdVariables = { + businessId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListInvoicesByBusinessId(listInvoicesByBusinessIdVars); + // Variables can be defined inline as well. + const query = useListInvoicesByBusinessId({ businessId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListInvoicesByBusinessId(dataConnect, listInvoicesByBusinessIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesByBusinessId(listInvoicesByBusinessIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesByBusinessId(dataConnect, listInvoicesByBusinessIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoices); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listInvoicesByOrderId +You can execute the `listInvoicesByOrderId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListInvoicesByOrderId(dc: DataConnect, vars: ListInvoicesByOrderIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListInvoicesByOrderId(vars: ListInvoicesByOrderIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listInvoicesByOrderId` Query requires an argument of type `ListInvoicesByOrderIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListInvoicesByOrderIdVariables { + orderId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listInvoicesByOrderId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listInvoicesByOrderId` Query is of type `ListInvoicesByOrderIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListInvoicesByOrderIdData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listInvoicesByOrderId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListInvoicesByOrderIdVariables } from '@dataconnect/generated'; +import { useListInvoicesByOrderId } from '@dataconnect/generated/react' + +export default function ListInvoicesByOrderIdComponent() { + // The `useListInvoicesByOrderId` Query hook requires an argument of type `ListInvoicesByOrderIdVariables`: + const listInvoicesByOrderIdVars: ListInvoicesByOrderIdVariables = { + orderId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListInvoicesByOrderId(listInvoicesByOrderIdVars); + // Variables can be defined inline as well. + const query = useListInvoicesByOrderId({ orderId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListInvoicesByOrderId(dataConnect, listInvoicesByOrderIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesByOrderId(listInvoicesByOrderIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesByOrderId(dataConnect, listInvoicesByOrderIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoices); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listInvoicesByStatus +You can execute the `listInvoicesByStatus` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListInvoicesByStatus(dc: DataConnect, vars: ListInvoicesByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListInvoicesByStatus(vars: ListInvoicesByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listInvoicesByStatus` Query requires an argument of type `ListInvoicesByStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListInvoicesByStatusVariables { + status: InvoiceStatus; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listInvoicesByStatus` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listInvoicesByStatus` Query is of type `ListInvoicesByStatusData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListInvoicesByStatusData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listInvoicesByStatus`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListInvoicesByStatusVariables } from '@dataconnect/generated'; +import { useListInvoicesByStatus } from '@dataconnect/generated/react' + +export default function ListInvoicesByStatusComponent() { + // The `useListInvoicesByStatus` Query hook requires an argument of type `ListInvoicesByStatusVariables`: + const listInvoicesByStatusVars: ListInvoicesByStatusVariables = { + status: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListInvoicesByStatus(listInvoicesByStatusVars); + // Variables can be defined inline as well. + const query = useListInvoicesByStatus({ status: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListInvoicesByStatus(dataConnect, listInvoicesByStatusVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesByStatus(listInvoicesByStatusVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListInvoicesByStatus(dataConnect, listInvoicesByStatusVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoices); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterInvoices +You can execute the `filterInvoices` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterInvoices(dc: DataConnect, vars?: FilterInvoicesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterInvoices(vars?: FilterInvoicesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterInvoices` Query has an optional argument of type `FilterInvoicesVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterInvoicesVariables { + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + status?: InvoiceStatus | null; + issueDateFrom?: TimestampString | null; + issueDateTo?: TimestampString | null; + dueDateFrom?: TimestampString | null; + dueDateTo?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `filterInvoices` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterInvoices` Query is of type `FilterInvoicesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterInvoicesData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterInvoices`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterInvoicesVariables } from '@dataconnect/generated'; +import { useFilterInvoices } from '@dataconnect/generated/react' + +export default function FilterInvoicesComponent() { + // The `useFilterInvoices` Query hook has an optional argument of type `FilterInvoicesVariables`: + const filterInvoicesVars: FilterInvoicesVariables = { + vendorId: ..., // optional + businessId: ..., // optional + orderId: ..., // optional + status: ..., // optional + issueDateFrom: ..., // optional + issueDateTo: ..., // optional + dueDateFrom: ..., // optional + dueDateTo: ..., // optional + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterInvoices(filterInvoicesVars); + // Variables can be defined inline as well. + const query = useFilterInvoices({ vendorId: ..., businessId: ..., orderId: ..., status: ..., issueDateFrom: ..., issueDateTo: ..., dueDateFrom: ..., dueDateTo: ..., offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterInvoicesVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterInvoices(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterInvoices(dataConnect, filterInvoicesVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterInvoices(filterInvoicesVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterInvoices(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterInvoices(dataConnect, filterInvoicesVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoices); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listOverdueInvoices +You can execute the `listOverdueInvoices` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListOverdueInvoices(dc: DataConnect, vars: ListOverdueInvoicesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListOverdueInvoices(vars: ListOverdueInvoicesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listOverdueInvoices` Query requires an argument of type `ListOverdueInvoicesVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListOverdueInvoicesVariables { + now: TimestampString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listOverdueInvoices` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listOverdueInvoices` Query is of type `ListOverdueInvoicesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListOverdueInvoicesData { + invoices: ({ + id: UUIDString; + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; + vendor: { + companyName: string; + address?: string | null; + email?: string | null; + phone?: string | null; + }; + business: { + businessName: string; + address?: string | null; + phone?: string | null; + email?: string | null; + }; + order: { + eventName?: string | null; + deparment?: string | null; + poReference?: string | null; + teamHub: { + address: string; + placeId?: string | null; + hubName: string; + }; + }; + } & Invoice_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listOverdueInvoices`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListOverdueInvoicesVariables } from '@dataconnect/generated'; +import { useListOverdueInvoices } from '@dataconnect/generated/react' + +export default function ListOverdueInvoicesComponent() { + // The `useListOverdueInvoices` Query hook requires an argument of type `ListOverdueInvoicesVariables`: + const listOverdueInvoicesVars: ListOverdueInvoicesVariables = { + now: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListOverdueInvoices(listOverdueInvoicesVars); + // Variables can be defined inline as well. + const query = useListOverdueInvoices({ now: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListOverdueInvoices(dataConnect, listOverdueInvoicesVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListOverdueInvoices(listOverdueInvoicesVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListOverdueInvoices(dataConnect, listOverdueInvoicesVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.invoices); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listCourses +You can execute the `listCourses` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListCourses(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListCourses(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listCourses` Query has no variables. +### Return Type +Recall that calling the `listCourses` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listCourses` Query is of type `ListCoursesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListCoursesData { + courses: ({ + id: UUIDString; + title?: string | null; + description?: string | null; + thumbnailUrl?: string | null; + durationMinutes?: number | null; + xpReward?: number | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; + createdAt?: TimestampString | null; + category: { + id: UUIDString; + label: string; + } & Category_Key; + } & Course_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listCourses`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListCourses } from '@dataconnect/generated/react' + +export default function ListCoursesComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListCourses(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListCourses(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListCourses(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListCourses(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.courses); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getCourseById +You can execute the `getCourseById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetCourseById(dc: DataConnect, vars: GetCourseByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetCourseById(vars: GetCourseByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getCourseById` Query requires an argument of type `GetCourseByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetCourseByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getCourseById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getCourseById` Query is of type `GetCourseByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetCourseByIdData { + course?: { + id: UUIDString; + title?: string | null; + description?: string | null; + thumbnailUrl?: string | null; + durationMinutes?: number | null; + xpReward?: number | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; + createdAt?: TimestampString | null; + category: { + id: UUIDString; + label: string; + } & Category_Key; + } & Course_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getCourseById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetCourseByIdVariables } from '@dataconnect/generated'; +import { useGetCourseById } from '@dataconnect/generated/react' + +export default function GetCourseByIdComponent() { + // The `useGetCourseById` Query hook requires an argument of type `GetCourseByIdVariables`: + const getCourseByIdVars: GetCourseByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetCourseById(getCourseByIdVars); + // Variables can be defined inline as well. + const query = useGetCourseById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetCourseById(dataConnect, getCourseByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetCourseById(getCourseByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetCourseById(dataConnect, getCourseByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.course); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterCourses +You can execute the `filterCourses` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterCourses(dc: DataConnect, vars?: FilterCoursesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterCourses(vars?: FilterCoursesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterCourses` Query has an optional argument of type `FilterCoursesVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterCoursesVariables { + categoryId?: UUIDString | null; + isCertification?: boolean | null; + levelRequired?: string | null; + completed?: boolean | null; +} +``` +### Return Type +Recall that calling the `filterCourses` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterCourses` Query is of type `FilterCoursesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterCoursesData { + courses: ({ + id: UUIDString; + title?: string | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; + category: { + id: UUIDString; + label: string; + } & Category_Key; + } & Course_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterCourses`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterCoursesVariables } from '@dataconnect/generated'; +import { useFilterCourses } from '@dataconnect/generated/react' + +export default function FilterCoursesComponent() { + // The `useFilterCourses` Query hook has an optional argument of type `FilterCoursesVariables`: + const filterCoursesVars: FilterCoursesVariables = { + categoryId: ..., // optional + isCertification: ..., // optional + levelRequired: ..., // optional + completed: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterCourses(filterCoursesVars); + // Variables can be defined inline as well. + const query = useFilterCourses({ categoryId: ..., isCertification: ..., levelRequired: ..., completed: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterCoursesVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterCourses(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterCourses(dataConnect, filterCoursesVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterCourses(filterCoursesVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterCourses(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterCourses(dataConnect, filterCoursesVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.courses); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listVendorRates +You can execute the `listVendorRates` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListVendorRates(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListVendorRates(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listVendorRates` Query has no variables. +### Return Type +Recall that calling the `listVendorRates` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listVendorRates` Query is of type `ListVendorRatesData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListVendorRatesData { + vendorRates: ({ + id: UUIDString; + vendorId: UUIDString; + roleName?: string | null; + category?: CategoryType | null; + clientRate?: number | null; + employeeWage?: number | null; + markupPercentage?: number | null; + vendorFeePercentage?: number | null; + isActive?: boolean | null; + notes?: string | null; + createdAt?: TimestampString | null; + vendor: { + companyName: string; + region?: string | null; + }; + } & VendorRate_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listVendorRates`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListVendorRates } from '@dataconnect/generated/react' + +export default function ListVendorRatesComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListVendorRates(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListVendorRates(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListVendorRates(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListVendorRates(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.vendorRates); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getVendorRateById +You can execute the `getVendorRateById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetVendorRateById(dc: DataConnect, vars: GetVendorRateByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetVendorRateById(vars: GetVendorRateByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getVendorRateById` Query requires an argument of type `GetVendorRateByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetVendorRateByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getVendorRateById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getVendorRateById` Query is of type `GetVendorRateByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetVendorRateByIdData { + vendorRate?: { + id: UUIDString; + vendorId: UUIDString; + roleName?: string | null; + category?: CategoryType | null; + clientRate?: number | null; + employeeWage?: number | null; + markupPercentage?: number | null; + vendorFeePercentage?: number | null; + isActive?: boolean | null; + notes?: string | null; + createdAt?: TimestampString | null; + vendor: { + companyName: string; + region?: string | null; + }; + } & VendorRate_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getVendorRateById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetVendorRateByIdVariables } from '@dataconnect/generated'; +import { useGetVendorRateById } from '@dataconnect/generated/react' + +export default function GetVendorRateByIdComponent() { + // The `useGetVendorRateById` Query hook requires an argument of type `GetVendorRateByIdVariables`: + const getVendorRateByIdVars: GetVendorRateByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetVendorRateById(getVendorRateByIdVars); + // Variables can be defined inline as well. + const query = useGetVendorRateById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetVendorRateById(dataConnect, getVendorRateByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetVendorRateById(getVendorRateByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetVendorRateById(dataConnect, getVendorRateByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.vendorRate); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getWorkforceById +You can execute the `getWorkforceById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetWorkforceById(dc: DataConnect, vars: GetWorkforceByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetWorkforceById(vars: GetWorkforceByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getWorkforceById` Query requires an argument of type `GetWorkforceByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetWorkforceByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getWorkforceById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getWorkforceById` Query is of type `GetWorkforceByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetWorkforceByIdData { + workforce?: { + id: UUIDString; + vendorId: UUIDString; + staffId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Workforce_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getWorkforceById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetWorkforceByIdVariables } from '@dataconnect/generated'; +import { useGetWorkforceById } from '@dataconnect/generated/react' + +export default function GetWorkforceByIdComponent() { + // The `useGetWorkforceById` Query hook requires an argument of type `GetWorkforceByIdVariables`: + const getWorkforceByIdVars: GetWorkforceByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetWorkforceById(getWorkforceByIdVars); + // Variables can be defined inline as well. + const query = useGetWorkforceById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetWorkforceById(dataConnect, getWorkforceByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetWorkforceById(getWorkforceByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetWorkforceById(dataConnect, getWorkforceByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.workforce); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getWorkforceByVendorAndStaff +You can execute the `getWorkforceByVendorAndStaff` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetWorkforceByVendorAndStaff(dc: DataConnect, vars: GetWorkforceByVendorAndStaffVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetWorkforceByVendorAndStaff(vars: GetWorkforceByVendorAndStaffVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getWorkforceByVendorAndStaff` Query requires an argument of type `GetWorkforceByVendorAndStaffVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetWorkforceByVendorAndStaffVariables { + vendorId: UUIDString; + staffId: UUIDString; +} +``` +### Return Type +Recall that calling the `getWorkforceByVendorAndStaff` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getWorkforceByVendorAndStaff` Query is of type `GetWorkforceByVendorAndStaffData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetWorkforceByVendorAndStaffData { + workforces: ({ + id: UUIDString; + vendorId: UUIDString; + staffId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Workforce_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getWorkforceByVendorAndStaff`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetWorkforceByVendorAndStaffVariables } from '@dataconnect/generated'; +import { useGetWorkforceByVendorAndStaff } from '@dataconnect/generated/react' + +export default function GetWorkforceByVendorAndStaffComponent() { + // The `useGetWorkforceByVendorAndStaff` Query hook requires an argument of type `GetWorkforceByVendorAndStaffVariables`: + const getWorkforceByVendorAndStaffVars: GetWorkforceByVendorAndStaffVariables = { + vendorId: ..., + staffId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetWorkforceByVendorAndStaff(getWorkforceByVendorAndStaffVars); + // Variables can be defined inline as well. + const query = useGetWorkforceByVendorAndStaff({ vendorId: ..., staffId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetWorkforceByVendorAndStaff(dataConnect, getWorkforceByVendorAndStaffVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetWorkforceByVendorAndStaff(getWorkforceByVendorAndStaffVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetWorkforceByVendorAndStaff(dataConnect, getWorkforceByVendorAndStaffVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.workforces); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listWorkforceByVendorId +You can execute the `listWorkforceByVendorId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListWorkforceByVendorId(dc: DataConnect, vars: ListWorkforceByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListWorkforceByVendorId(vars: ListWorkforceByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listWorkforceByVendorId` Query requires an argument of type `ListWorkforceByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListWorkforceByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listWorkforceByVendorId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listWorkforceByVendorId` Query is of type `ListWorkforceByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListWorkforceByVendorIdData { + workforces: ({ + id: UUIDString; + staffId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; + createdAt?: TimestampString | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & Workforce_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listWorkforceByVendorId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListWorkforceByVendorIdVariables } from '@dataconnect/generated'; +import { useListWorkforceByVendorId } from '@dataconnect/generated/react' + +export default function ListWorkforceByVendorIdComponent() { + // The `useListWorkforceByVendorId` Query hook requires an argument of type `ListWorkforceByVendorIdVariables`: + const listWorkforceByVendorIdVars: ListWorkforceByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListWorkforceByVendorId(listWorkforceByVendorIdVars); + // Variables can be defined inline as well. + const query = useListWorkforceByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListWorkforceByVendorId(dataConnect, listWorkforceByVendorIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListWorkforceByVendorId(listWorkforceByVendorIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListWorkforceByVendorId(dataConnect, listWorkforceByVendorIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.workforces); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listWorkforceByStaffId +You can execute the `listWorkforceByStaffId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListWorkforceByStaffId(dc: DataConnect, vars: ListWorkforceByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListWorkforceByStaffId(vars: ListWorkforceByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listWorkforceByStaffId` Query requires an argument of type `ListWorkforceByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListWorkforceByStaffIdVariables { + staffId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listWorkforceByStaffId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listWorkforceByStaffId` Query is of type `ListWorkforceByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListWorkforceByStaffIdData { + workforces: ({ + id: UUIDString; + vendorId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + vendor: { + id: UUIDString; + companyName: string; + } & Vendor_Key; + } & Workforce_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listWorkforceByStaffId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListWorkforceByStaffIdVariables } from '@dataconnect/generated'; +import { useListWorkforceByStaffId } from '@dataconnect/generated/react' + +export default function ListWorkforceByStaffIdComponent() { + // The `useListWorkforceByStaffId` Query hook requires an argument of type `ListWorkforceByStaffIdVariables`: + const listWorkforceByStaffIdVars: ListWorkforceByStaffIdVariables = { + staffId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListWorkforceByStaffId(listWorkforceByStaffIdVars); + // Variables can be defined inline as well. + const query = useListWorkforceByStaffId({ staffId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListWorkforceByStaffId(dataConnect, listWorkforceByStaffIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListWorkforceByStaffId(listWorkforceByStaffIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListWorkforceByStaffId(dataConnect, listWorkforceByStaffIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.workforces); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getWorkforceByVendorAndNumber +You can execute the `getWorkforceByVendorAndNumber` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetWorkforceByVendorAndNumber(dc: DataConnect, vars: GetWorkforceByVendorAndNumberVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetWorkforceByVendorAndNumber(vars: GetWorkforceByVendorAndNumberVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getWorkforceByVendorAndNumber` Query requires an argument of type `GetWorkforceByVendorAndNumberVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetWorkforceByVendorAndNumberVariables { + vendorId: UUIDString; + workforceNumber: string; +} +``` +### Return Type +Recall that calling the `getWorkforceByVendorAndNumber` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getWorkforceByVendorAndNumber` Query is of type `GetWorkforceByVendorAndNumberData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetWorkforceByVendorAndNumberData { + workforces: ({ + id: UUIDString; + staffId: UUIDString; + workforceNumber: string; + status?: WorkforceStatus | null; + } & Workforce_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getWorkforceByVendorAndNumber`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetWorkforceByVendorAndNumberVariables } from '@dataconnect/generated'; +import { useGetWorkforceByVendorAndNumber } from '@dataconnect/generated/react' + +export default function GetWorkforceByVendorAndNumberComponent() { + // The `useGetWorkforceByVendorAndNumber` Query hook requires an argument of type `GetWorkforceByVendorAndNumberVariables`: + const getWorkforceByVendorAndNumberVars: GetWorkforceByVendorAndNumberVariables = { + vendorId: ..., + workforceNumber: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetWorkforceByVendorAndNumber(getWorkforceByVendorAndNumberVars); + // Variables can be defined inline as well. + const query = useGetWorkforceByVendorAndNumber({ vendorId: ..., workforceNumber: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetWorkforceByVendorAndNumber(dataConnect, getWorkforceByVendorAndNumberVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetWorkforceByVendorAndNumber(getWorkforceByVendorAndNumberVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetWorkforceByVendorAndNumber(dataConnect, getWorkforceByVendorAndNumberVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.workforces); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listStaffAvailabilityStats +You can execute the `listStaffAvailabilityStats` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListStaffAvailabilityStats(dc: DataConnect, vars?: ListStaffAvailabilityStatsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListStaffAvailabilityStats(vars?: ListStaffAvailabilityStatsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listStaffAvailabilityStats` Query has an optional argument of type `ListStaffAvailabilityStatsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListStaffAvailabilityStatsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listStaffAvailabilityStats` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listStaffAvailabilityStats` Query is of type `ListStaffAvailabilityStatsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListStaffAvailabilityStatsData { + staffAvailabilityStatss: ({ + id: UUIDString; + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailabilityStats_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listStaffAvailabilityStats`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListStaffAvailabilityStatsVariables } from '@dataconnect/generated'; +import { useListStaffAvailabilityStats } from '@dataconnect/generated/react' + +export default function ListStaffAvailabilityStatsComponent() { + // The `useListStaffAvailabilityStats` Query hook has an optional argument of type `ListStaffAvailabilityStatsVariables`: + const listStaffAvailabilityStatsVars: ListStaffAvailabilityStatsVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListStaffAvailabilityStats(listStaffAvailabilityStatsVars); + // Variables can be defined inline as well. + const query = useListStaffAvailabilityStats({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListStaffAvailabilityStatsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListStaffAvailabilityStats(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListStaffAvailabilityStats(dataConnect, listStaffAvailabilityStatsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListStaffAvailabilityStats(listStaffAvailabilityStatsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListStaffAvailabilityStats(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListStaffAvailabilityStats(dataConnect, listStaffAvailabilityStatsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffAvailabilityStatss); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getStaffAvailabilityStatsByStaffId +You can execute the `getStaffAvailabilityStatsByStaffId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetStaffAvailabilityStatsByStaffId(dc: DataConnect, vars: GetStaffAvailabilityStatsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetStaffAvailabilityStatsByStaffId(vars: GetStaffAvailabilityStatsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getStaffAvailabilityStatsByStaffId` Query requires an argument of type `GetStaffAvailabilityStatsByStaffIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetStaffAvailabilityStatsByStaffIdVariables { + staffId: UUIDString; +} +``` +### Return Type +Recall that calling the `getStaffAvailabilityStatsByStaffId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getStaffAvailabilityStatsByStaffId` Query is of type `GetStaffAvailabilityStatsByStaffIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetStaffAvailabilityStatsByStaffIdData { + staffAvailabilityStats?: { + id: UUIDString; + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailabilityStats_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getStaffAvailabilityStatsByStaffId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetStaffAvailabilityStatsByStaffIdVariables } from '@dataconnect/generated'; +import { useGetStaffAvailabilityStatsByStaffId } from '@dataconnect/generated/react' + +export default function GetStaffAvailabilityStatsByStaffIdComponent() { + // The `useGetStaffAvailabilityStatsByStaffId` Query hook requires an argument of type `GetStaffAvailabilityStatsByStaffIdVariables`: + const getStaffAvailabilityStatsByStaffIdVars: GetStaffAvailabilityStatsByStaffIdVariables = { + staffId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetStaffAvailabilityStatsByStaffId(getStaffAvailabilityStatsByStaffIdVars); + // Variables can be defined inline as well. + const query = useGetStaffAvailabilityStatsByStaffId({ staffId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetStaffAvailabilityStatsByStaffId(dataConnect, getStaffAvailabilityStatsByStaffIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffAvailabilityStatsByStaffId(getStaffAvailabilityStatsByStaffIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetStaffAvailabilityStatsByStaffId(dataConnect, getStaffAvailabilityStatsByStaffIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffAvailabilityStats); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterStaffAvailabilityStats +You can execute the `filterStaffAvailabilityStats` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterStaffAvailabilityStats(dc: DataConnect, vars?: FilterStaffAvailabilityStatsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterStaffAvailabilityStats(vars?: FilterStaffAvailabilityStatsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterStaffAvailabilityStats` Query has an optional argument of type `FilterStaffAvailabilityStatsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterStaffAvailabilityStatsVariables { + needWorkIndexMin?: number | null; + needWorkIndexMax?: number | null; + utilizationMin?: number | null; + utilizationMax?: number | null; + acceptanceRateMin?: number | null; + acceptanceRateMax?: number | null; + lastShiftAfter?: TimestampString | null; + lastShiftBefore?: TimestampString | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `filterStaffAvailabilityStats` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterStaffAvailabilityStats` Query is of type `FilterStaffAvailabilityStatsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterStaffAvailabilityStatsData { + staffAvailabilityStatss: ({ + id: UUIDString; + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + staff: { + id: UUIDString; + fullName: string; + } & Staff_Key; + } & StaffAvailabilityStats_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterStaffAvailabilityStats`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterStaffAvailabilityStatsVariables } from '@dataconnect/generated'; +import { useFilterStaffAvailabilityStats } from '@dataconnect/generated/react' + +export default function FilterStaffAvailabilityStatsComponent() { + // The `useFilterStaffAvailabilityStats` Query hook has an optional argument of type `FilterStaffAvailabilityStatsVariables`: + const filterStaffAvailabilityStatsVars: FilterStaffAvailabilityStatsVariables = { + needWorkIndexMin: ..., // optional + needWorkIndexMax: ..., // optional + utilizationMin: ..., // optional + utilizationMax: ..., // optional + acceptanceRateMin: ..., // optional + acceptanceRateMax: ..., // optional + lastShiftAfter: ..., // optional + lastShiftBefore: ..., // optional + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterStaffAvailabilityStats(filterStaffAvailabilityStatsVars); + // Variables can be defined inline as well. + const query = useFilterStaffAvailabilityStats({ needWorkIndexMin: ..., needWorkIndexMax: ..., utilizationMin: ..., utilizationMax: ..., acceptanceRateMin: ..., acceptanceRateMax: ..., lastShiftAfter: ..., lastShiftBefore: ..., offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterStaffAvailabilityStatsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterStaffAvailabilityStats(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterStaffAvailabilityStats(dataConnect, filterStaffAvailabilityStatsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterStaffAvailabilityStats(filterStaffAvailabilityStatsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterStaffAvailabilityStats(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterStaffAvailabilityStats(dataConnect, filterStaffAvailabilityStatsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.staffAvailabilityStatss); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listTeamHudDepartments +You can execute the `listTeamHudDepartments` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListTeamHudDepartments(dc: DataConnect, vars?: ListTeamHudDepartmentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListTeamHudDepartments(vars?: ListTeamHudDepartmentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listTeamHudDepartments` Query has an optional argument of type `ListTeamHudDepartmentsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListTeamHudDepartmentsVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listTeamHudDepartments` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listTeamHudDepartments` Query is of type `ListTeamHudDepartmentsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListTeamHudDepartmentsData { + teamHudDepartments: ({ + id: UUIDString; + name: string; + costCenter?: string | null; + teamHubId: UUIDString; + teamHub: { + id: UUIDString; + hubName: string; + } & TeamHub_Key; + createdAt?: TimestampString | null; + } & TeamHudDepartment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listTeamHudDepartments`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListTeamHudDepartmentsVariables } from '@dataconnect/generated'; +import { useListTeamHudDepartments } from '@dataconnect/generated/react' + +export default function ListTeamHudDepartmentsComponent() { + // The `useListTeamHudDepartments` Query hook has an optional argument of type `ListTeamHudDepartmentsVariables`: + const listTeamHudDepartmentsVars: ListTeamHudDepartmentsVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListTeamHudDepartments(listTeamHudDepartmentsVars); + // Variables can be defined inline as well. + const query = useListTeamHudDepartments({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListTeamHudDepartmentsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListTeamHudDepartments(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListTeamHudDepartments(dataConnect, listTeamHudDepartmentsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListTeamHudDepartments(listTeamHudDepartmentsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListTeamHudDepartments(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListTeamHudDepartments(dataConnect, listTeamHudDepartmentsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.teamHudDepartments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getTeamHudDepartmentById +You can execute the `getTeamHudDepartmentById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetTeamHudDepartmentById(dc: DataConnect, vars: GetTeamHudDepartmentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetTeamHudDepartmentById(vars: GetTeamHudDepartmentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getTeamHudDepartmentById` Query requires an argument of type `GetTeamHudDepartmentByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetTeamHudDepartmentByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getTeamHudDepartmentById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getTeamHudDepartmentById` Query is of type `GetTeamHudDepartmentByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetTeamHudDepartmentByIdData { + teamHudDepartment?: { + id: UUIDString; + name: string; + costCenter?: string | null; + teamHubId: UUIDString; + teamHub: { + id: UUIDString; + hubName: string; + } & TeamHub_Key; + createdAt?: TimestampString | null; + } & TeamHudDepartment_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getTeamHudDepartmentById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetTeamHudDepartmentByIdVariables } from '@dataconnect/generated'; +import { useGetTeamHudDepartmentById } from '@dataconnect/generated/react' + +export default function GetTeamHudDepartmentByIdComponent() { + // The `useGetTeamHudDepartmentById` Query hook requires an argument of type `GetTeamHudDepartmentByIdVariables`: + const getTeamHudDepartmentByIdVars: GetTeamHudDepartmentByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetTeamHudDepartmentById(getTeamHudDepartmentByIdVars); + // Variables can be defined inline as well. + const query = useGetTeamHudDepartmentById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetTeamHudDepartmentById(dataConnect, getTeamHudDepartmentByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamHudDepartmentById(getTeamHudDepartmentByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamHudDepartmentById(dataConnect, getTeamHudDepartmentByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.teamHudDepartment); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listTeamHudDepartmentsByTeamHubId +You can execute the `listTeamHudDepartmentsByTeamHubId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListTeamHudDepartmentsByTeamHubId(dc: DataConnect, vars: ListTeamHudDepartmentsByTeamHubIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListTeamHudDepartmentsByTeamHubId(vars: ListTeamHudDepartmentsByTeamHubIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listTeamHudDepartmentsByTeamHubId` Query requires an argument of type `ListTeamHudDepartmentsByTeamHubIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListTeamHudDepartmentsByTeamHubIdVariables { + teamHubId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listTeamHudDepartmentsByTeamHubId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listTeamHudDepartmentsByTeamHubId` Query is of type `ListTeamHudDepartmentsByTeamHubIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListTeamHudDepartmentsByTeamHubIdData { + teamHudDepartments: ({ + id: UUIDString; + name: string; + costCenter?: string | null; + teamHubId: UUIDString; + teamHub: { + id: UUIDString; + hubName: string; + } & TeamHub_Key; + createdAt?: TimestampString | null; + } & TeamHudDepartment_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listTeamHudDepartmentsByTeamHubId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListTeamHudDepartmentsByTeamHubIdVariables } from '@dataconnect/generated'; +import { useListTeamHudDepartmentsByTeamHubId } from '@dataconnect/generated/react' + +export default function ListTeamHudDepartmentsByTeamHubIdComponent() { + // The `useListTeamHudDepartmentsByTeamHubId` Query hook requires an argument of type `ListTeamHudDepartmentsByTeamHubIdVariables`: + const listTeamHudDepartmentsByTeamHubIdVars: ListTeamHudDepartmentsByTeamHubIdVariables = { + teamHubId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListTeamHudDepartmentsByTeamHubId(listTeamHudDepartmentsByTeamHubIdVars); + // Variables can be defined inline as well. + const query = useListTeamHudDepartmentsByTeamHubId({ teamHubId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListTeamHudDepartmentsByTeamHubId(dataConnect, listTeamHudDepartmentsByTeamHubIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListTeamHudDepartmentsByTeamHubId(listTeamHudDepartmentsByTeamHubIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListTeamHudDepartmentsByTeamHubId(dataConnect, listTeamHudDepartmentsByTeamHubIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.teamHudDepartments); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listLevels +You can execute the `listLevels` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListLevels(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListLevels(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listLevels` Query has no variables. +### Return Type +Recall that calling the `listLevels` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listLevels` Query is of type `ListLevelsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListLevelsData { + levels: ({ + id: UUIDString; + name: string; + xpRequired: number; + icon?: string | null; + colors?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Level_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listLevels`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListLevels } from '@dataconnect/generated/react' + +export default function ListLevelsComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListLevels(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListLevels(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListLevels(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListLevels(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.levels); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getLevelById +You can execute the `getLevelById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetLevelById(dc: DataConnect, vars: GetLevelByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetLevelById(vars: GetLevelByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getLevelById` Query requires an argument of type `GetLevelByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetLevelByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getLevelById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getLevelById` Query is of type `GetLevelByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetLevelByIdData { + level?: { + id: UUIDString; + name: string; + xpRequired: number; + icon?: string | null; + colors?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Level_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getLevelById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetLevelByIdVariables } from '@dataconnect/generated'; +import { useGetLevelById } from '@dataconnect/generated/react' + +export default function GetLevelByIdComponent() { + // The `useGetLevelById` Query hook requires an argument of type `GetLevelByIdVariables`: + const getLevelByIdVars: GetLevelByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetLevelById(getLevelByIdVars); + // Variables can be defined inline as well. + const query = useGetLevelById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetLevelById(dataConnect, getLevelByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetLevelById(getLevelByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetLevelById(dataConnect, getLevelByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.level); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterLevels +You can execute the `filterLevels` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterLevels(dc: DataConnect, vars?: FilterLevelsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterLevels(vars?: FilterLevelsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterLevels` Query has an optional argument of type `FilterLevelsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterLevelsVariables { + name?: string | null; + xpRequired?: number | null; +} +``` +### Return Type +Recall that calling the `filterLevels` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterLevels` Query is of type `FilterLevelsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterLevelsData { + levels: ({ + id: UUIDString; + name: string; + xpRequired: number; + icon?: string | null; + colors?: unknown | null; + } & Level_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterLevels`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterLevelsVariables } from '@dataconnect/generated'; +import { useFilterLevels } from '@dataconnect/generated/react' + +export default function FilterLevelsComponent() { + // The `useFilterLevels` Query hook has an optional argument of type `FilterLevelsVariables`: + const filterLevelsVars: FilterLevelsVariables = { + name: ..., // optional + xpRequired: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterLevels(filterLevelsVars); + // Variables can be defined inline as well. + const query = useFilterLevels({ name: ..., xpRequired: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterLevelsVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterLevels(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterLevels(dataConnect, filterLevelsVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterLevels(filterLevelsVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterLevels(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterLevels(dataConnect, filterLevelsVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.levels); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listTeams +You can execute the `listTeams` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListTeams(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListTeams(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listTeams` Query has no variables. +### Return Type +Recall that calling the `listTeams` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listTeams` Query is of type `ListTeamsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListTeamsData { + teams: ({ + id: UUIDString; + teamName: string; + ownerId: UUIDString; + ownerName: string; + ownerRole: string; + email?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Team_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listTeams`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListTeams } from '@dataconnect/generated/react' + +export default function ListTeamsComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListTeams(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListTeams(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListTeams(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListTeams(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.teams); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getTeamById +You can execute the `getTeamById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetTeamById(dc: DataConnect, vars: GetTeamByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetTeamById(vars: GetTeamByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getTeamById` Query requires an argument of type `GetTeamByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetTeamByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getTeamById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getTeamById` Query is of type `GetTeamByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetTeamByIdData { + team?: { + id: UUIDString; + teamName: string; + ownerId: UUIDString; + ownerName: string; + ownerRole: string; + email?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Team_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getTeamById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetTeamByIdVariables } from '@dataconnect/generated'; +import { useGetTeamById } from '@dataconnect/generated/react' + +export default function GetTeamByIdComponent() { + // The `useGetTeamById` Query hook requires an argument of type `GetTeamByIdVariables`: + const getTeamByIdVars: GetTeamByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetTeamById(getTeamByIdVars); + // Variables can be defined inline as well. + const query = useGetTeamById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetTeamById(dataConnect, getTeamByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamById(getTeamByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamById(dataConnect, getTeamByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.team); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getTeamsByOwnerId +You can execute the `getTeamsByOwnerId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetTeamsByOwnerId(dc: DataConnect, vars: GetTeamsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetTeamsByOwnerId(vars: GetTeamsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getTeamsByOwnerId` Query requires an argument of type `GetTeamsByOwnerIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetTeamsByOwnerIdVariables { + ownerId: UUIDString; +} +``` +### Return Type +Recall that calling the `getTeamsByOwnerId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getTeamsByOwnerId` Query is of type `GetTeamsByOwnerIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetTeamsByOwnerIdData { + teams: ({ + id: UUIDString; + teamName: string; + ownerId: UUIDString; + ownerName: string; + ownerRole: string; + email?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + } & Team_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getTeamsByOwnerId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetTeamsByOwnerIdVariables } from '@dataconnect/generated'; +import { useGetTeamsByOwnerId } from '@dataconnect/generated/react' + +export default function GetTeamsByOwnerIdComponent() { + // The `useGetTeamsByOwnerId` Query hook requires an argument of type `GetTeamsByOwnerIdVariables`: + const getTeamsByOwnerIdVars: GetTeamsByOwnerIdVariables = { + ownerId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetTeamsByOwnerId(getTeamsByOwnerIdVars); + // Variables can be defined inline as well. + const query = useGetTeamsByOwnerId({ ownerId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetTeamsByOwnerId(dataConnect, getTeamsByOwnerIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamsByOwnerId(getTeamsByOwnerIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamsByOwnerId(dataConnect, getTeamsByOwnerIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.teams); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listTeamMembers +You can execute the `listTeamMembers` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListTeamMembers(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListTeamMembers(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listTeamMembers` Query has no variables. +### Return Type +Recall that calling the `listTeamMembers` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listTeamMembers` Query is of type `ListTeamMembersData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListTeamMembersData { + teamMembers: ({ + id: UUIDString; + teamId: UUIDString; + role: TeamMemberRole; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + email?: string | null; + }; + teamHub?: { + hubName: string; + }; + } & TeamMember_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listTeamMembers`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig } from '@dataconnect/generated'; +import { useListTeamMembers } from '@dataconnect/generated/react' + +export default function ListTeamMembersComponent() { + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListTeamMembers(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListTeamMembers(dataConnect); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListTeamMembers(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListTeamMembers(dataConnect, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.teamMembers); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getTeamMemberById +You can execute the `getTeamMemberById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetTeamMemberById(dc: DataConnect, vars: GetTeamMemberByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetTeamMemberById(vars: GetTeamMemberByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getTeamMemberById` Query requires an argument of type `GetTeamMemberByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetTeamMemberByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getTeamMemberById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getTeamMemberById` Query is of type `GetTeamMemberByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetTeamMemberByIdData { + teamMember?: { + id: UUIDString; + teamId: UUIDString; + role: TeamMemberRole; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + email?: string | null; + }; + teamHub?: { + hubName: string; + }; + } & TeamMember_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getTeamMemberById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetTeamMemberByIdVariables } from '@dataconnect/generated'; +import { useGetTeamMemberById } from '@dataconnect/generated/react' + +export default function GetTeamMemberByIdComponent() { + // The `useGetTeamMemberById` Query hook requires an argument of type `GetTeamMemberByIdVariables`: + const getTeamMemberByIdVars: GetTeamMemberByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetTeamMemberById(getTeamMemberByIdVars); + // Variables can be defined inline as well. + const query = useGetTeamMemberById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetTeamMemberById(dataConnect, getTeamMemberByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamMemberById(getTeamMemberByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamMemberById(dataConnect, getTeamMemberByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.teamMember); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getTeamMembersByTeamId +You can execute the `getTeamMembersByTeamId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetTeamMembersByTeamId(dc: DataConnect, vars: GetTeamMembersByTeamIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetTeamMembersByTeamId(vars: GetTeamMembersByTeamIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getTeamMembersByTeamId` Query requires an argument of type `GetTeamMembersByTeamIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetTeamMembersByTeamIdVariables { + teamId: UUIDString; +} +``` +### Return Type +Recall that calling the `getTeamMembersByTeamId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getTeamMembersByTeamId` Query is of type `GetTeamMembersByTeamIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetTeamMembersByTeamIdData { + teamMembers: ({ + id: UUIDString; + teamId: UUIDString; + role: TeamMemberRole; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + user: { + fullName?: string | null; + email?: string | null; + }; + teamHub?: { + hubName: string; + }; + } & TeamMember_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getTeamMembersByTeamId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetTeamMembersByTeamIdVariables } from '@dataconnect/generated'; +import { useGetTeamMembersByTeamId } from '@dataconnect/generated/react' + +export default function GetTeamMembersByTeamIdComponent() { + // The `useGetTeamMembersByTeamId` Query hook requires an argument of type `GetTeamMembersByTeamIdVariables`: + const getTeamMembersByTeamIdVars: GetTeamMembersByTeamIdVariables = { + teamId: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetTeamMembersByTeamId(getTeamMembersByTeamIdVars); + // Variables can be defined inline as well. + const query = useGetTeamMembersByTeamId({ teamId: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetTeamMembersByTeamId(dataConnect, getTeamMembersByTeamIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamMembersByTeamId(getTeamMembersByTeamIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetTeamMembersByTeamId(dataConnect, getTeamMembersByTeamIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.teamMembers); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listVendorBenefitPlans +You can execute the `listVendorBenefitPlans` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListVendorBenefitPlans(dc: DataConnect, vars?: ListVendorBenefitPlansVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListVendorBenefitPlans(vars?: ListVendorBenefitPlansVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listVendorBenefitPlans` Query has an optional argument of type `ListVendorBenefitPlansVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListVendorBenefitPlansVariables { + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listVendorBenefitPlans` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listVendorBenefitPlans` Query is of type `ListVendorBenefitPlansData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListVendorBenefitPlansData { + vendorBenefitPlans: ({ + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listVendorBenefitPlans`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListVendorBenefitPlansVariables } from '@dataconnect/generated'; +import { useListVendorBenefitPlans } from '@dataconnect/generated/react' + +export default function ListVendorBenefitPlansComponent() { + // The `useListVendorBenefitPlans` Query hook has an optional argument of type `ListVendorBenefitPlansVariables`: + const listVendorBenefitPlansVars: ListVendorBenefitPlansVariables = { + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListVendorBenefitPlans(listVendorBenefitPlansVars); + // Variables can be defined inline as well. + const query = useListVendorBenefitPlans({ offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `ListVendorBenefitPlansVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useListVendorBenefitPlans(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListVendorBenefitPlans(dataConnect, listVendorBenefitPlansVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListVendorBenefitPlans(listVendorBenefitPlansVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useListVendorBenefitPlans(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListVendorBenefitPlans(dataConnect, listVendorBenefitPlansVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.vendorBenefitPlans); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## getVendorBenefitPlanById +You can execute the `getVendorBenefitPlanById` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useGetVendorBenefitPlanById(dc: DataConnect, vars: GetVendorBenefitPlanByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useGetVendorBenefitPlanById(vars: GetVendorBenefitPlanByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `getVendorBenefitPlanById` Query requires an argument of type `GetVendorBenefitPlanByIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface GetVendorBenefitPlanByIdVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `getVendorBenefitPlanById` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `getVendorBenefitPlanById` Query is of type `GetVendorBenefitPlanByIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface GetVendorBenefitPlanByIdData { + vendorBenefitPlan?: { + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `getVendorBenefitPlanById`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, GetVendorBenefitPlanByIdVariables } from '@dataconnect/generated'; +import { useGetVendorBenefitPlanById } from '@dataconnect/generated/react' + +export default function GetVendorBenefitPlanByIdComponent() { + // The `useGetVendorBenefitPlanById` Query hook requires an argument of type `GetVendorBenefitPlanByIdVariables`: + const getVendorBenefitPlanByIdVars: GetVendorBenefitPlanByIdVariables = { + id: ..., + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useGetVendorBenefitPlanById(getVendorBenefitPlanByIdVars); + // Variables can be defined inline as well. + const query = useGetVendorBenefitPlanById({ id: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useGetVendorBenefitPlanById(dataConnect, getVendorBenefitPlanByIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useGetVendorBenefitPlanById(getVendorBenefitPlanByIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useGetVendorBenefitPlanById(dataConnect, getVendorBenefitPlanByIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.vendorBenefitPlan); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listVendorBenefitPlansByVendorId +You can execute the `listVendorBenefitPlansByVendorId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListVendorBenefitPlansByVendorId(dc: DataConnect, vars: ListVendorBenefitPlansByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListVendorBenefitPlansByVendorId(vars: ListVendorBenefitPlansByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listVendorBenefitPlansByVendorId` Query requires an argument of type `ListVendorBenefitPlansByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListVendorBenefitPlansByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listVendorBenefitPlansByVendorId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listVendorBenefitPlansByVendorId` Query is of type `ListVendorBenefitPlansByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListVendorBenefitPlansByVendorIdData { + vendorBenefitPlans: ({ + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listVendorBenefitPlansByVendorId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListVendorBenefitPlansByVendorIdVariables } from '@dataconnect/generated'; +import { useListVendorBenefitPlansByVendorId } from '@dataconnect/generated/react' + +export default function ListVendorBenefitPlansByVendorIdComponent() { + // The `useListVendorBenefitPlansByVendorId` Query hook requires an argument of type `ListVendorBenefitPlansByVendorIdVariables`: + const listVendorBenefitPlansByVendorIdVars: ListVendorBenefitPlansByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListVendorBenefitPlansByVendorId(listVendorBenefitPlansByVendorIdVars); + // Variables can be defined inline as well. + const query = useListVendorBenefitPlansByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListVendorBenefitPlansByVendorId(dataConnect, listVendorBenefitPlansByVendorIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListVendorBenefitPlansByVendorId(listVendorBenefitPlansByVendorIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListVendorBenefitPlansByVendorId(dataConnect, listVendorBenefitPlansByVendorIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.vendorBenefitPlans); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## listActiveVendorBenefitPlansByVendorId +You can execute the `listActiveVendorBenefitPlansByVendorId` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useListActiveVendorBenefitPlansByVendorId(dc: DataConnect, vars: ListActiveVendorBenefitPlansByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useListActiveVendorBenefitPlansByVendorId(vars: ListActiveVendorBenefitPlansByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `listActiveVendorBenefitPlansByVendorId` Query requires an argument of type `ListActiveVendorBenefitPlansByVendorIdVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface ListActiveVendorBenefitPlansByVendorIdVariables { + vendorId: UUIDString; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `listActiveVendorBenefitPlansByVendorId` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `listActiveVendorBenefitPlansByVendorId` Query is of type `ListActiveVendorBenefitPlansByVendorIdData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface ListActiveVendorBenefitPlansByVendorIdData { + vendorBenefitPlans: ({ + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `listActiveVendorBenefitPlansByVendorId`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, ListActiveVendorBenefitPlansByVendorIdVariables } from '@dataconnect/generated'; +import { useListActiveVendorBenefitPlansByVendorId } from '@dataconnect/generated/react' + +export default function ListActiveVendorBenefitPlansByVendorIdComponent() { + // The `useListActiveVendorBenefitPlansByVendorId` Query hook requires an argument of type `ListActiveVendorBenefitPlansByVendorIdVariables`: + const listActiveVendorBenefitPlansByVendorIdVars: ListActiveVendorBenefitPlansByVendorIdVariables = { + vendorId: ..., + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useListActiveVendorBenefitPlansByVendorId(listActiveVendorBenefitPlansByVendorIdVars); + // Variables can be defined inline as well. + const query = useListActiveVendorBenefitPlansByVendorId({ vendorId: ..., offset: ..., limit: ..., }); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useListActiveVendorBenefitPlansByVendorId(dataConnect, listActiveVendorBenefitPlansByVendorIdVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useListActiveVendorBenefitPlansByVendorId(listActiveVendorBenefitPlansByVendorIdVars, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useListActiveVendorBenefitPlansByVendorId(dataConnect, listActiveVendorBenefitPlansByVendorIdVars, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.vendorBenefitPlans); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## filterVendorBenefitPlans +You can execute the `filterVendorBenefitPlans` Query using the following Query hook function, which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts): + +```javascript +useFilterVendorBenefitPlans(dc: DataConnect, vars?: FilterVendorBenefitPlansVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` +You can also pass in a `DataConnect` instance to the Query hook function. +```javascript +useFilterVendorBenefitPlans(vars?: FilterVendorBenefitPlansVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +``` + +### Variables +The `filterVendorBenefitPlans` Query has an optional argument of type `FilterVendorBenefitPlansVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface FilterVendorBenefitPlansVariables { + vendorId?: UUIDString | null; + title?: string | null; + isActive?: boolean | null; + offset?: number | null; + limit?: number | null; +} +``` +### Return Type +Recall that calling the `filterVendorBenefitPlans` Query hook function returns a `UseQueryResult` object. This object holds the state of your Query, including whether the Query is loading, has completed, or has succeeded/failed, and any data returned by the Query, among other things. + +To check the status of a Query, use the `UseQueryResult.status` field. You can also check for pending / success / error status using the `UseQueryResult.isPending`, `UseQueryResult.isSuccess`, and `UseQueryResult.isError` fields. + +To access the data returned by a Query, use the `UseQueryResult.data` field. The data for the `filterVendorBenefitPlans` Query is of type `FilterVendorBenefitPlansData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface FilterVendorBenefitPlansData { + vendorBenefitPlans: ({ + id: UUIDString; + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdAt?: TimestampString | null; + updatedAt?: TimestampString | null; + createdBy?: string | null; + vendor: { + companyName: string; + }; + } & VendorBenefitPlan_Key)[]; +} +``` + +To learn more about the `UseQueryResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useQuery). + +### Using `filterVendorBenefitPlans`'s Query hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, FilterVendorBenefitPlansVariables } from '@dataconnect/generated'; +import { useFilterVendorBenefitPlans } from '@dataconnect/generated/react' + +export default function FilterVendorBenefitPlansComponent() { + // The `useFilterVendorBenefitPlans` Query hook has an optional argument of type `FilterVendorBenefitPlansVariables`: + const filterVendorBenefitPlansVars: FilterVendorBenefitPlansVariables = { + vendorId: ..., // optional + title: ..., // optional + isActive: ..., // optional + offset: ..., // optional + limit: ..., // optional + }; + + // You don't have to do anything to "execute" the Query. + // Call the Query hook function to get a `UseQueryResult` object which holds the state of your Query. + const query = useFilterVendorBenefitPlans(filterVendorBenefitPlansVars); + // Variables can be defined inline as well. + const query = useFilterVendorBenefitPlans({ vendorId: ..., title: ..., isActive: ..., offset: ..., limit: ..., }); + // Since all variables are optional for this Query, you can omit the `FilterVendorBenefitPlansVariables` argument. + // (as long as you don't want to provide any `options`!) + const query = useFilterVendorBenefitPlans(); + + // You can also pass in a `DataConnect` instance to the Query hook function. + const dataConnect = getDataConnect(connectorConfig); + const query = useFilterVendorBenefitPlans(dataConnect, filterVendorBenefitPlansVars); + + // You can also pass in a `useDataConnectQueryOptions` object to the Query hook function. + const options = { staleTime: 5 * 1000 }; + const query = useFilterVendorBenefitPlans(filterVendorBenefitPlansVars, options); + // If you'd like to provide options without providing any variables, you must + // pass `undefined` where you would normally pass the variables. + const query = useFilterVendorBenefitPlans(undefined, options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectQueryOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { staleTime: 5 * 1000 }; + const query = useFilterVendorBenefitPlans(dataConnect, filterVendorBenefitPlansVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Query. + if (query.isPending) { + return
Loading...
; + } + + if (query.isError) { + return
Error: {query.error.message}
; + } + + // If the Query is successful, you can access the data returned using the `UseQueryResult.data` field. + if (query.isSuccess) { + console.log(query.data.vendorBenefitPlans); + } + return
Query execution {query.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +# Mutations + +The React generated SDK provides Mutations hook functions that call and return [`useDataConnectMutation`](https://react-query-firebase.invertase.dev/react/data-connect/mutations) hooks from TanStack Query Firebase. + +Calling these hook functions will return a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, and the most recent data returned by the Mutation, among other things. To learn more about these hooks and how to use them, see the [TanStack Query Firebase documentation](https://react-query-firebase.invertase.dev/react/data-connect/mutations). + +Mutation hooks do not execute their Mutations automatically when called. Rather, after calling the Mutation hook function and getting a `UseMutationResult` object, you must call the `UseMutationResult.mutate()` function to execute the Mutation. + +To learn more about TanStack React Query's Mutations, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/guides/mutations). + +## Using Mutation Hooks +Here's a general overview of how to use the generated Mutation hooks in your code: + +- Mutation hook functions are not called with the arguments to the Mutation. Instead, arguments are passed to `UseMutationResult.mutate()`. +- If the Mutation has no variables, the `mutate()` function does not require arguments. +- If the Mutation has any required variables, the `mutate()` function will require at least one argument: an object that contains all the required variables for the Mutation. +- If the Mutation has some required and some optional variables, only required variables are necessary in the variables argument object, and optional variables may be provided as well. +- If all of the Mutation's variables are optional, the Mutation hook function does not require any arguments. +- Mutation hook functions can be called with or without passing in a `DataConnect` instance as an argument. If no `DataConnect` argument is passed in, then the generated SDK will call `getDataConnect(connectorConfig)` behind the scenes for you. +- Mutation hooks also accept an `options` argument of type `useDataConnectMutationOptions`. To learn more about the `options` argument, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/guides/mutations#mutation-side-effects). + - `UseMutationResult.mutate()` also accepts an `options` argument of type `useDataConnectMutationOptions`. + - ***Special case:*** If the Mutation has no arguments (or all optional arguments and you wish to provide none), and you want to pass `options` to `UseMutationResult.mutate()`, you must pass `undefined` where you would normally pass the Mutation's arguments, and then may provide the options argument. + +Below are examples of how to use the `example` connector's generated Mutation hook functions to execute each Mutation. You can also follow the examples from the [Data Connect documentation](https://firebase.google.com/docs/data-connect/web-sdk#operations-react-angular). + +## createBenefitsData +You can execute the `createBenefitsData` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateBenefitsData(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateBenefitsData(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createBenefitsData` Mutation requires an argument of type `CreateBenefitsDataVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateBenefitsDataVariables { + vendorBenefitPlanId: UUIDString; + staffId: UUIDString; + current: number; +} +``` +### Return Type +Recall that calling the `createBenefitsData` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createBenefitsData` Mutation is of type `CreateBenefitsDataData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateBenefitsDataData { + benefitsData_insert: BenefitsData_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createBenefitsData`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateBenefitsDataVariables } from '@dataconnect/generated'; +import { useCreateBenefitsData } from '@dataconnect/generated/react' + +export default function CreateBenefitsDataComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateBenefitsData(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateBenefitsData(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateBenefitsData(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateBenefitsData(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateBenefitsData` Mutation requires an argument of type `CreateBenefitsDataVariables`: + const createBenefitsDataVars: CreateBenefitsDataVariables = { + vendorBenefitPlanId: ..., + staffId: ..., + current: ..., + }; + mutation.mutate(createBenefitsDataVars); + // Variables can be defined inline as well. + mutation.mutate({ vendorBenefitPlanId: ..., staffId: ..., current: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createBenefitsDataVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.benefitsData_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateBenefitsData +You can execute the `updateBenefitsData` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateBenefitsData(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateBenefitsData(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateBenefitsData` Mutation requires an argument of type `UpdateBenefitsDataVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateBenefitsDataVariables { + staffId: UUIDString; + vendorBenefitPlanId: UUIDString; + current?: number | null; +} +``` +### Return Type +Recall that calling the `updateBenefitsData` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateBenefitsData` Mutation is of type `UpdateBenefitsDataData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateBenefitsDataData { + benefitsData_update?: BenefitsData_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateBenefitsData`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateBenefitsDataVariables } from '@dataconnect/generated'; +import { useUpdateBenefitsData } from '@dataconnect/generated/react' + +export default function UpdateBenefitsDataComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateBenefitsData(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateBenefitsData(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateBenefitsData(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateBenefitsData(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateBenefitsData` Mutation requires an argument of type `UpdateBenefitsDataVariables`: + const updateBenefitsDataVars: UpdateBenefitsDataVariables = { + staffId: ..., + vendorBenefitPlanId: ..., + current: ..., // optional + }; + mutation.mutate(updateBenefitsDataVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., vendorBenefitPlanId: ..., current: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateBenefitsDataVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.benefitsData_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteBenefitsData +You can execute the `deleteBenefitsData` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteBenefitsData(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteBenefitsData(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteBenefitsData` Mutation requires an argument of type `DeleteBenefitsDataVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteBenefitsDataVariables { + staffId: UUIDString; + vendorBenefitPlanId: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteBenefitsData` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteBenefitsData` Mutation is of type `DeleteBenefitsDataData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteBenefitsDataData { + benefitsData_delete?: BenefitsData_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteBenefitsData`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteBenefitsDataVariables } from '@dataconnect/generated'; +import { useDeleteBenefitsData } from '@dataconnect/generated/react' + +export default function DeleteBenefitsDataComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteBenefitsData(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteBenefitsData(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteBenefitsData(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteBenefitsData(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteBenefitsData` Mutation requires an argument of type `DeleteBenefitsDataVariables`: + const deleteBenefitsDataVars: DeleteBenefitsDataVariables = { + staffId: ..., + vendorBenefitPlanId: ..., + }; + mutation.mutate(deleteBenefitsDataVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., vendorBenefitPlanId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteBenefitsDataVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.benefitsData_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createStaffDocument +You can execute the `createStaffDocument` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateStaffDocument(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateStaffDocument(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createStaffDocument` Mutation requires an argument of type `CreateStaffDocumentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateStaffDocumentVariables { + staffId: UUIDString; + staffName: string; + documentId: UUIDString; + status: DocumentStatus; + documentUrl?: string | null; + expiryDate?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `createStaffDocument` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createStaffDocument` Mutation is of type `CreateStaffDocumentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateStaffDocumentData { + staffDocument_insert: StaffDocument_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createStaffDocument`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateStaffDocumentVariables } from '@dataconnect/generated'; +import { useCreateStaffDocument } from '@dataconnect/generated/react' + +export default function CreateStaffDocumentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateStaffDocument(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateStaffDocument(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateStaffDocument(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateStaffDocument(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateStaffDocument` Mutation requires an argument of type `CreateStaffDocumentVariables`: + const createStaffDocumentVars: CreateStaffDocumentVariables = { + staffId: ..., + staffName: ..., + documentId: ..., + status: ..., + documentUrl: ..., // optional + expiryDate: ..., // optional + }; + mutation.mutate(createStaffDocumentVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., staffName: ..., documentId: ..., status: ..., documentUrl: ..., expiryDate: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createStaffDocumentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffDocument_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateStaffDocument +You can execute the `updateStaffDocument` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateStaffDocument(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateStaffDocument(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateStaffDocument` Mutation requires an argument of type `UpdateStaffDocumentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateStaffDocumentVariables { + staffId: UUIDString; + documentId: UUIDString; + status?: DocumentStatus | null; + documentUrl?: string | null; + expiryDate?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `updateStaffDocument` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateStaffDocument` Mutation is of type `UpdateStaffDocumentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateStaffDocumentData { + staffDocument_update?: StaffDocument_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateStaffDocument`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateStaffDocumentVariables } from '@dataconnect/generated'; +import { useUpdateStaffDocument } from '@dataconnect/generated/react' + +export default function UpdateStaffDocumentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateStaffDocument(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateStaffDocument(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateStaffDocument(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateStaffDocument(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateStaffDocument` Mutation requires an argument of type `UpdateStaffDocumentVariables`: + const updateStaffDocumentVars: UpdateStaffDocumentVariables = { + staffId: ..., + documentId: ..., + status: ..., // optional + documentUrl: ..., // optional + expiryDate: ..., // optional + }; + mutation.mutate(updateStaffDocumentVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., documentId: ..., status: ..., documentUrl: ..., expiryDate: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateStaffDocumentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffDocument_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteStaffDocument +You can execute the `deleteStaffDocument` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteStaffDocument(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteStaffDocument(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteStaffDocument` Mutation requires an argument of type `DeleteStaffDocumentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteStaffDocumentVariables { + staffId: UUIDString; + documentId: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteStaffDocument` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteStaffDocument` Mutation is of type `DeleteStaffDocumentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteStaffDocumentData { + staffDocument_delete?: StaffDocument_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteStaffDocument`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteStaffDocumentVariables } from '@dataconnect/generated'; +import { useDeleteStaffDocument } from '@dataconnect/generated/react' + +export default function DeleteStaffDocumentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteStaffDocument(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteStaffDocument(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteStaffDocument(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteStaffDocument(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteStaffDocument` Mutation requires an argument of type `DeleteStaffDocumentVariables`: + const deleteStaffDocumentVars: DeleteStaffDocumentVariables = { + staffId: ..., + documentId: ..., + }; + mutation.mutate(deleteStaffDocumentVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., documentId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteStaffDocumentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffDocument_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createTeamHudDepartment +You can execute the `createTeamHudDepartment` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateTeamHudDepartment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateTeamHudDepartment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createTeamHudDepartment` Mutation requires an argument of type `CreateTeamHudDepartmentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateTeamHudDepartmentVariables { + name: string; + costCenter?: string | null; + teamHubId: UUIDString; +} +``` +### Return Type +Recall that calling the `createTeamHudDepartment` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createTeamHudDepartment` Mutation is of type `CreateTeamHudDepartmentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateTeamHudDepartmentData { + teamHudDepartment_insert: TeamHudDepartment_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createTeamHudDepartment`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateTeamHudDepartmentVariables } from '@dataconnect/generated'; +import { useCreateTeamHudDepartment } from '@dataconnect/generated/react' + +export default function CreateTeamHudDepartmentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateTeamHudDepartment(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateTeamHudDepartment(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTeamHudDepartment(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTeamHudDepartment(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateTeamHudDepartment` Mutation requires an argument of type `CreateTeamHudDepartmentVariables`: + const createTeamHudDepartmentVars: CreateTeamHudDepartmentVariables = { + name: ..., + costCenter: ..., // optional + teamHubId: ..., + }; + mutation.mutate(createTeamHudDepartmentVars); + // Variables can be defined inline as well. + mutation.mutate({ name: ..., costCenter: ..., teamHubId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createTeamHudDepartmentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.teamHudDepartment_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateTeamHudDepartment +You can execute the `updateTeamHudDepartment` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateTeamHudDepartment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateTeamHudDepartment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateTeamHudDepartment` Mutation requires an argument of type `UpdateTeamHudDepartmentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateTeamHudDepartmentVariables { + id: UUIDString; + name?: string | null; + costCenter?: string | null; + teamHubId?: UUIDString | null; +} +``` +### Return Type +Recall that calling the `updateTeamHudDepartment` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateTeamHudDepartment` Mutation is of type `UpdateTeamHudDepartmentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateTeamHudDepartmentData { + teamHudDepartment_update?: TeamHudDepartment_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateTeamHudDepartment`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateTeamHudDepartmentVariables } from '@dataconnect/generated'; +import { useUpdateTeamHudDepartment } from '@dataconnect/generated/react' + +export default function UpdateTeamHudDepartmentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateTeamHudDepartment(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateTeamHudDepartment(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTeamHudDepartment(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTeamHudDepartment(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateTeamHudDepartment` Mutation requires an argument of type `UpdateTeamHudDepartmentVariables`: + const updateTeamHudDepartmentVars: UpdateTeamHudDepartmentVariables = { + id: ..., + name: ..., // optional + costCenter: ..., // optional + teamHubId: ..., // optional + }; + mutation.mutate(updateTeamHudDepartmentVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., name: ..., costCenter: ..., teamHubId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateTeamHudDepartmentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.teamHudDepartment_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteTeamHudDepartment +You can execute the `deleteTeamHudDepartment` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteTeamHudDepartment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteTeamHudDepartment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteTeamHudDepartment` Mutation requires an argument of type `DeleteTeamHudDepartmentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteTeamHudDepartmentVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteTeamHudDepartment` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteTeamHudDepartment` Mutation is of type `DeleteTeamHudDepartmentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteTeamHudDepartmentData { + teamHudDepartment_delete?: TeamHudDepartment_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteTeamHudDepartment`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteTeamHudDepartmentVariables } from '@dataconnect/generated'; +import { useDeleteTeamHudDepartment } from '@dataconnect/generated/react' + +export default function DeleteTeamHudDepartmentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteTeamHudDepartment(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteTeamHudDepartment(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTeamHudDepartment(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTeamHudDepartment(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteTeamHudDepartment` Mutation requires an argument of type `DeleteTeamHudDepartmentVariables`: + const deleteTeamHudDepartmentVars: DeleteTeamHudDepartmentVariables = { + id: ..., + }; + mutation.mutate(deleteTeamHudDepartmentVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteTeamHudDepartmentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.teamHudDepartment_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createMemberTask +You can execute the `createMemberTask` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateMemberTask(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateMemberTask(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createMemberTask` Mutation requires an argument of type `CreateMemberTaskVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateMemberTaskVariables { + teamMemberId: UUIDString; + taskId: UUIDString; +} +``` +### Return Type +Recall that calling the `createMemberTask` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createMemberTask` Mutation is of type `CreateMemberTaskData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateMemberTaskData { + memberTask_insert: MemberTask_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createMemberTask`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateMemberTaskVariables } from '@dataconnect/generated'; +import { useCreateMemberTask } from '@dataconnect/generated/react' + +export default function CreateMemberTaskComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateMemberTask(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateMemberTask(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateMemberTask(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateMemberTask(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateMemberTask` Mutation requires an argument of type `CreateMemberTaskVariables`: + const createMemberTaskVars: CreateMemberTaskVariables = { + teamMemberId: ..., + taskId: ..., + }; + mutation.mutate(createMemberTaskVars); + // Variables can be defined inline as well. + mutation.mutate({ teamMemberId: ..., taskId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createMemberTaskVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.memberTask_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteMemberTask +You can execute the `deleteMemberTask` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteMemberTask(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteMemberTask(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteMemberTask` Mutation requires an argument of type `DeleteMemberTaskVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteMemberTaskVariables { + teamMemberId: UUIDString; + taskId: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteMemberTask` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteMemberTask` Mutation is of type `DeleteMemberTaskData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteMemberTaskData { + memberTask_delete?: MemberTask_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteMemberTask`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteMemberTaskVariables } from '@dataconnect/generated'; +import { useDeleteMemberTask } from '@dataconnect/generated/react' + +export default function DeleteMemberTaskComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteMemberTask(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteMemberTask(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteMemberTask(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteMemberTask(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteMemberTask` Mutation requires an argument of type `DeleteMemberTaskVariables`: + const deleteMemberTaskVars: DeleteMemberTaskVariables = { + teamMemberId: ..., + taskId: ..., + }; + mutation.mutate(deleteMemberTaskVars); + // Variables can be defined inline as well. + mutation.mutate({ teamMemberId: ..., taskId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteMemberTaskVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.memberTask_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createTeam +You can execute the `createTeam` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateTeam(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateTeam(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createTeam` Mutation requires an argument of type `CreateTeamVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateTeamVariables { + teamName: string; + ownerId: UUIDString; + ownerName: string; + ownerRole: string; + email?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; +} +``` +### Return Type +Recall that calling the `createTeam` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createTeam` Mutation is of type `CreateTeamData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateTeamData { + team_insert: Team_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createTeam`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateTeamVariables } from '@dataconnect/generated'; +import { useCreateTeam } from '@dataconnect/generated/react' + +export default function CreateTeamComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateTeam(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateTeam(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTeam(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTeam(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateTeam` Mutation requires an argument of type `CreateTeamVariables`: + const createTeamVars: CreateTeamVariables = { + teamName: ..., + ownerId: ..., + ownerName: ..., + ownerRole: ..., + email: ..., // optional + companyLogo: ..., // optional + totalMembers: ..., // optional + activeMembers: ..., // optional + totalHubs: ..., // optional + departments: ..., // optional + favoriteStaffCount: ..., // optional + blockedStaffCount: ..., // optional + favoriteStaff: ..., // optional + blockedStaff: ..., // optional + }; + mutation.mutate(createTeamVars); + // Variables can be defined inline as well. + mutation.mutate({ teamName: ..., ownerId: ..., ownerName: ..., ownerRole: ..., email: ..., companyLogo: ..., totalMembers: ..., activeMembers: ..., totalHubs: ..., departments: ..., favoriteStaffCount: ..., blockedStaffCount: ..., favoriteStaff: ..., blockedStaff: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createTeamVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.team_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateTeam +You can execute the `updateTeam` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateTeam(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateTeam(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateTeam` Mutation requires an argument of type `UpdateTeamVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateTeamVariables { + id: UUIDString; + teamName?: string | null; + ownerName?: string | null; + ownerRole?: string | null; + companyLogo?: string | null; + totalMembers?: number | null; + activeMembers?: number | null; + totalHubs?: number | null; + departments?: unknown | null; + favoriteStaffCount?: number | null; + blockedStaffCount?: number | null; + favoriteStaff?: unknown | null; + blockedStaff?: unknown | null; +} +``` +### Return Type +Recall that calling the `updateTeam` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateTeam` Mutation is of type `UpdateTeamData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateTeamData { + team_update?: Team_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateTeam`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateTeamVariables } from '@dataconnect/generated'; +import { useUpdateTeam } from '@dataconnect/generated/react' + +export default function UpdateTeamComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateTeam(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateTeam(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTeam(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTeam(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateTeam` Mutation requires an argument of type `UpdateTeamVariables`: + const updateTeamVars: UpdateTeamVariables = { + id: ..., + teamName: ..., // optional + ownerName: ..., // optional + ownerRole: ..., // optional + companyLogo: ..., // optional + totalMembers: ..., // optional + activeMembers: ..., // optional + totalHubs: ..., // optional + departments: ..., // optional + favoriteStaffCount: ..., // optional + blockedStaffCount: ..., // optional + favoriteStaff: ..., // optional + blockedStaff: ..., // optional + }; + mutation.mutate(updateTeamVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., teamName: ..., ownerName: ..., ownerRole: ..., companyLogo: ..., totalMembers: ..., activeMembers: ..., totalHubs: ..., departments: ..., favoriteStaffCount: ..., blockedStaffCount: ..., favoriteStaff: ..., blockedStaff: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateTeamVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.team_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteTeam +You can execute the `deleteTeam` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteTeam(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteTeam(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteTeam` Mutation requires an argument of type `DeleteTeamVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteTeamVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteTeam` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteTeam` Mutation is of type `DeleteTeamData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteTeamData { + team_delete?: Team_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteTeam`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteTeamVariables } from '@dataconnect/generated'; +import { useDeleteTeam } from '@dataconnect/generated/react' + +export default function DeleteTeamComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteTeam(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteTeam(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTeam(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTeam(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteTeam` Mutation requires an argument of type `DeleteTeamVariables`: + const deleteTeamVars: DeleteTeamVariables = { + id: ..., + }; + mutation.mutate(deleteTeamVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteTeamVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.team_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createUserConversation +You can execute the `createUserConversation` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateUserConversation(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateUserConversation(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createUserConversation` Mutation requires an argument of type `CreateUserConversationVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateUserConversationVariables { + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `createUserConversation` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createUserConversation` Mutation is of type `CreateUserConversationData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateUserConversationData { + userConversation_insert: UserConversation_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createUserConversation`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateUserConversationVariables } from '@dataconnect/generated'; +import { useCreateUserConversation } from '@dataconnect/generated/react' + +export default function CreateUserConversationComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateUserConversation(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateUserConversation(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateUserConversation(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateUserConversation(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateUserConversation` Mutation requires an argument of type `CreateUserConversationVariables`: + const createUserConversationVars: CreateUserConversationVariables = { + conversationId: ..., + userId: ..., + unreadCount: ..., // optional + lastReadAt: ..., // optional + }; + mutation.mutate(createUserConversationVars); + // Variables can be defined inline as well. + mutation.mutate({ conversationId: ..., userId: ..., unreadCount: ..., lastReadAt: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createUserConversationVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.userConversation_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateUserConversation +You can execute the `updateUserConversation` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateUserConversation(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateUserConversation(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateUserConversation` Mutation requires an argument of type `UpdateUserConversationVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateUserConversationVariables { + conversationId: UUIDString; + userId: string; + unreadCount?: number | null; + lastReadAt?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `updateUserConversation` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateUserConversation` Mutation is of type `UpdateUserConversationData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateUserConversationData { + userConversation_update?: UserConversation_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateUserConversation`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateUserConversationVariables } from '@dataconnect/generated'; +import { useUpdateUserConversation } from '@dataconnect/generated/react' + +export default function UpdateUserConversationComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateUserConversation(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateUserConversation(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateUserConversation(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateUserConversation(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateUserConversation` Mutation requires an argument of type `UpdateUserConversationVariables`: + const updateUserConversationVars: UpdateUserConversationVariables = { + conversationId: ..., + userId: ..., + unreadCount: ..., // optional + lastReadAt: ..., // optional + }; + mutation.mutate(updateUserConversationVars); + // Variables can be defined inline as well. + mutation.mutate({ conversationId: ..., userId: ..., unreadCount: ..., lastReadAt: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateUserConversationVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.userConversation_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## markConversationAsRead +You can execute the `markConversationAsRead` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useMarkConversationAsRead(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useMarkConversationAsRead(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `markConversationAsRead` Mutation requires an argument of type `MarkConversationAsReadVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface MarkConversationAsReadVariables { + conversationId: UUIDString; + userId: string; + lastReadAt?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `markConversationAsRead` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `markConversationAsRead` Mutation is of type `MarkConversationAsReadData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface MarkConversationAsReadData { + userConversation_update?: UserConversation_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `markConversationAsRead`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, MarkConversationAsReadVariables } from '@dataconnect/generated'; +import { useMarkConversationAsRead } from '@dataconnect/generated/react' + +export default function MarkConversationAsReadComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useMarkConversationAsRead(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useMarkConversationAsRead(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useMarkConversationAsRead(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useMarkConversationAsRead(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useMarkConversationAsRead` Mutation requires an argument of type `MarkConversationAsReadVariables`: + const markConversationAsReadVars: MarkConversationAsReadVariables = { + conversationId: ..., + userId: ..., + lastReadAt: ..., // optional + }; + mutation.mutate(markConversationAsReadVars); + // Variables can be defined inline as well. + mutation.mutate({ conversationId: ..., userId: ..., lastReadAt: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(markConversationAsReadVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.userConversation_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## incrementUnreadForUser +You can execute the `incrementUnreadForUser` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useIncrementUnreadForUser(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useIncrementUnreadForUser(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `incrementUnreadForUser` Mutation requires an argument of type `IncrementUnreadForUserVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface IncrementUnreadForUserVariables { + conversationId: UUIDString; + userId: string; + unreadCount: number; +} +``` +### Return Type +Recall that calling the `incrementUnreadForUser` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `incrementUnreadForUser` Mutation is of type `IncrementUnreadForUserData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface IncrementUnreadForUserData { + userConversation_update?: UserConversation_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `incrementUnreadForUser`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, IncrementUnreadForUserVariables } from '@dataconnect/generated'; +import { useIncrementUnreadForUser } from '@dataconnect/generated/react' + +export default function IncrementUnreadForUserComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useIncrementUnreadForUser(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useIncrementUnreadForUser(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useIncrementUnreadForUser(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useIncrementUnreadForUser(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useIncrementUnreadForUser` Mutation requires an argument of type `IncrementUnreadForUserVariables`: + const incrementUnreadForUserVars: IncrementUnreadForUserVariables = { + conversationId: ..., + userId: ..., + unreadCount: ..., + }; + mutation.mutate(incrementUnreadForUserVars); + // Variables can be defined inline as well. + mutation.mutate({ conversationId: ..., userId: ..., unreadCount: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(incrementUnreadForUserVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.userConversation_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteUserConversation +You can execute the `deleteUserConversation` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteUserConversation(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteUserConversation(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteUserConversation` Mutation requires an argument of type `DeleteUserConversationVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteUserConversationVariables { + conversationId: UUIDString; + userId: string; +} +``` +### Return Type +Recall that calling the `deleteUserConversation` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteUserConversation` Mutation is of type `DeleteUserConversationData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteUserConversationData { + userConversation_delete?: UserConversation_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteUserConversation`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteUserConversationVariables } from '@dataconnect/generated'; +import { useDeleteUserConversation } from '@dataconnect/generated/react' + +export default function DeleteUserConversationComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteUserConversation(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteUserConversation(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteUserConversation(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteUserConversation(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteUserConversation` Mutation requires an argument of type `DeleteUserConversationVariables`: + const deleteUserConversationVars: DeleteUserConversationVariables = { + conversationId: ..., + userId: ..., + }; + mutation.mutate(deleteUserConversationVars); + // Variables can be defined inline as well. + mutation.mutate({ conversationId: ..., userId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteUserConversationVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.userConversation_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createAttireOption +You can execute the `createAttireOption` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateAttireOption(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateAttireOption(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createAttireOption` Mutation requires an argument of type `CreateAttireOptionVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateAttireOptionVariables { + itemId: string; + label: string; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; +} +``` +### Return Type +Recall that calling the `createAttireOption` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createAttireOption` Mutation is of type `CreateAttireOptionData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateAttireOptionData { + attireOption_insert: AttireOption_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createAttireOption`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateAttireOptionVariables } from '@dataconnect/generated'; +import { useCreateAttireOption } from '@dataconnect/generated/react' + +export default function CreateAttireOptionComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateAttireOption(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateAttireOption(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateAttireOption(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateAttireOption(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateAttireOption` Mutation requires an argument of type `CreateAttireOptionVariables`: + const createAttireOptionVars: CreateAttireOptionVariables = { + itemId: ..., + label: ..., + icon: ..., // optional + imageUrl: ..., // optional + isMandatory: ..., // optional + vendorId: ..., // optional + }; + mutation.mutate(createAttireOptionVars); + // Variables can be defined inline as well. + mutation.mutate({ itemId: ..., label: ..., icon: ..., imageUrl: ..., isMandatory: ..., vendorId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createAttireOptionVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.attireOption_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateAttireOption +You can execute the `updateAttireOption` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateAttireOption(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateAttireOption(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateAttireOption` Mutation requires an argument of type `UpdateAttireOptionVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateAttireOptionVariables { + id: UUIDString; + itemId?: string | null; + label?: string | null; + icon?: string | null; + imageUrl?: string | null; + isMandatory?: boolean | null; + vendorId?: UUIDString | null; +} +``` +### Return Type +Recall that calling the `updateAttireOption` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateAttireOption` Mutation is of type `UpdateAttireOptionData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateAttireOptionData { + attireOption_update?: AttireOption_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateAttireOption`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateAttireOptionVariables } from '@dataconnect/generated'; +import { useUpdateAttireOption } from '@dataconnect/generated/react' + +export default function UpdateAttireOptionComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateAttireOption(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateAttireOption(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateAttireOption(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateAttireOption(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateAttireOption` Mutation requires an argument of type `UpdateAttireOptionVariables`: + const updateAttireOptionVars: UpdateAttireOptionVariables = { + id: ..., + itemId: ..., // optional + label: ..., // optional + icon: ..., // optional + imageUrl: ..., // optional + isMandatory: ..., // optional + vendorId: ..., // optional + }; + mutation.mutate(updateAttireOptionVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., itemId: ..., label: ..., icon: ..., imageUrl: ..., isMandatory: ..., vendorId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateAttireOptionVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.attireOption_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteAttireOption +You can execute the `deleteAttireOption` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteAttireOption(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteAttireOption(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteAttireOption` Mutation requires an argument of type `DeleteAttireOptionVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteAttireOptionVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteAttireOption` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteAttireOption` Mutation is of type `DeleteAttireOptionData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteAttireOptionData { + attireOption_delete?: AttireOption_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteAttireOption`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteAttireOptionVariables } from '@dataconnect/generated'; +import { useDeleteAttireOption } from '@dataconnect/generated/react' + +export default function DeleteAttireOptionComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteAttireOption(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteAttireOption(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteAttireOption(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteAttireOption(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteAttireOption` Mutation requires an argument of type `DeleteAttireOptionVariables`: + const deleteAttireOptionVars: DeleteAttireOptionVariables = { + id: ..., + }; + mutation.mutate(deleteAttireOptionVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteAttireOptionVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.attireOption_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createCourse +You can execute the `createCourse` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateCourse(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateCourse(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createCourse` Mutation requires an argument of type `CreateCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateCourseVariables { + title?: string | null; + description?: string | null; + thumbnailUrl?: string | null; + durationMinutes?: number | null; + xpReward?: number | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; +} +``` +### Return Type +Recall that calling the `createCourse` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createCourse` Mutation is of type `CreateCourseData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateCourseData { + course_insert: Course_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createCourse`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateCourseVariables } from '@dataconnect/generated'; +import { useCreateCourse } from '@dataconnect/generated/react' + +export default function CreateCourseComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateCourse(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateCourse(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateCourse(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateCourse(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateCourse` Mutation requires an argument of type `CreateCourseVariables`: + const createCourseVars: CreateCourseVariables = { + title: ..., // optional + description: ..., // optional + thumbnailUrl: ..., // optional + durationMinutes: ..., // optional + xpReward: ..., // optional + categoryId: ..., + levelRequired: ..., // optional + isCertification: ..., // optional + }; + mutation.mutate(createCourseVars); + // Variables can be defined inline as well. + mutation.mutate({ title: ..., description: ..., thumbnailUrl: ..., durationMinutes: ..., xpReward: ..., categoryId: ..., levelRequired: ..., isCertification: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createCourseVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.course_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateCourse +You can execute the `updateCourse` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateCourse(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateCourse(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateCourse` Mutation requires an argument of type `UpdateCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateCourseVariables { + id: UUIDString; + title?: string | null; + description?: string | null; + thumbnailUrl?: string | null; + durationMinutes?: number | null; + xpReward?: number | null; + categoryId: UUIDString; + levelRequired?: string | null; + isCertification?: boolean | null; +} +``` +### Return Type +Recall that calling the `updateCourse` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateCourse` Mutation is of type `UpdateCourseData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateCourseData { + course_update?: Course_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateCourse`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateCourseVariables } from '@dataconnect/generated'; +import { useUpdateCourse } from '@dataconnect/generated/react' + +export default function UpdateCourseComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateCourse(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateCourse(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateCourse(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateCourse(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateCourse` Mutation requires an argument of type `UpdateCourseVariables`: + const updateCourseVars: UpdateCourseVariables = { + id: ..., + title: ..., // optional + description: ..., // optional + thumbnailUrl: ..., // optional + durationMinutes: ..., // optional + xpReward: ..., // optional + categoryId: ..., + levelRequired: ..., // optional + isCertification: ..., // optional + }; + mutation.mutate(updateCourseVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., title: ..., description: ..., thumbnailUrl: ..., durationMinutes: ..., xpReward: ..., categoryId: ..., levelRequired: ..., isCertification: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateCourseVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.course_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteCourse +You can execute the `deleteCourse` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteCourse(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteCourse(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteCourse` Mutation requires an argument of type `DeleteCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteCourseVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteCourse` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteCourse` Mutation is of type `DeleteCourseData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteCourseData { + course_delete?: Course_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteCourse`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteCourseVariables } from '@dataconnect/generated'; +import { useDeleteCourse } from '@dataconnect/generated/react' + +export default function DeleteCourseComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteCourse(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteCourse(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteCourse(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteCourse(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteCourse` Mutation requires an argument of type `DeleteCourseVariables`: + const deleteCourseVars: DeleteCourseVariables = { + id: ..., + }; + mutation.mutate(deleteCourseVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteCourseVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.course_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createEmergencyContact +You can execute the `createEmergencyContact` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateEmergencyContact(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateEmergencyContact(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createEmergencyContact` Mutation requires an argument of type `CreateEmergencyContactVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateEmergencyContactVariables { + name: string; + phone: string; + relationship: RelationshipType; + staffId: UUIDString; +} +``` +### Return Type +Recall that calling the `createEmergencyContact` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createEmergencyContact` Mutation is of type `CreateEmergencyContactData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateEmergencyContactData { + emergencyContact_insert: EmergencyContact_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createEmergencyContact`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateEmergencyContactVariables } from '@dataconnect/generated'; +import { useCreateEmergencyContact } from '@dataconnect/generated/react' + +export default function CreateEmergencyContactComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateEmergencyContact(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateEmergencyContact(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateEmergencyContact(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateEmergencyContact(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateEmergencyContact` Mutation requires an argument of type `CreateEmergencyContactVariables`: + const createEmergencyContactVars: CreateEmergencyContactVariables = { + name: ..., + phone: ..., + relationship: ..., + staffId: ..., + }; + mutation.mutate(createEmergencyContactVars); + // Variables can be defined inline as well. + mutation.mutate({ name: ..., phone: ..., relationship: ..., staffId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createEmergencyContactVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.emergencyContact_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateEmergencyContact +You can execute the `updateEmergencyContact` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateEmergencyContact(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateEmergencyContact(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateEmergencyContact` Mutation requires an argument of type `UpdateEmergencyContactVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateEmergencyContactVariables { + id: UUIDString; + name?: string | null; + phone?: string | null; + relationship?: RelationshipType | null; +} +``` +### Return Type +Recall that calling the `updateEmergencyContact` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateEmergencyContact` Mutation is of type `UpdateEmergencyContactData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateEmergencyContactData { + emergencyContact_update?: EmergencyContact_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateEmergencyContact`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateEmergencyContactVariables } from '@dataconnect/generated'; +import { useUpdateEmergencyContact } from '@dataconnect/generated/react' + +export default function UpdateEmergencyContactComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateEmergencyContact(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateEmergencyContact(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateEmergencyContact(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateEmergencyContact(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateEmergencyContact` Mutation requires an argument of type `UpdateEmergencyContactVariables`: + const updateEmergencyContactVars: UpdateEmergencyContactVariables = { + id: ..., + name: ..., // optional + phone: ..., // optional + relationship: ..., // optional + }; + mutation.mutate(updateEmergencyContactVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., name: ..., phone: ..., relationship: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateEmergencyContactVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.emergencyContact_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteEmergencyContact +You can execute the `deleteEmergencyContact` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteEmergencyContact(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteEmergencyContact(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteEmergencyContact` Mutation requires an argument of type `DeleteEmergencyContactVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteEmergencyContactVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteEmergencyContact` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteEmergencyContact` Mutation is of type `DeleteEmergencyContactData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteEmergencyContactData { + emergencyContact_delete?: EmergencyContact_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteEmergencyContact`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteEmergencyContactVariables } from '@dataconnect/generated'; +import { useDeleteEmergencyContact } from '@dataconnect/generated/react' + +export default function DeleteEmergencyContactComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteEmergencyContact(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteEmergencyContact(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteEmergencyContact(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteEmergencyContact(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteEmergencyContact` Mutation requires an argument of type `DeleteEmergencyContactVariables`: + const deleteEmergencyContactVars: DeleteEmergencyContactVariables = { + id: ..., + }; + mutation.mutate(deleteEmergencyContactVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteEmergencyContactVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.emergencyContact_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createStaffCourse +You can execute the `createStaffCourse` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateStaffCourse(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateStaffCourse(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createStaffCourse` Mutation requires an argument of type `CreateStaffCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateStaffCourseVariables { + staffId: UUIDString; + courseId: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `createStaffCourse` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createStaffCourse` Mutation is of type `CreateStaffCourseData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateStaffCourseData { + staffCourse_insert: StaffCourse_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createStaffCourse`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateStaffCourseVariables } from '@dataconnect/generated'; +import { useCreateStaffCourse } from '@dataconnect/generated/react' + +export default function CreateStaffCourseComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateStaffCourse(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateStaffCourse(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateStaffCourse(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateStaffCourse(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateStaffCourse` Mutation requires an argument of type `CreateStaffCourseVariables`: + const createStaffCourseVars: CreateStaffCourseVariables = { + staffId: ..., + courseId: ..., + progressPercent: ..., // optional + completed: ..., // optional + completedAt: ..., // optional + startedAt: ..., // optional + lastAccessedAt: ..., // optional + }; + mutation.mutate(createStaffCourseVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., courseId: ..., progressPercent: ..., completed: ..., completedAt: ..., startedAt: ..., lastAccessedAt: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createStaffCourseVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffCourse_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateStaffCourse +You can execute the `updateStaffCourse` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateStaffCourse(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateStaffCourse(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateStaffCourse` Mutation requires an argument of type `UpdateStaffCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateStaffCourseVariables { + id: UUIDString; + progressPercent?: number | null; + completed?: boolean | null; + completedAt?: TimestampString | null; + startedAt?: TimestampString | null; + lastAccessedAt?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `updateStaffCourse` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateStaffCourse` Mutation is of type `UpdateStaffCourseData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateStaffCourseData { + staffCourse_update?: StaffCourse_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateStaffCourse`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateStaffCourseVariables } from '@dataconnect/generated'; +import { useUpdateStaffCourse } from '@dataconnect/generated/react' + +export default function UpdateStaffCourseComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateStaffCourse(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateStaffCourse(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateStaffCourse(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateStaffCourse(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateStaffCourse` Mutation requires an argument of type `UpdateStaffCourseVariables`: + const updateStaffCourseVars: UpdateStaffCourseVariables = { + id: ..., + progressPercent: ..., // optional + completed: ..., // optional + completedAt: ..., // optional + startedAt: ..., // optional + lastAccessedAt: ..., // optional + }; + mutation.mutate(updateStaffCourseVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., progressPercent: ..., completed: ..., completedAt: ..., startedAt: ..., lastAccessedAt: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateStaffCourseVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffCourse_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteStaffCourse +You can execute the `deleteStaffCourse` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteStaffCourse(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteStaffCourse(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteStaffCourse` Mutation requires an argument of type `DeleteStaffCourseVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteStaffCourseVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteStaffCourse` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteStaffCourse` Mutation is of type `DeleteStaffCourseData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteStaffCourseData { + staffCourse_delete?: StaffCourse_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteStaffCourse`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteStaffCourseVariables } from '@dataconnect/generated'; +import { useDeleteStaffCourse } from '@dataconnect/generated/react' + +export default function DeleteStaffCourseComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteStaffCourse(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteStaffCourse(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteStaffCourse(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteStaffCourse(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteStaffCourse` Mutation requires an argument of type `DeleteStaffCourseVariables`: + const deleteStaffCourseVars: DeleteStaffCourseVariables = { + id: ..., + }; + mutation.mutate(deleteStaffCourseVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteStaffCourseVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffCourse_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createTask +You can execute the `createTask` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateTask(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateTask(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createTask` Mutation requires an argument of type `CreateTaskVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateTaskVariables { + taskName: string; + description?: string | null; + priority: TaskPriority; + status: TaskStatus; + dueDate?: TimestampString | null; + progress?: number | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; + ownerId: UUIDString; +} +``` +### Return Type +Recall that calling the `createTask` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createTask` Mutation is of type `CreateTaskData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateTaskData { + task_insert: Task_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createTask`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateTaskVariables } from '@dataconnect/generated'; +import { useCreateTask } from '@dataconnect/generated/react' + +export default function CreateTaskComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateTask(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateTask(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTask(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTask(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateTask` Mutation requires an argument of type `CreateTaskVariables`: + const createTaskVars: CreateTaskVariables = { + taskName: ..., + description: ..., // optional + priority: ..., + status: ..., + dueDate: ..., // optional + progress: ..., // optional + orderIndex: ..., // optional + commentCount: ..., // optional + attachmentCount: ..., // optional + files: ..., // optional + ownerId: ..., + }; + mutation.mutate(createTaskVars); + // Variables can be defined inline as well. + mutation.mutate({ taskName: ..., description: ..., priority: ..., status: ..., dueDate: ..., progress: ..., orderIndex: ..., commentCount: ..., attachmentCount: ..., files: ..., ownerId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createTaskVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.task_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateTask +You can execute the `updateTask` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateTask(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateTask(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateTask` Mutation requires an argument of type `UpdateTaskVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateTaskVariables { + id: UUIDString; + taskName?: string | null; + description?: string | null; + priority?: TaskPriority | null; + status?: TaskStatus | null; + dueDate?: TimestampString | null; + progress?: number | null; + assignedMembers?: unknown | null; + orderIndex?: number | null; + commentCount?: number | null; + attachmentCount?: number | null; + files?: unknown | null; +} +``` +### Return Type +Recall that calling the `updateTask` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateTask` Mutation is of type `UpdateTaskData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateTaskData { + task_update?: Task_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateTask`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateTaskVariables } from '@dataconnect/generated'; +import { useUpdateTask } from '@dataconnect/generated/react' + +export default function UpdateTaskComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateTask(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateTask(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTask(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTask(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateTask` Mutation requires an argument of type `UpdateTaskVariables`: + const updateTaskVars: UpdateTaskVariables = { + id: ..., + taskName: ..., // optional + description: ..., // optional + priority: ..., // optional + status: ..., // optional + dueDate: ..., // optional + progress: ..., // optional + assignedMembers: ..., // optional + orderIndex: ..., // optional + commentCount: ..., // optional + attachmentCount: ..., // optional + files: ..., // optional + }; + mutation.mutate(updateTaskVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., taskName: ..., description: ..., priority: ..., status: ..., dueDate: ..., progress: ..., assignedMembers: ..., orderIndex: ..., commentCount: ..., attachmentCount: ..., files: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateTaskVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.task_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteTask +You can execute the `deleteTask` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteTask(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteTask(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteTask` Mutation requires an argument of type `DeleteTaskVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteTaskVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteTask` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteTask` Mutation is of type `DeleteTaskData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteTaskData { + task_delete?: Task_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteTask`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteTaskVariables } from '@dataconnect/generated'; +import { useDeleteTask } from '@dataconnect/generated/react' + +export default function DeleteTaskComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteTask(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteTask(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTask(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTask(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteTask` Mutation requires an argument of type `DeleteTaskVariables`: + const deleteTaskVars: DeleteTaskVariables = { + id: ..., + }; + mutation.mutate(deleteTaskVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteTaskVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.task_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## CreateCertificate +You can execute the `CreateCertificate` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateCertificate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateCertificate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `CreateCertificate` Mutation requires an argument of type `CreateCertificateVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateCertificateVariables { + name: string; + description?: string | null; + expiry?: TimestampString | null; + status: CertificateStatus; + fileUrl?: string | null; + icon?: string | null; + certificationType?: ComplianceType | null; + issuer?: string | null; + staffId: UUIDString; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; +} +``` +### Return Type +Recall that calling the `CreateCertificate` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `CreateCertificate` Mutation is of type `CreateCertificateData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateCertificateData { + certificate_insert: Certificate_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `CreateCertificate`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateCertificateVariables } from '@dataconnect/generated'; +import { useCreateCertificate } from '@dataconnect/generated/react' + +export default function CreateCertificateComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateCertificate(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateCertificate(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateCertificate(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateCertificate(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateCertificate` Mutation requires an argument of type `CreateCertificateVariables`: + const createCertificateVars: CreateCertificateVariables = { + name: ..., + description: ..., // optional + expiry: ..., // optional + status: ..., + fileUrl: ..., // optional + icon: ..., // optional + certificationType: ..., // optional + issuer: ..., // optional + staffId: ..., + validationStatus: ..., // optional + certificateNumber: ..., // optional + }; + mutation.mutate(createCertificateVars); + // Variables can be defined inline as well. + mutation.mutate({ name: ..., description: ..., expiry: ..., status: ..., fileUrl: ..., icon: ..., certificationType: ..., issuer: ..., staffId: ..., validationStatus: ..., certificateNumber: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createCertificateVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.certificate_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## UpdateCertificate +You can execute the `UpdateCertificate` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateCertificate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateCertificate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `UpdateCertificate` Mutation requires an argument of type `UpdateCertificateVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateCertificateVariables { + id: UUIDString; + name?: string | null; + description?: string | null; + expiry?: TimestampString | null; + status?: CertificateStatus | null; + fileUrl?: string | null; + icon?: string | null; + staffId?: UUIDString | null; + certificationType?: ComplianceType | null; + issuer?: string | null; + validationStatus?: ValidationStatus | null; + certificateNumber?: string | null; +} +``` +### Return Type +Recall that calling the `UpdateCertificate` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `UpdateCertificate` Mutation is of type `UpdateCertificateData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateCertificateData { + certificate_update?: Certificate_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `UpdateCertificate`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateCertificateVariables } from '@dataconnect/generated'; +import { useUpdateCertificate } from '@dataconnect/generated/react' + +export default function UpdateCertificateComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateCertificate(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateCertificate(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateCertificate(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateCertificate(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateCertificate` Mutation requires an argument of type `UpdateCertificateVariables`: + const updateCertificateVars: UpdateCertificateVariables = { + id: ..., + name: ..., // optional + description: ..., // optional + expiry: ..., // optional + status: ..., // optional + fileUrl: ..., // optional + icon: ..., // optional + staffId: ..., // optional + certificationType: ..., // optional + issuer: ..., // optional + validationStatus: ..., // optional + certificateNumber: ..., // optional + }; + mutation.mutate(updateCertificateVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., name: ..., description: ..., expiry: ..., status: ..., fileUrl: ..., icon: ..., staffId: ..., certificationType: ..., issuer: ..., validationStatus: ..., certificateNumber: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateCertificateVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.certificate_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## DeleteCertificate +You can execute the `DeleteCertificate` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteCertificate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteCertificate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `DeleteCertificate` Mutation requires an argument of type `DeleteCertificateVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteCertificateVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `DeleteCertificate` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `DeleteCertificate` Mutation is of type `DeleteCertificateData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteCertificateData { + certificate_delete?: Certificate_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `DeleteCertificate`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteCertificateVariables } from '@dataconnect/generated'; +import { useDeleteCertificate } from '@dataconnect/generated/react' + +export default function DeleteCertificateComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteCertificate(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteCertificate(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteCertificate(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteCertificate(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteCertificate` Mutation requires an argument of type `DeleteCertificateVariables`: + const deleteCertificateVars: DeleteCertificateVariables = { + id: ..., + }; + mutation.mutate(deleteCertificateVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteCertificateVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.certificate_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createRole +You can execute the `createRole` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createRole` Mutation requires an argument of type `CreateRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateRoleVariables { + name: string; + costPerHour: number; + vendorId: UUIDString; + roleCategoryId: UUIDString; +} +``` +### Return Type +Recall that calling the `createRole` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createRole` Mutation is of type `CreateRoleData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateRoleData { + role_insert: Role_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createRole`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateRoleVariables } from '@dataconnect/generated'; +import { useCreateRole } from '@dataconnect/generated/react' + +export default function CreateRoleComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateRole(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateRole(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateRole(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateRole(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateRole` Mutation requires an argument of type `CreateRoleVariables`: + const createRoleVars: CreateRoleVariables = { + name: ..., + costPerHour: ..., + vendorId: ..., + roleCategoryId: ..., + }; + mutation.mutate(createRoleVars); + // Variables can be defined inline as well. + mutation.mutate({ name: ..., costPerHour: ..., vendorId: ..., roleCategoryId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createRoleVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.role_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateRole +You can execute the `updateRole` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateRole` Mutation requires an argument of type `UpdateRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateRoleVariables { + id: UUIDString; + name?: string | null; + costPerHour?: number | null; + roleCategoryId: UUIDString; +} +``` +### Return Type +Recall that calling the `updateRole` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateRole` Mutation is of type `UpdateRoleData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateRoleData { + role_update?: Role_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateRole`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateRoleVariables } from '@dataconnect/generated'; +import { useUpdateRole } from '@dataconnect/generated/react' + +export default function UpdateRoleComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateRole(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateRole(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateRole(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateRole(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateRole` Mutation requires an argument of type `UpdateRoleVariables`: + const updateRoleVars: UpdateRoleVariables = { + id: ..., + name: ..., // optional + costPerHour: ..., // optional + roleCategoryId: ..., + }; + mutation.mutate(updateRoleVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., name: ..., costPerHour: ..., roleCategoryId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateRoleVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.role_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteRole +You can execute the `deleteRole` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteRole` Mutation requires an argument of type `DeleteRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteRoleVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteRole` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteRole` Mutation is of type `DeleteRoleData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteRoleData { + role_delete?: Role_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteRole`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteRoleVariables } from '@dataconnect/generated'; +import { useDeleteRole } from '@dataconnect/generated/react' + +export default function DeleteRoleComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteRole(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteRole(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteRole(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteRole(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteRole` Mutation requires an argument of type `DeleteRoleVariables`: + const deleteRoleVars: DeleteRoleVariables = { + id: ..., + }; + mutation.mutate(deleteRoleVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteRoleVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.role_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createClientFeedback +You can execute the `createClientFeedback` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateClientFeedback(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateClientFeedback(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createClientFeedback` Mutation requires an argument of type `CreateClientFeedbackVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateClientFeedbackVariables { + businessId: UUIDString; + vendorId: UUIDString; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdBy?: string | null; +} +``` +### Return Type +Recall that calling the `createClientFeedback` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createClientFeedback` Mutation is of type `CreateClientFeedbackData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateClientFeedbackData { + clientFeedback_insert: ClientFeedback_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createClientFeedback`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateClientFeedbackVariables } from '@dataconnect/generated'; +import { useCreateClientFeedback } from '@dataconnect/generated/react' + +export default function CreateClientFeedbackComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateClientFeedback(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateClientFeedback(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateClientFeedback(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateClientFeedback(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateClientFeedback` Mutation requires an argument of type `CreateClientFeedbackVariables`: + const createClientFeedbackVars: CreateClientFeedbackVariables = { + businessId: ..., + vendorId: ..., + rating: ..., // optional + comment: ..., // optional + date: ..., // optional + createdBy: ..., // optional + }; + mutation.mutate(createClientFeedbackVars); + // Variables can be defined inline as well. + mutation.mutate({ businessId: ..., vendorId: ..., rating: ..., comment: ..., date: ..., createdBy: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createClientFeedbackVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.clientFeedback_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateClientFeedback +You can execute the `updateClientFeedback` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateClientFeedback(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateClientFeedback(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateClientFeedback` Mutation requires an argument of type `UpdateClientFeedbackVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateClientFeedbackVariables { + id: UUIDString; + businessId?: UUIDString | null; + vendorId?: UUIDString | null; + rating?: number | null; + comment?: string | null; + date?: TimestampString | null; + createdBy?: string | null; +} +``` +### Return Type +Recall that calling the `updateClientFeedback` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateClientFeedback` Mutation is of type `UpdateClientFeedbackData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateClientFeedbackData { + clientFeedback_update?: ClientFeedback_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateClientFeedback`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateClientFeedbackVariables } from '@dataconnect/generated'; +import { useUpdateClientFeedback } from '@dataconnect/generated/react' + +export default function UpdateClientFeedbackComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateClientFeedback(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateClientFeedback(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateClientFeedback(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateClientFeedback(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateClientFeedback` Mutation requires an argument of type `UpdateClientFeedbackVariables`: + const updateClientFeedbackVars: UpdateClientFeedbackVariables = { + id: ..., + businessId: ..., // optional + vendorId: ..., // optional + rating: ..., // optional + comment: ..., // optional + date: ..., // optional + createdBy: ..., // optional + }; + mutation.mutate(updateClientFeedbackVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., businessId: ..., vendorId: ..., rating: ..., comment: ..., date: ..., createdBy: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateClientFeedbackVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.clientFeedback_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteClientFeedback +You can execute the `deleteClientFeedback` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteClientFeedback(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteClientFeedback(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteClientFeedback` Mutation requires an argument of type `DeleteClientFeedbackVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteClientFeedbackVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteClientFeedback` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteClientFeedback` Mutation is of type `DeleteClientFeedbackData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteClientFeedbackData { + clientFeedback_delete?: ClientFeedback_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteClientFeedback`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteClientFeedbackVariables } from '@dataconnect/generated'; +import { useDeleteClientFeedback } from '@dataconnect/generated/react' + +export default function DeleteClientFeedbackComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteClientFeedback(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteClientFeedback(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteClientFeedback(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteClientFeedback(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteClientFeedback` Mutation requires an argument of type `DeleteClientFeedbackVariables`: + const deleteClientFeedbackVars: DeleteClientFeedbackVariables = { + id: ..., + }; + mutation.mutate(deleteClientFeedbackVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteClientFeedbackVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.clientFeedback_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createBusiness +You can execute the `createBusiness` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateBusiness(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateBusiness(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createBusiness` Mutation requires an argument of type `CreateBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateBusinessVariables { + businessName: string; + contactName?: string | null; + userId: string; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup: BusinessRateGroup; + status: BusinessStatus; + notes?: string | null; +} +``` +### Return Type +Recall that calling the `createBusiness` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createBusiness` Mutation is of type `CreateBusinessData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateBusinessData { + business_insert: Business_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createBusiness`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateBusinessVariables } from '@dataconnect/generated'; +import { useCreateBusiness } from '@dataconnect/generated/react' + +export default function CreateBusinessComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateBusiness(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateBusiness(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateBusiness(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateBusiness(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateBusiness` Mutation requires an argument of type `CreateBusinessVariables`: + const createBusinessVars: CreateBusinessVariables = { + businessName: ..., + contactName: ..., // optional + userId: ..., + companyLogoUrl: ..., // optional + phone: ..., // optional + email: ..., // optional + hubBuilding: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + area: ..., // optional + sector: ..., // optional + rateGroup: ..., + status: ..., + notes: ..., // optional + }; + mutation.mutate(createBusinessVars); + // Variables can be defined inline as well. + mutation.mutate({ businessName: ..., contactName: ..., userId: ..., companyLogoUrl: ..., phone: ..., email: ..., hubBuilding: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., state: ..., street: ..., country: ..., zipCode: ..., area: ..., sector: ..., rateGroup: ..., status: ..., notes: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createBusinessVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.business_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateBusiness +You can execute the `updateBusiness` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateBusiness(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateBusiness(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateBusiness` Mutation requires an argument of type `UpdateBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateBusinessVariables { + id: UUIDString; + businessName?: string | null; + contactName?: string | null; + companyLogoUrl?: string | null; + phone?: string | null; + email?: string | null; + hubBuilding?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + area?: BusinessArea | null; + sector?: BusinessSector | null; + rateGroup?: BusinessRateGroup | null; + status?: BusinessStatus | null; + notes?: string | null; +} +``` +### Return Type +Recall that calling the `updateBusiness` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateBusiness` Mutation is of type `UpdateBusinessData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateBusinessData { + business_update?: Business_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateBusiness`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateBusinessVariables } from '@dataconnect/generated'; +import { useUpdateBusiness } from '@dataconnect/generated/react' + +export default function UpdateBusinessComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateBusiness(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateBusiness(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateBusiness(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateBusiness(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateBusiness` Mutation requires an argument of type `UpdateBusinessVariables`: + const updateBusinessVars: UpdateBusinessVariables = { + id: ..., + businessName: ..., // optional + contactName: ..., // optional + companyLogoUrl: ..., // optional + phone: ..., // optional + email: ..., // optional + hubBuilding: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + area: ..., // optional + sector: ..., // optional + rateGroup: ..., // optional + status: ..., // optional + notes: ..., // optional + }; + mutation.mutate(updateBusinessVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., businessName: ..., contactName: ..., companyLogoUrl: ..., phone: ..., email: ..., hubBuilding: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., state: ..., street: ..., country: ..., zipCode: ..., area: ..., sector: ..., rateGroup: ..., status: ..., notes: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateBusinessVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.business_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteBusiness +You can execute the `deleteBusiness` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteBusiness(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteBusiness(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteBusiness` Mutation requires an argument of type `DeleteBusinessVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteBusinessVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteBusiness` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteBusiness` Mutation is of type `DeleteBusinessData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteBusinessData { + business_delete?: Business_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteBusiness`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteBusinessVariables } from '@dataconnect/generated'; +import { useDeleteBusiness } from '@dataconnect/generated/react' + +export default function DeleteBusinessComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteBusiness(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteBusiness(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteBusiness(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteBusiness(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteBusiness` Mutation requires an argument of type `DeleteBusinessVariables`: + const deleteBusinessVars: DeleteBusinessVariables = { + id: ..., + }; + mutation.mutate(deleteBusinessVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteBusinessVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.business_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createConversation +You can execute the `createConversation` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateConversation(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateConversation(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createConversation` Mutation has an optional argument of type `CreateConversationVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateConversationVariables { + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `createConversation` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createConversation` Mutation is of type `CreateConversationData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateConversationData { + conversation_insert: Conversation_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createConversation`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateConversationVariables } from '@dataconnect/generated'; +import { useCreateConversation } from '@dataconnect/generated/react' + +export default function CreateConversationComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateConversation(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateConversation(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateConversation(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateConversation(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateConversation` Mutation has an optional argument of type `CreateConversationVariables`: + const createConversationVars: CreateConversationVariables = { + subject: ..., // optional + status: ..., // optional + conversationType: ..., // optional + isGroup: ..., // optional + groupName: ..., // optional + lastMessage: ..., // optional + lastMessageAt: ..., // optional + }; + mutation.mutate(createConversationVars); + // Variables can be defined inline as well. + mutation.mutate({ subject: ..., status: ..., conversationType: ..., isGroup: ..., groupName: ..., lastMessage: ..., lastMessageAt: ..., }); + // Since all variables are optional for this Mutation, you can omit the `CreateConversationVariables` argument. + mutation.mutate(); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + // Since all variables are optional for this Mutation, you can provide options without providing any variables. + // To do so, you must pass `undefined` where you would normally pass the variables. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createConversationVars /** or undefined */, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.conversation_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateConversation +You can execute the `updateConversation` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateConversation(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateConversation(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateConversation` Mutation requires an argument of type `UpdateConversationVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateConversationVariables { + id: UUIDString; + subject?: string | null; + status?: ConversationStatus | null; + conversationType?: ConversationType | null; + isGroup?: boolean | null; + groupName?: string | null; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `updateConversation` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateConversation` Mutation is of type `UpdateConversationData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateConversationData { + conversation_update?: Conversation_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateConversation`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateConversationVariables } from '@dataconnect/generated'; +import { useUpdateConversation } from '@dataconnect/generated/react' + +export default function UpdateConversationComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateConversation(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateConversation(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateConversation(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateConversation(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateConversation` Mutation requires an argument of type `UpdateConversationVariables`: + const updateConversationVars: UpdateConversationVariables = { + id: ..., + subject: ..., // optional + status: ..., // optional + conversationType: ..., // optional + isGroup: ..., // optional + groupName: ..., // optional + lastMessage: ..., // optional + lastMessageAt: ..., // optional + }; + mutation.mutate(updateConversationVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., subject: ..., status: ..., conversationType: ..., isGroup: ..., groupName: ..., lastMessage: ..., lastMessageAt: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateConversationVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.conversation_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateConversationLastMessage +You can execute the `updateConversationLastMessage` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateConversationLastMessage(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateConversationLastMessage(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateConversationLastMessage` Mutation requires an argument of type `UpdateConversationLastMessageVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateConversationLastMessageVariables { + id: UUIDString; + lastMessage?: string | null; + lastMessageAt?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `updateConversationLastMessage` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateConversationLastMessage` Mutation is of type `UpdateConversationLastMessageData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateConversationLastMessageData { + conversation_update?: Conversation_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateConversationLastMessage`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateConversationLastMessageVariables } from '@dataconnect/generated'; +import { useUpdateConversationLastMessage } from '@dataconnect/generated/react' + +export default function UpdateConversationLastMessageComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateConversationLastMessage(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateConversationLastMessage(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateConversationLastMessage(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateConversationLastMessage(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateConversationLastMessage` Mutation requires an argument of type `UpdateConversationLastMessageVariables`: + const updateConversationLastMessageVars: UpdateConversationLastMessageVariables = { + id: ..., + lastMessage: ..., // optional + lastMessageAt: ..., // optional + }; + mutation.mutate(updateConversationLastMessageVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., lastMessage: ..., lastMessageAt: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateConversationLastMessageVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.conversation_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteConversation +You can execute the `deleteConversation` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteConversation(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteConversation(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteConversation` Mutation requires an argument of type `DeleteConversationVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteConversationVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteConversation` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteConversation` Mutation is of type `DeleteConversationData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteConversationData { + conversation_delete?: Conversation_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteConversation`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteConversationVariables } from '@dataconnect/generated'; +import { useDeleteConversation } from '@dataconnect/generated/react' + +export default function DeleteConversationComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteConversation(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteConversation(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteConversation(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteConversation(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteConversation` Mutation requires an argument of type `DeleteConversationVariables`: + const deleteConversationVars: DeleteConversationVariables = { + id: ..., + }; + mutation.mutate(deleteConversationVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteConversationVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.conversation_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createCustomRateCard +You can execute the `createCustomRateCard` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateCustomRateCard(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateCustomRateCard(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createCustomRateCard` Mutation requires an argument of type `CreateCustomRateCardVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateCustomRateCardVariables { + name: string; + baseBook?: string | null; + discount?: number | null; + isDefault?: boolean | null; +} +``` +### Return Type +Recall that calling the `createCustomRateCard` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createCustomRateCard` Mutation is of type `CreateCustomRateCardData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateCustomRateCardData { + customRateCard_insert: CustomRateCard_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createCustomRateCard`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateCustomRateCardVariables } from '@dataconnect/generated'; +import { useCreateCustomRateCard } from '@dataconnect/generated/react' + +export default function CreateCustomRateCardComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateCustomRateCard(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateCustomRateCard(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateCustomRateCard(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateCustomRateCard(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateCustomRateCard` Mutation requires an argument of type `CreateCustomRateCardVariables`: + const createCustomRateCardVars: CreateCustomRateCardVariables = { + name: ..., + baseBook: ..., // optional + discount: ..., // optional + isDefault: ..., // optional + }; + mutation.mutate(createCustomRateCardVars); + // Variables can be defined inline as well. + mutation.mutate({ name: ..., baseBook: ..., discount: ..., isDefault: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createCustomRateCardVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.customRateCard_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateCustomRateCard +You can execute the `updateCustomRateCard` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateCustomRateCard(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateCustomRateCard(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateCustomRateCard` Mutation requires an argument of type `UpdateCustomRateCardVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateCustomRateCardVariables { + id: UUIDString; + name?: string | null; + baseBook?: string | null; + discount?: number | null; + isDefault?: boolean | null; +} +``` +### Return Type +Recall that calling the `updateCustomRateCard` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateCustomRateCard` Mutation is of type `UpdateCustomRateCardData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateCustomRateCardData { + customRateCard_update?: CustomRateCard_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateCustomRateCard`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateCustomRateCardVariables } from '@dataconnect/generated'; +import { useUpdateCustomRateCard } from '@dataconnect/generated/react' + +export default function UpdateCustomRateCardComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateCustomRateCard(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateCustomRateCard(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateCustomRateCard(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateCustomRateCard(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateCustomRateCard` Mutation requires an argument of type `UpdateCustomRateCardVariables`: + const updateCustomRateCardVars: UpdateCustomRateCardVariables = { + id: ..., + name: ..., // optional + baseBook: ..., // optional + discount: ..., // optional + isDefault: ..., // optional + }; + mutation.mutate(updateCustomRateCardVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., name: ..., baseBook: ..., discount: ..., isDefault: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateCustomRateCardVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.customRateCard_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteCustomRateCard +You can execute the `deleteCustomRateCard` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteCustomRateCard(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteCustomRateCard(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteCustomRateCard` Mutation requires an argument of type `DeleteCustomRateCardVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteCustomRateCardVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteCustomRateCard` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteCustomRateCard` Mutation is of type `DeleteCustomRateCardData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteCustomRateCardData { + customRateCard_delete?: CustomRateCard_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteCustomRateCard`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteCustomRateCardVariables } from '@dataconnect/generated'; +import { useDeleteCustomRateCard } from '@dataconnect/generated/react' + +export default function DeleteCustomRateCardComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteCustomRateCard(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteCustomRateCard(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteCustomRateCard(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteCustomRateCard(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteCustomRateCard` Mutation requires an argument of type `DeleteCustomRateCardVariables`: + const deleteCustomRateCardVars: DeleteCustomRateCardVariables = { + id: ..., + }; + mutation.mutate(deleteCustomRateCardVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteCustomRateCardVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.customRateCard_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createRecentPayment +You can execute the `createRecentPayment` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateRecentPayment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateRecentPayment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createRecentPayment` Mutation requires an argument of type `CreateRecentPaymentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateRecentPaymentVariables { + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId: UUIDString; + applicationId: UUIDString; + invoiceId: UUIDString; +} +``` +### Return Type +Recall that calling the `createRecentPayment` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createRecentPayment` Mutation is of type `CreateRecentPaymentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateRecentPaymentData { + recentPayment_insert: RecentPayment_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createRecentPayment`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateRecentPaymentVariables } from '@dataconnect/generated'; +import { useCreateRecentPayment } from '@dataconnect/generated/react' + +export default function CreateRecentPaymentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateRecentPayment(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateRecentPayment(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateRecentPayment(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateRecentPayment(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateRecentPayment` Mutation requires an argument of type `CreateRecentPaymentVariables`: + const createRecentPaymentVars: CreateRecentPaymentVariables = { + workedTime: ..., // optional + status: ..., // optional + staffId: ..., + applicationId: ..., + invoiceId: ..., + }; + mutation.mutate(createRecentPaymentVars); + // Variables can be defined inline as well. + mutation.mutate({ workedTime: ..., status: ..., staffId: ..., applicationId: ..., invoiceId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createRecentPaymentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.recentPayment_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateRecentPayment +You can execute the `updateRecentPayment` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateRecentPayment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateRecentPayment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateRecentPayment` Mutation requires an argument of type `UpdateRecentPaymentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateRecentPaymentVariables { + id: UUIDString; + workedTime?: string | null; + status?: RecentPaymentStatus | null; + staffId?: UUIDString | null; + applicationId?: UUIDString | null; + invoiceId?: UUIDString | null; +} +``` +### Return Type +Recall that calling the `updateRecentPayment` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateRecentPayment` Mutation is of type `UpdateRecentPaymentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateRecentPaymentData { + recentPayment_update?: RecentPayment_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateRecentPayment`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateRecentPaymentVariables } from '@dataconnect/generated'; +import { useUpdateRecentPayment } from '@dataconnect/generated/react' + +export default function UpdateRecentPaymentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateRecentPayment(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateRecentPayment(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateRecentPayment(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateRecentPayment(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateRecentPayment` Mutation requires an argument of type `UpdateRecentPaymentVariables`: + const updateRecentPaymentVars: UpdateRecentPaymentVariables = { + id: ..., + workedTime: ..., // optional + status: ..., // optional + staffId: ..., // optional + applicationId: ..., // optional + invoiceId: ..., // optional + }; + mutation.mutate(updateRecentPaymentVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., workedTime: ..., status: ..., staffId: ..., applicationId: ..., invoiceId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateRecentPaymentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.recentPayment_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteRecentPayment +You can execute the `deleteRecentPayment` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteRecentPayment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteRecentPayment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteRecentPayment` Mutation requires an argument of type `DeleteRecentPaymentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteRecentPaymentVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteRecentPayment` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteRecentPayment` Mutation is of type `DeleteRecentPaymentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteRecentPaymentData { + recentPayment_delete?: RecentPayment_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteRecentPayment`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteRecentPaymentVariables } from '@dataconnect/generated'; +import { useDeleteRecentPayment } from '@dataconnect/generated/react' + +export default function DeleteRecentPaymentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteRecentPayment(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteRecentPayment(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteRecentPayment(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteRecentPayment(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteRecentPayment` Mutation requires an argument of type `DeleteRecentPaymentVariables`: + const deleteRecentPaymentVars: DeleteRecentPaymentVariables = { + id: ..., + }; + mutation.mutate(deleteRecentPaymentVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteRecentPaymentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.recentPayment_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## CreateUser +You can execute the `CreateUser` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateUser(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateUser(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `CreateUser` Mutation requires an argument of type `CreateUserVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateUserVariables { + id: string; + email?: string | null; + fullName?: string | null; + role: UserBaseRole; + userRole?: string | null; + photoUrl?: string | null; +} +``` +### Return Type +Recall that calling the `CreateUser` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `CreateUser` Mutation is of type `CreateUserData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateUserData { + user_insert: User_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `CreateUser`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateUserVariables } from '@dataconnect/generated'; +import { useCreateUser } from '@dataconnect/generated/react' + +export default function CreateUserComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateUser(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateUser(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateUser(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateUser(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateUser` Mutation requires an argument of type `CreateUserVariables`: + const createUserVars: CreateUserVariables = { + id: ..., + email: ..., // optional + fullName: ..., // optional + role: ..., + userRole: ..., // optional + photoUrl: ..., // optional + }; + mutation.mutate(createUserVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., email: ..., fullName: ..., role: ..., userRole: ..., photoUrl: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createUserVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.user_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## UpdateUser +You can execute the `UpdateUser` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateUser(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateUser(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `UpdateUser` Mutation requires an argument of type `UpdateUserVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateUserVariables { + id: string; + email?: string | null; + fullName?: string | null; + role?: UserBaseRole | null; + userRole?: string | null; + photoUrl?: string | null; +} +``` +### Return Type +Recall that calling the `UpdateUser` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `UpdateUser` Mutation is of type `UpdateUserData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateUserData { + user_update?: User_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `UpdateUser`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateUserVariables } from '@dataconnect/generated'; +import { useUpdateUser } from '@dataconnect/generated/react' + +export default function UpdateUserComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateUser(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateUser(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateUser(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateUser(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateUser` Mutation requires an argument of type `UpdateUserVariables`: + const updateUserVars: UpdateUserVariables = { + id: ..., + email: ..., // optional + fullName: ..., // optional + role: ..., // optional + userRole: ..., // optional + photoUrl: ..., // optional + }; + mutation.mutate(updateUserVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., email: ..., fullName: ..., role: ..., userRole: ..., photoUrl: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateUserVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.user_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## DeleteUser +You can execute the `DeleteUser` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteUser(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteUser(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `DeleteUser` Mutation requires an argument of type `DeleteUserVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteUserVariables { + id: string; +} +``` +### Return Type +Recall that calling the `DeleteUser` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `DeleteUser` Mutation is of type `DeleteUserData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteUserData { + user_delete?: User_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `DeleteUser`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteUserVariables } from '@dataconnect/generated'; +import { useDeleteUser } from '@dataconnect/generated/react' + +export default function DeleteUserComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteUser(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteUser(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteUser(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteUser(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteUser` Mutation requires an argument of type `DeleteUserVariables`: + const deleteUserVars: DeleteUserVariables = { + id: ..., + }; + mutation.mutate(deleteUserVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteUserVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.user_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createVendor +You can execute the `createVendor` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateVendor(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateVendor(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createVendor` Mutation requires an argument of type `CreateVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateVendorVariables { + userId: string; + companyName: string; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; +} +``` +### Return Type +Recall that calling the `createVendor` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createVendor` Mutation is of type `CreateVendorData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateVendorData { + vendor_insert: Vendor_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createVendor`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateVendorVariables } from '@dataconnect/generated'; +import { useCreateVendor } from '@dataconnect/generated/react' + +export default function CreateVendorComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateVendor(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateVendor(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateVendor(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateVendor(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateVendor` Mutation requires an argument of type `CreateVendorVariables`: + const createVendorVars: CreateVendorVariables = { + userId: ..., + companyName: ..., + email: ..., // optional + phone: ..., // optional + photoUrl: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + billingAddress: ..., // optional + timezone: ..., // optional + legalName: ..., // optional + doingBusinessAs: ..., // optional + region: ..., // optional + state: ..., // optional + city: ..., // optional + serviceSpecialty: ..., // optional + approvalStatus: ..., // optional + isActive: ..., // optional + markup: ..., // optional + fee: ..., // optional + csat: ..., // optional + tier: ..., // optional + }; + mutation.mutate(createVendorVars); + // Variables can be defined inline as well. + mutation.mutate({ userId: ..., companyName: ..., email: ..., phone: ..., photoUrl: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., street: ..., country: ..., zipCode: ..., billingAddress: ..., timezone: ..., legalName: ..., doingBusinessAs: ..., region: ..., state: ..., city: ..., serviceSpecialty: ..., approvalStatus: ..., isActive: ..., markup: ..., fee: ..., csat: ..., tier: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createVendorVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.vendor_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateVendor +You can execute the `updateVendor` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateVendor(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateVendor(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateVendor` Mutation requires an argument of type `UpdateVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateVendorVariables { + id: UUIDString; + companyName?: string | null; + email?: string | null; + phone?: string | null; + photoUrl?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + billingAddress?: string | null; + timezone?: string | null; + legalName?: string | null; + doingBusinessAs?: string | null; + region?: string | null; + state?: string | null; + city?: string | null; + serviceSpecialty?: string | null; + approvalStatus?: ApprovalStatus | null; + isActive?: boolean | null; + markup?: number | null; + fee?: number | null; + csat?: number | null; + tier?: VendorTier | null; +} +``` +### Return Type +Recall that calling the `updateVendor` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateVendor` Mutation is of type `UpdateVendorData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateVendorData { + vendor_update?: Vendor_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateVendor`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateVendorVariables } from '@dataconnect/generated'; +import { useUpdateVendor } from '@dataconnect/generated/react' + +export default function UpdateVendorComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateVendor(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateVendor(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateVendor(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateVendor(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateVendor` Mutation requires an argument of type `UpdateVendorVariables`: + const updateVendorVars: UpdateVendorVariables = { + id: ..., + companyName: ..., // optional + email: ..., // optional + phone: ..., // optional + photoUrl: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + billingAddress: ..., // optional + timezone: ..., // optional + legalName: ..., // optional + doingBusinessAs: ..., // optional + region: ..., // optional + state: ..., // optional + city: ..., // optional + serviceSpecialty: ..., // optional + approvalStatus: ..., // optional + isActive: ..., // optional + markup: ..., // optional + fee: ..., // optional + csat: ..., // optional + tier: ..., // optional + }; + mutation.mutate(updateVendorVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., companyName: ..., email: ..., phone: ..., photoUrl: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., street: ..., country: ..., zipCode: ..., billingAddress: ..., timezone: ..., legalName: ..., doingBusinessAs: ..., region: ..., state: ..., city: ..., serviceSpecialty: ..., approvalStatus: ..., isActive: ..., markup: ..., fee: ..., csat: ..., tier: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateVendorVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.vendor_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteVendor +You can execute the `deleteVendor` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteVendor(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteVendor(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteVendor` Mutation requires an argument of type `DeleteVendorVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteVendorVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteVendor` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteVendor` Mutation is of type `DeleteVendorData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteVendorData { + vendor_delete?: Vendor_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteVendor`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteVendorVariables } from '@dataconnect/generated'; +import { useDeleteVendor } from '@dataconnect/generated/react' + +export default function DeleteVendorComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteVendor(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteVendor(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteVendor(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteVendor(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteVendor` Mutation requires an argument of type `DeleteVendorVariables`: + const deleteVendorVars: DeleteVendorVariables = { + id: ..., + }; + mutation.mutate(deleteVendorVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteVendorVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.vendor_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createDocument +You can execute the `createDocument` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateDocument(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateDocument(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createDocument` Mutation requires an argument of type `CreateDocumentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateDocumentVariables { + documentType: DocumentType; + name: string; + description?: string | null; +} +``` +### Return Type +Recall that calling the `createDocument` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createDocument` Mutation is of type `CreateDocumentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateDocumentData { + document_insert: Document_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createDocument`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateDocumentVariables } from '@dataconnect/generated'; +import { useCreateDocument } from '@dataconnect/generated/react' + +export default function CreateDocumentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateDocument(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateDocument(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateDocument(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateDocument(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateDocument` Mutation requires an argument of type `CreateDocumentVariables`: + const createDocumentVars: CreateDocumentVariables = { + documentType: ..., + name: ..., + description: ..., // optional + }; + mutation.mutate(createDocumentVars); + // Variables can be defined inline as well. + mutation.mutate({ documentType: ..., name: ..., description: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createDocumentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.document_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateDocument +You can execute the `updateDocument` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateDocument(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateDocument(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateDocument` Mutation requires an argument of type `UpdateDocumentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateDocumentVariables { + id: UUIDString; + documentType?: DocumentType | null; + name?: string | null; + description?: string | null; +} +``` +### Return Type +Recall that calling the `updateDocument` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateDocument` Mutation is of type `UpdateDocumentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateDocumentData { + document_update?: Document_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateDocument`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateDocumentVariables } from '@dataconnect/generated'; +import { useUpdateDocument } from '@dataconnect/generated/react' + +export default function UpdateDocumentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateDocument(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateDocument(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateDocument(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateDocument(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateDocument` Mutation requires an argument of type `UpdateDocumentVariables`: + const updateDocumentVars: UpdateDocumentVariables = { + id: ..., + documentType: ..., // optional + name: ..., // optional + description: ..., // optional + }; + mutation.mutate(updateDocumentVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., documentType: ..., name: ..., description: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateDocumentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.document_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteDocument +You can execute the `deleteDocument` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteDocument(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteDocument(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteDocument` Mutation requires an argument of type `DeleteDocumentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteDocumentVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteDocument` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteDocument` Mutation is of type `DeleteDocumentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteDocumentData { + document_delete?: Document_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteDocument`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteDocumentVariables } from '@dataconnect/generated'; +import { useDeleteDocument } from '@dataconnect/generated/react' + +export default function DeleteDocumentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteDocument(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteDocument(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteDocument(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteDocument(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteDocument` Mutation requires an argument of type `DeleteDocumentVariables`: + const deleteDocumentVars: DeleteDocumentVariables = { + id: ..., + }; + mutation.mutate(deleteDocumentVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteDocumentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.document_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createTaskComment +You can execute the `createTaskComment` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateTaskComment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateTaskComment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createTaskComment` Mutation requires an argument of type `CreateTaskCommentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateTaskCommentVariables { + taskId: UUIDString; + teamMemberId: UUIDString; + comment: string; + isSystem?: boolean | null; +} +``` +### Return Type +Recall that calling the `createTaskComment` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createTaskComment` Mutation is of type `CreateTaskCommentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateTaskCommentData { + taskComment_insert: TaskComment_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createTaskComment`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateTaskCommentVariables } from '@dataconnect/generated'; +import { useCreateTaskComment } from '@dataconnect/generated/react' + +export default function CreateTaskCommentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateTaskComment(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateTaskComment(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTaskComment(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTaskComment(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateTaskComment` Mutation requires an argument of type `CreateTaskCommentVariables`: + const createTaskCommentVars: CreateTaskCommentVariables = { + taskId: ..., + teamMemberId: ..., + comment: ..., + isSystem: ..., // optional + }; + mutation.mutate(createTaskCommentVars); + // Variables can be defined inline as well. + mutation.mutate({ taskId: ..., teamMemberId: ..., comment: ..., isSystem: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createTaskCommentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.taskComment_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateTaskComment +You can execute the `updateTaskComment` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateTaskComment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateTaskComment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateTaskComment` Mutation requires an argument of type `UpdateTaskCommentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateTaskCommentVariables { + id: UUIDString; + comment?: string | null; + isSystem?: boolean | null; +} +``` +### Return Type +Recall that calling the `updateTaskComment` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateTaskComment` Mutation is of type `UpdateTaskCommentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateTaskCommentData { + taskComment_update?: TaskComment_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateTaskComment`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateTaskCommentVariables } from '@dataconnect/generated'; +import { useUpdateTaskComment } from '@dataconnect/generated/react' + +export default function UpdateTaskCommentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateTaskComment(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateTaskComment(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTaskComment(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTaskComment(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateTaskComment` Mutation requires an argument of type `UpdateTaskCommentVariables`: + const updateTaskCommentVars: UpdateTaskCommentVariables = { + id: ..., + comment: ..., // optional + isSystem: ..., // optional + }; + mutation.mutate(updateTaskCommentVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., comment: ..., isSystem: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateTaskCommentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.taskComment_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteTaskComment +You can execute the `deleteTaskComment` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteTaskComment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteTaskComment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteTaskComment` Mutation requires an argument of type `DeleteTaskCommentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteTaskCommentVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteTaskComment` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteTaskComment` Mutation is of type `DeleteTaskCommentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteTaskCommentData { + taskComment_delete?: TaskComment_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteTaskComment`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteTaskCommentVariables } from '@dataconnect/generated'; +import { useDeleteTaskComment } from '@dataconnect/generated/react' + +export default function DeleteTaskCommentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteTaskComment(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteTaskComment(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTaskComment(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTaskComment(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteTaskComment` Mutation requires an argument of type `DeleteTaskCommentVariables`: + const deleteTaskCommentVars: DeleteTaskCommentVariables = { + id: ..., + }; + mutation.mutate(deleteTaskCommentVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteTaskCommentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.taskComment_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createVendorBenefitPlan +You can execute the `createVendorBenefitPlan` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateVendorBenefitPlan(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateVendorBenefitPlan(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createVendorBenefitPlan` Mutation requires an argument of type `CreateVendorBenefitPlanVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateVendorBenefitPlanVariables { + vendorId: UUIDString; + title: string; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdBy?: string | null; +} +``` +### Return Type +Recall that calling the `createVendorBenefitPlan` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createVendorBenefitPlan` Mutation is of type `CreateVendorBenefitPlanData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateVendorBenefitPlanData { + vendorBenefitPlan_insert: VendorBenefitPlan_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createVendorBenefitPlan`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateVendorBenefitPlanVariables } from '@dataconnect/generated'; +import { useCreateVendorBenefitPlan } from '@dataconnect/generated/react' + +export default function CreateVendorBenefitPlanComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateVendorBenefitPlan(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateVendorBenefitPlan(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateVendorBenefitPlan(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateVendorBenefitPlan(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateVendorBenefitPlan` Mutation requires an argument of type `CreateVendorBenefitPlanVariables`: + const createVendorBenefitPlanVars: CreateVendorBenefitPlanVariables = { + vendorId: ..., + title: ..., + description: ..., // optional + requestLabel: ..., // optional + total: ..., // optional + isActive: ..., // optional + createdBy: ..., // optional + }; + mutation.mutate(createVendorBenefitPlanVars); + // Variables can be defined inline as well. + mutation.mutate({ vendorId: ..., title: ..., description: ..., requestLabel: ..., total: ..., isActive: ..., createdBy: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createVendorBenefitPlanVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.vendorBenefitPlan_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateVendorBenefitPlan +You can execute the `updateVendorBenefitPlan` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateVendorBenefitPlan(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateVendorBenefitPlan(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateVendorBenefitPlan` Mutation requires an argument of type `UpdateVendorBenefitPlanVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateVendorBenefitPlanVariables { + id: UUIDString; + vendorId?: UUIDString | null; + title?: string | null; + description?: string | null; + requestLabel?: string | null; + total?: number | null; + isActive?: boolean | null; + createdBy?: string | null; +} +``` +### Return Type +Recall that calling the `updateVendorBenefitPlan` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateVendorBenefitPlan` Mutation is of type `UpdateVendorBenefitPlanData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateVendorBenefitPlanData { + vendorBenefitPlan_update?: VendorBenefitPlan_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateVendorBenefitPlan`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateVendorBenefitPlanVariables } from '@dataconnect/generated'; +import { useUpdateVendorBenefitPlan } from '@dataconnect/generated/react' + +export default function UpdateVendorBenefitPlanComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateVendorBenefitPlan(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateVendorBenefitPlan(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateVendorBenefitPlan(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateVendorBenefitPlan(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateVendorBenefitPlan` Mutation requires an argument of type `UpdateVendorBenefitPlanVariables`: + const updateVendorBenefitPlanVars: UpdateVendorBenefitPlanVariables = { + id: ..., + vendorId: ..., // optional + title: ..., // optional + description: ..., // optional + requestLabel: ..., // optional + total: ..., // optional + isActive: ..., // optional + createdBy: ..., // optional + }; + mutation.mutate(updateVendorBenefitPlanVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., vendorId: ..., title: ..., description: ..., requestLabel: ..., total: ..., isActive: ..., createdBy: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateVendorBenefitPlanVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.vendorBenefitPlan_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteVendorBenefitPlan +You can execute the `deleteVendorBenefitPlan` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteVendorBenefitPlan(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteVendorBenefitPlan(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteVendorBenefitPlan` Mutation requires an argument of type `DeleteVendorBenefitPlanVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteVendorBenefitPlanVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteVendorBenefitPlan` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteVendorBenefitPlan` Mutation is of type `DeleteVendorBenefitPlanData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteVendorBenefitPlanData { + vendorBenefitPlan_delete?: VendorBenefitPlan_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteVendorBenefitPlan`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteVendorBenefitPlanVariables } from '@dataconnect/generated'; +import { useDeleteVendorBenefitPlan } from '@dataconnect/generated/react' + +export default function DeleteVendorBenefitPlanComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteVendorBenefitPlan(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteVendorBenefitPlan(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteVendorBenefitPlan(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteVendorBenefitPlan(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteVendorBenefitPlan` Mutation requires an argument of type `DeleteVendorBenefitPlanVariables`: + const deleteVendorBenefitPlanVars: DeleteVendorBenefitPlanVariables = { + id: ..., + }; + mutation.mutate(deleteVendorBenefitPlanVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteVendorBenefitPlanVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.vendorBenefitPlan_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createMessage +You can execute the `createMessage` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateMessage(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateMessage(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createMessage` Mutation requires an argument of type `CreateMessageVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateMessageVariables { + conversationId: UUIDString; + senderId: string; + content: string; + isSystem?: boolean | null; +} +``` +### Return Type +Recall that calling the `createMessage` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createMessage` Mutation is of type `CreateMessageData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateMessageData { + message_insert: Message_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createMessage`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateMessageVariables } from '@dataconnect/generated'; +import { useCreateMessage } from '@dataconnect/generated/react' + +export default function CreateMessageComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateMessage(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateMessage(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateMessage(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateMessage(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateMessage` Mutation requires an argument of type `CreateMessageVariables`: + const createMessageVars: CreateMessageVariables = { + conversationId: ..., + senderId: ..., + content: ..., + isSystem: ..., // optional + }; + mutation.mutate(createMessageVars); + // Variables can be defined inline as well. + mutation.mutate({ conversationId: ..., senderId: ..., content: ..., isSystem: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createMessageVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.message_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateMessage +You can execute the `updateMessage` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateMessage(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateMessage(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateMessage` Mutation requires an argument of type `UpdateMessageVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateMessageVariables { + id: UUIDString; + conversationId?: UUIDString | null; + senderId?: string | null; + content?: string | null; + isSystem?: boolean | null; +} +``` +### Return Type +Recall that calling the `updateMessage` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateMessage` Mutation is of type `UpdateMessageData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateMessageData { + message_update?: Message_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateMessage`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateMessageVariables } from '@dataconnect/generated'; +import { useUpdateMessage } from '@dataconnect/generated/react' + +export default function UpdateMessageComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateMessage(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateMessage(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateMessage(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateMessage(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateMessage` Mutation requires an argument of type `UpdateMessageVariables`: + const updateMessageVars: UpdateMessageVariables = { + id: ..., + conversationId: ..., // optional + senderId: ..., // optional + content: ..., // optional + isSystem: ..., // optional + }; + mutation.mutate(updateMessageVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., conversationId: ..., senderId: ..., content: ..., isSystem: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateMessageVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.message_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteMessage +You can execute the `deleteMessage` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteMessage(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteMessage(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteMessage` Mutation requires an argument of type `DeleteMessageVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteMessageVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteMessage` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteMessage` Mutation is of type `DeleteMessageData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteMessageData { + message_delete?: Message_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteMessage`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteMessageVariables } from '@dataconnect/generated'; +import { useDeleteMessage } from '@dataconnect/generated/react' + +export default function DeleteMessageComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteMessage(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteMessage(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteMessage(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteMessage(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteMessage` Mutation requires an argument of type `DeleteMessageVariables`: + const deleteMessageVars: DeleteMessageVariables = { + id: ..., + }; + mutation.mutate(deleteMessageVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteMessageVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.message_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createWorkforce +You can execute the `createWorkforce` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateWorkforce(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateWorkforce(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createWorkforce` Mutation requires an argument of type `CreateWorkforceVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateWorkforceVariables { + vendorId: UUIDString; + staffId: UUIDString; + workforceNumber: string; + employmentType?: WorkforceEmploymentType | null; +} +``` +### Return Type +Recall that calling the `createWorkforce` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createWorkforce` Mutation is of type `CreateWorkforceData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateWorkforceData { + workforce_insert: Workforce_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createWorkforce`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateWorkforceVariables } from '@dataconnect/generated'; +import { useCreateWorkforce } from '@dataconnect/generated/react' + +export default function CreateWorkforceComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateWorkforce(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateWorkforce(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateWorkforce(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateWorkforce(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateWorkforce` Mutation requires an argument of type `CreateWorkforceVariables`: + const createWorkforceVars: CreateWorkforceVariables = { + vendorId: ..., + staffId: ..., + workforceNumber: ..., + employmentType: ..., // optional + }; + mutation.mutate(createWorkforceVars); + // Variables can be defined inline as well. + mutation.mutate({ vendorId: ..., staffId: ..., workforceNumber: ..., employmentType: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createWorkforceVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.workforce_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateWorkforce +You can execute the `updateWorkforce` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateWorkforce(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateWorkforce(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateWorkforce` Mutation requires an argument of type `UpdateWorkforceVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateWorkforceVariables { + id: UUIDString; + workforceNumber?: string | null; + employmentType?: WorkforceEmploymentType | null; + status?: WorkforceStatus | null; +} +``` +### Return Type +Recall that calling the `updateWorkforce` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateWorkforce` Mutation is of type `UpdateWorkforceData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateWorkforceData { + workforce_update?: Workforce_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateWorkforce`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateWorkforceVariables } from '@dataconnect/generated'; +import { useUpdateWorkforce } from '@dataconnect/generated/react' + +export default function UpdateWorkforceComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateWorkforce(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateWorkforce(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateWorkforce(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateWorkforce(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateWorkforce` Mutation requires an argument of type `UpdateWorkforceVariables`: + const updateWorkforceVars: UpdateWorkforceVariables = { + id: ..., + workforceNumber: ..., // optional + employmentType: ..., // optional + status: ..., // optional + }; + mutation.mutate(updateWorkforceVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., workforceNumber: ..., employmentType: ..., status: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateWorkforceVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.workforce_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deactivateWorkforce +You can execute the `deactivateWorkforce` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeactivateWorkforce(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeactivateWorkforce(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deactivateWorkforce` Mutation requires an argument of type `DeactivateWorkforceVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeactivateWorkforceVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deactivateWorkforce` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deactivateWorkforce` Mutation is of type `DeactivateWorkforceData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeactivateWorkforceData { + workforce_update?: Workforce_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deactivateWorkforce`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeactivateWorkforceVariables } from '@dataconnect/generated'; +import { useDeactivateWorkforce } from '@dataconnect/generated/react' + +export default function DeactivateWorkforceComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeactivateWorkforce(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeactivateWorkforce(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeactivateWorkforce(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeactivateWorkforce(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeactivateWorkforce` Mutation requires an argument of type `DeactivateWorkforceVariables`: + const deactivateWorkforceVars: DeactivateWorkforceVariables = { + id: ..., + }; + mutation.mutate(deactivateWorkforceVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deactivateWorkforceVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.workforce_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createFaqData +You can execute the `createFaqData` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateFaqData(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateFaqData(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createFaqData` Mutation requires an argument of type `CreateFaqDataVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateFaqDataVariables { + category: string; + questions?: unknown[] | null; +} +``` +### Return Type +Recall that calling the `createFaqData` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createFaqData` Mutation is of type `CreateFaqDataData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateFaqDataData { + faqData_insert: FaqData_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createFaqData`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateFaqDataVariables } from '@dataconnect/generated'; +import { useCreateFaqData } from '@dataconnect/generated/react' + +export default function CreateFaqDataComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateFaqData(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateFaqData(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateFaqData(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateFaqData(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateFaqData` Mutation requires an argument of type `CreateFaqDataVariables`: + const createFaqDataVars: CreateFaqDataVariables = { + category: ..., + questions: ..., // optional + }; + mutation.mutate(createFaqDataVars); + // Variables can be defined inline as well. + mutation.mutate({ category: ..., questions: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createFaqDataVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.faqData_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateFaqData +You can execute the `updateFaqData` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateFaqData(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateFaqData(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateFaqData` Mutation requires an argument of type `UpdateFaqDataVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateFaqDataVariables { + id: UUIDString; + category?: string | null; + questions?: unknown[] | null; +} +``` +### Return Type +Recall that calling the `updateFaqData` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateFaqData` Mutation is of type `UpdateFaqDataData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateFaqDataData { + faqData_update?: FaqData_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateFaqData`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateFaqDataVariables } from '@dataconnect/generated'; +import { useUpdateFaqData } from '@dataconnect/generated/react' + +export default function UpdateFaqDataComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateFaqData(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateFaqData(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateFaqData(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateFaqData(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateFaqData` Mutation requires an argument of type `UpdateFaqDataVariables`: + const updateFaqDataVars: UpdateFaqDataVariables = { + id: ..., + category: ..., // optional + questions: ..., // optional + }; + mutation.mutate(updateFaqDataVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., category: ..., questions: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateFaqDataVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.faqData_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteFaqData +You can execute the `deleteFaqData` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteFaqData(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteFaqData(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteFaqData` Mutation requires an argument of type `DeleteFaqDataVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteFaqDataVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteFaqData` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteFaqData` Mutation is of type `DeleteFaqDataData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteFaqDataData { + faqData_delete?: FaqData_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteFaqData`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteFaqDataVariables } from '@dataconnect/generated'; +import { useDeleteFaqData } from '@dataconnect/generated/react' + +export default function DeleteFaqDataComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteFaqData(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteFaqData(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteFaqData(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteFaqData(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteFaqData` Mutation requires an argument of type `DeleteFaqDataVariables`: + const deleteFaqDataVars: DeleteFaqDataVariables = { + id: ..., + }; + mutation.mutate(deleteFaqDataVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteFaqDataVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.faqData_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createInvoice +You can execute the `createInvoice` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateInvoice(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateInvoice(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createInvoice` Mutation requires an argument of type `CreateInvoiceVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateInvoiceVariables { + status: InvoiceStatus; + vendorId: UUIDString; + businessId: UUIDString; + orderId: UUIDString; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber: string; + issueDate: TimestampString; + dueDate: TimestampString; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount: number; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; +} +``` +### Return Type +Recall that calling the `createInvoice` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createInvoice` Mutation is of type `CreateInvoiceData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateInvoiceData { + invoice_insert: Invoice_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createInvoice`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateInvoiceVariables } from '@dataconnect/generated'; +import { useCreateInvoice } from '@dataconnect/generated/react' + +export default function CreateInvoiceComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateInvoice(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateInvoice(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateInvoice(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateInvoice(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateInvoice` Mutation requires an argument of type `CreateInvoiceVariables`: + const createInvoiceVars: CreateInvoiceVariables = { + status: ..., + vendorId: ..., + businessId: ..., + orderId: ..., + paymentTerms: ..., // optional + invoiceNumber: ..., + issueDate: ..., + dueDate: ..., + hub: ..., // optional + managerName: ..., // optional + vendorNumber: ..., // optional + roles: ..., // optional + charges: ..., // optional + otherCharges: ..., // optional + subtotal: ..., // optional + amount: ..., + notes: ..., // optional + staffCount: ..., // optional + chargesCount: ..., // optional + }; + mutation.mutate(createInvoiceVars); + // Variables can be defined inline as well. + mutation.mutate({ status: ..., vendorId: ..., businessId: ..., orderId: ..., paymentTerms: ..., invoiceNumber: ..., issueDate: ..., dueDate: ..., hub: ..., managerName: ..., vendorNumber: ..., roles: ..., charges: ..., otherCharges: ..., subtotal: ..., amount: ..., notes: ..., staffCount: ..., chargesCount: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createInvoiceVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.invoice_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateInvoice +You can execute the `updateInvoice` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateInvoice(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateInvoice(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateInvoice` Mutation requires an argument of type `UpdateInvoiceVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateInvoiceVariables { + id: UUIDString; + status?: InvoiceStatus | null; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTerms | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; + disputedItems?: unknown | null; + disputeReason?: string | null; + disputeDetails?: string | null; +} +``` +### Return Type +Recall that calling the `updateInvoice` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateInvoice` Mutation is of type `UpdateInvoiceData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateInvoiceData { + invoice_update?: Invoice_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateInvoice`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateInvoiceVariables } from '@dataconnect/generated'; +import { useUpdateInvoice } from '@dataconnect/generated/react' + +export default function UpdateInvoiceComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateInvoice(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateInvoice(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateInvoice(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateInvoice(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateInvoice` Mutation requires an argument of type `UpdateInvoiceVariables`: + const updateInvoiceVars: UpdateInvoiceVariables = { + id: ..., + status: ..., // optional + vendorId: ..., // optional + businessId: ..., // optional + orderId: ..., // optional + paymentTerms: ..., // optional + invoiceNumber: ..., // optional + issueDate: ..., // optional + dueDate: ..., // optional + hub: ..., // optional + managerName: ..., // optional + vendorNumber: ..., // optional + roles: ..., // optional + charges: ..., // optional + otherCharges: ..., // optional + subtotal: ..., // optional + amount: ..., // optional + notes: ..., // optional + staffCount: ..., // optional + chargesCount: ..., // optional + disputedItems: ..., // optional + disputeReason: ..., // optional + disputeDetails: ..., // optional + }; + mutation.mutate(updateInvoiceVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., status: ..., vendorId: ..., businessId: ..., orderId: ..., paymentTerms: ..., invoiceNumber: ..., issueDate: ..., dueDate: ..., hub: ..., managerName: ..., vendorNumber: ..., roles: ..., charges: ..., otherCharges: ..., subtotal: ..., amount: ..., notes: ..., staffCount: ..., chargesCount: ..., disputedItems: ..., disputeReason: ..., disputeDetails: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateInvoiceVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.invoice_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteInvoice +You can execute the `deleteInvoice` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteInvoice(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteInvoice(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteInvoice` Mutation requires an argument of type `DeleteInvoiceVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteInvoiceVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteInvoice` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteInvoice` Mutation is of type `DeleteInvoiceData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteInvoiceData { + invoice_delete?: Invoice_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteInvoice`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteInvoiceVariables } from '@dataconnect/generated'; +import { useDeleteInvoice } from '@dataconnect/generated/react' + +export default function DeleteInvoiceComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteInvoice(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteInvoice(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteInvoice(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteInvoice(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteInvoice` Mutation requires an argument of type `DeleteInvoiceVariables`: + const deleteInvoiceVars: DeleteInvoiceVariables = { + id: ..., + }; + mutation.mutate(deleteInvoiceVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteInvoiceVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.invoice_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createTeamHub +You can execute the `createTeamHub` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateTeamHub(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateTeamHub(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createTeamHub` Mutation requires an argument of type `CreateTeamHubVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateTeamHubVariables { + teamId: UUIDString; + hubName: string; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive?: boolean | null; + departments?: unknown | null; +} +``` +### Return Type +Recall that calling the `createTeamHub` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createTeamHub` Mutation is of type `CreateTeamHubData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateTeamHubData { + teamHub_insert: TeamHub_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createTeamHub`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateTeamHubVariables } from '@dataconnect/generated'; +import { useCreateTeamHub } from '@dataconnect/generated/react' + +export default function CreateTeamHubComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateTeamHub(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateTeamHub(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTeamHub(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTeamHub(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateTeamHub` Mutation requires an argument of type `CreateTeamHubVariables`: + const createTeamHubVars: CreateTeamHubVariables = { + teamId: ..., + hubName: ..., + address: ..., + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + managerName: ..., // optional + isActive: ..., // optional + departments: ..., // optional + }; + mutation.mutate(createTeamHubVars); + // Variables can be defined inline as well. + mutation.mutate({ teamId: ..., hubName: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., state: ..., street: ..., country: ..., zipCode: ..., managerName: ..., isActive: ..., departments: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createTeamHubVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.teamHub_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateTeamHub +You can execute the `updateTeamHub` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateTeamHub(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateTeamHub(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateTeamHub` Mutation requires an argument of type `UpdateTeamHubVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateTeamHubVariables { + id: UUIDString; + teamId?: UUIDString | null; + hubName?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + managerName?: string | null; + isActive?: boolean | null; + departments?: unknown | null; +} +``` +### Return Type +Recall that calling the `updateTeamHub` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateTeamHub` Mutation is of type `UpdateTeamHubData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateTeamHubData { + teamHub_update?: TeamHub_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateTeamHub`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateTeamHubVariables } from '@dataconnect/generated'; +import { useUpdateTeamHub } from '@dataconnect/generated/react' + +export default function UpdateTeamHubComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateTeamHub(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateTeamHub(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTeamHub(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTeamHub(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateTeamHub` Mutation requires an argument of type `UpdateTeamHubVariables`: + const updateTeamHubVars: UpdateTeamHubVariables = { + id: ..., + teamId: ..., // optional + hubName: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + managerName: ..., // optional + isActive: ..., // optional + departments: ..., // optional + }; + mutation.mutate(updateTeamHubVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., teamId: ..., hubName: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., state: ..., street: ..., country: ..., zipCode: ..., managerName: ..., isActive: ..., departments: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateTeamHubVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.teamHub_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteTeamHub +You can execute the `deleteTeamHub` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteTeamHub(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteTeamHub(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteTeamHub` Mutation requires an argument of type `DeleteTeamHubVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteTeamHubVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteTeamHub` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteTeamHub` Mutation is of type `DeleteTeamHubData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteTeamHubData { + teamHub_delete?: TeamHub_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteTeamHub`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteTeamHubVariables } from '@dataconnect/generated'; +import { useDeleteTeamHub } from '@dataconnect/generated/react' + +export default function DeleteTeamHubComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteTeamHub(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteTeamHub(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTeamHub(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTeamHub(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteTeamHub` Mutation requires an argument of type `DeleteTeamHubVariables`: + const deleteTeamHubVars: DeleteTeamHubVariables = { + id: ..., + }; + mutation.mutate(deleteTeamHubVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteTeamHubVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.teamHub_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createHub +You can execute the `createHub` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateHub(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateHub(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createHub` Mutation requires an argument of type `CreateHubVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateHubVariables { + name: string; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId: UUIDString; +} +``` +### Return Type +Recall that calling the `createHub` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createHub` Mutation is of type `CreateHubData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateHubData { + hub_insert: Hub_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createHub`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateHubVariables } from '@dataconnect/generated'; +import { useCreateHub } from '@dataconnect/generated/react' + +export default function CreateHubComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateHub(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateHub(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateHub(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateHub(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateHub` Mutation requires an argument of type `CreateHubVariables`: + const createHubVars: CreateHubVariables = { + name: ..., + locationName: ..., // optional + address: ..., // optional + nfcTagId: ..., // optional + ownerId: ..., + }; + mutation.mutate(createHubVars); + // Variables can be defined inline as well. + mutation.mutate({ name: ..., locationName: ..., address: ..., nfcTagId: ..., ownerId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createHubVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.hub_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateHub +You can execute the `updateHub` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateHub(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateHub(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateHub` Mutation requires an argument of type `UpdateHubVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateHubVariables { + id: UUIDString; + name?: string | null; + locationName?: string | null; + address?: string | null; + nfcTagId?: string | null; + ownerId?: UUIDString | null; +} +``` +### Return Type +Recall that calling the `updateHub` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateHub` Mutation is of type `UpdateHubData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateHubData { + hub_update?: Hub_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateHub`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateHubVariables } from '@dataconnect/generated'; +import { useUpdateHub } from '@dataconnect/generated/react' + +export default function UpdateHubComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateHub(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateHub(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateHub(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateHub(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateHub` Mutation requires an argument of type `UpdateHubVariables`: + const updateHubVars: UpdateHubVariables = { + id: ..., + name: ..., // optional + locationName: ..., // optional + address: ..., // optional + nfcTagId: ..., // optional + ownerId: ..., // optional + }; + mutation.mutate(updateHubVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., name: ..., locationName: ..., address: ..., nfcTagId: ..., ownerId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateHubVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.hub_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteHub +You can execute the `deleteHub` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteHub(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteHub(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteHub` Mutation requires an argument of type `DeleteHubVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteHubVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteHub` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteHub` Mutation is of type `DeleteHubData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteHubData { + hub_delete?: Hub_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteHub`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteHubVariables } from '@dataconnect/generated'; +import { useDeleteHub } from '@dataconnect/generated/react' + +export default function DeleteHubComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteHub(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteHub(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteHub(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteHub(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteHub` Mutation requires an argument of type `DeleteHubVariables`: + const deleteHubVars: DeleteHubVariables = { + id: ..., + }; + mutation.mutate(deleteHubVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteHubVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.hub_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createRoleCategory +You can execute the `createRoleCategory` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateRoleCategory(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateRoleCategory(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createRoleCategory` Mutation requires an argument of type `CreateRoleCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateRoleCategoryVariables { + roleName: string; + category: RoleCategoryType; +} +``` +### Return Type +Recall that calling the `createRoleCategory` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createRoleCategory` Mutation is of type `CreateRoleCategoryData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateRoleCategoryData { + roleCategory_insert: RoleCategory_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createRoleCategory`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateRoleCategoryVariables } from '@dataconnect/generated'; +import { useCreateRoleCategory } from '@dataconnect/generated/react' + +export default function CreateRoleCategoryComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateRoleCategory(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateRoleCategory(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateRoleCategory(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateRoleCategory(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateRoleCategory` Mutation requires an argument of type `CreateRoleCategoryVariables`: + const createRoleCategoryVars: CreateRoleCategoryVariables = { + roleName: ..., + category: ..., + }; + mutation.mutate(createRoleCategoryVars); + // Variables can be defined inline as well. + mutation.mutate({ roleName: ..., category: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createRoleCategoryVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.roleCategory_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateRoleCategory +You can execute the `updateRoleCategory` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateRoleCategory(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateRoleCategory(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateRoleCategory` Mutation requires an argument of type `UpdateRoleCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateRoleCategoryVariables { + id: UUIDString; + roleName?: string | null; + category?: RoleCategoryType | null; +} +``` +### Return Type +Recall that calling the `updateRoleCategory` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateRoleCategory` Mutation is of type `UpdateRoleCategoryData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateRoleCategoryData { + roleCategory_update?: RoleCategory_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateRoleCategory`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateRoleCategoryVariables } from '@dataconnect/generated'; +import { useUpdateRoleCategory } from '@dataconnect/generated/react' + +export default function UpdateRoleCategoryComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateRoleCategory(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateRoleCategory(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateRoleCategory(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateRoleCategory(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateRoleCategory` Mutation requires an argument of type `UpdateRoleCategoryVariables`: + const updateRoleCategoryVars: UpdateRoleCategoryVariables = { + id: ..., + roleName: ..., // optional + category: ..., // optional + }; + mutation.mutate(updateRoleCategoryVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., roleName: ..., category: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateRoleCategoryVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.roleCategory_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteRoleCategory +You can execute the `deleteRoleCategory` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteRoleCategory(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteRoleCategory(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteRoleCategory` Mutation requires an argument of type `DeleteRoleCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteRoleCategoryVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteRoleCategory` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteRoleCategory` Mutation is of type `DeleteRoleCategoryData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteRoleCategoryData { + roleCategory_delete?: RoleCategory_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteRoleCategory`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteRoleCategoryVariables } from '@dataconnect/generated'; +import { useDeleteRoleCategory } from '@dataconnect/generated/react' + +export default function DeleteRoleCategoryComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteRoleCategory(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteRoleCategory(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteRoleCategory(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteRoleCategory(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteRoleCategory` Mutation requires an argument of type `DeleteRoleCategoryVariables`: + const deleteRoleCategoryVars: DeleteRoleCategoryVariables = { + id: ..., + }; + mutation.mutate(deleteRoleCategoryVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteRoleCategoryVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.roleCategory_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createStaffAvailabilityStats +You can execute the `createStaffAvailabilityStats` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateStaffAvailabilityStats(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateStaffAvailabilityStats(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createStaffAvailabilityStats` Mutation requires an argument of type `CreateStaffAvailabilityStatsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateStaffAvailabilityStatsVariables { + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; +} +``` +### Return Type +Recall that calling the `createStaffAvailabilityStats` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createStaffAvailabilityStats` Mutation is of type `CreateStaffAvailabilityStatsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateStaffAvailabilityStatsData { + staffAvailabilityStats_insert: StaffAvailabilityStats_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createStaffAvailabilityStats`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateStaffAvailabilityStatsVariables } from '@dataconnect/generated'; +import { useCreateStaffAvailabilityStats } from '@dataconnect/generated/react' + +export default function CreateStaffAvailabilityStatsComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateStaffAvailabilityStats(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateStaffAvailabilityStats(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateStaffAvailabilityStats(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateStaffAvailabilityStats(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateStaffAvailabilityStats` Mutation requires an argument of type `CreateStaffAvailabilityStatsVariables`: + const createStaffAvailabilityStatsVars: CreateStaffAvailabilityStatsVariables = { + staffId: ..., + needWorkIndex: ..., // optional + utilizationPercentage: ..., // optional + predictedAvailabilityScore: ..., // optional + scheduledHoursThisPeriod: ..., // optional + desiredHoursThisPeriod: ..., // optional + lastShiftDate: ..., // optional + acceptanceRate: ..., // optional + }; + mutation.mutate(createStaffAvailabilityStatsVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., needWorkIndex: ..., utilizationPercentage: ..., predictedAvailabilityScore: ..., scheduledHoursThisPeriod: ..., desiredHoursThisPeriod: ..., lastShiftDate: ..., acceptanceRate: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createStaffAvailabilityStatsVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffAvailabilityStats_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateStaffAvailabilityStats +You can execute the `updateStaffAvailabilityStats` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateStaffAvailabilityStats(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateStaffAvailabilityStats(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateStaffAvailabilityStats` Mutation requires an argument of type `UpdateStaffAvailabilityStatsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateStaffAvailabilityStatsVariables { + staffId: UUIDString; + needWorkIndex?: number | null; + utilizationPercentage?: number | null; + predictedAvailabilityScore?: number | null; + scheduledHoursThisPeriod?: number | null; + desiredHoursThisPeriod?: number | null; + lastShiftDate?: TimestampString | null; + acceptanceRate?: number | null; +} +``` +### Return Type +Recall that calling the `updateStaffAvailabilityStats` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateStaffAvailabilityStats` Mutation is of type `UpdateStaffAvailabilityStatsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateStaffAvailabilityStatsData { + staffAvailabilityStats_update?: StaffAvailabilityStats_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateStaffAvailabilityStats`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateStaffAvailabilityStatsVariables } from '@dataconnect/generated'; +import { useUpdateStaffAvailabilityStats } from '@dataconnect/generated/react' + +export default function UpdateStaffAvailabilityStatsComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateStaffAvailabilityStats(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateStaffAvailabilityStats(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateStaffAvailabilityStats(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateStaffAvailabilityStats(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateStaffAvailabilityStats` Mutation requires an argument of type `UpdateStaffAvailabilityStatsVariables`: + const updateStaffAvailabilityStatsVars: UpdateStaffAvailabilityStatsVariables = { + staffId: ..., + needWorkIndex: ..., // optional + utilizationPercentage: ..., // optional + predictedAvailabilityScore: ..., // optional + scheduledHoursThisPeriod: ..., // optional + desiredHoursThisPeriod: ..., // optional + lastShiftDate: ..., // optional + acceptanceRate: ..., // optional + }; + mutation.mutate(updateStaffAvailabilityStatsVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., needWorkIndex: ..., utilizationPercentage: ..., predictedAvailabilityScore: ..., scheduledHoursThisPeriod: ..., desiredHoursThisPeriod: ..., lastShiftDate: ..., acceptanceRate: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateStaffAvailabilityStatsVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffAvailabilityStats_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteStaffAvailabilityStats +You can execute the `deleteStaffAvailabilityStats` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteStaffAvailabilityStats(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteStaffAvailabilityStats(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteStaffAvailabilityStats` Mutation requires an argument of type `DeleteStaffAvailabilityStatsVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteStaffAvailabilityStatsVariables { + staffId: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteStaffAvailabilityStats` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteStaffAvailabilityStats` Mutation is of type `DeleteStaffAvailabilityStatsData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteStaffAvailabilityStatsData { + staffAvailabilityStats_delete?: StaffAvailabilityStats_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteStaffAvailabilityStats`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteStaffAvailabilityStatsVariables } from '@dataconnect/generated'; +import { useDeleteStaffAvailabilityStats } from '@dataconnect/generated/react' + +export default function DeleteStaffAvailabilityStatsComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteStaffAvailabilityStats(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteStaffAvailabilityStats(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteStaffAvailabilityStats(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteStaffAvailabilityStats(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteStaffAvailabilityStats` Mutation requires an argument of type `DeleteStaffAvailabilityStatsVariables`: + const deleteStaffAvailabilityStatsVars: DeleteStaffAvailabilityStatsVariables = { + staffId: ..., + }; + mutation.mutate(deleteStaffAvailabilityStatsVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteStaffAvailabilityStatsVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffAvailabilityStats_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createShiftRole +You can execute the `createShiftRole` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateShiftRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateShiftRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createShiftRole` Mutation requires an argument of type `CreateShiftRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateShiftRoleVariables { + shiftId: UUIDString; + roleId: UUIDString; + count: number; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; +} +``` +### Return Type +Recall that calling the `createShiftRole` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createShiftRole` Mutation is of type `CreateShiftRoleData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateShiftRoleData { + shiftRole_insert: ShiftRole_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createShiftRole`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateShiftRoleVariables } from '@dataconnect/generated'; +import { useCreateShiftRole } from '@dataconnect/generated/react' + +export default function CreateShiftRoleComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateShiftRole(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateShiftRole(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateShiftRole(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateShiftRole(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateShiftRole` Mutation requires an argument of type `CreateShiftRoleVariables`: + const createShiftRoleVars: CreateShiftRoleVariables = { + shiftId: ..., + roleId: ..., + count: ..., + assigned: ..., // optional + startTime: ..., // optional + endTime: ..., // optional + hours: ..., // optional + department: ..., // optional + uniform: ..., // optional + breakType: ..., // optional + totalValue: ..., // optional + }; + mutation.mutate(createShiftRoleVars); + // Variables can be defined inline as well. + mutation.mutate({ shiftId: ..., roleId: ..., count: ..., assigned: ..., startTime: ..., endTime: ..., hours: ..., department: ..., uniform: ..., breakType: ..., totalValue: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createShiftRoleVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.shiftRole_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateShiftRole +You can execute the `updateShiftRole` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateShiftRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateShiftRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateShiftRole` Mutation requires an argument of type `UpdateShiftRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateShiftRoleVariables { + shiftId: UUIDString; + roleId: UUIDString; + count?: number | null; + assigned?: number | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + department?: string | null; + uniform?: string | null; + breakType?: BreakDuration | null; + totalValue?: number | null; +} +``` +### Return Type +Recall that calling the `updateShiftRole` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateShiftRole` Mutation is of type `UpdateShiftRoleData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateShiftRoleData { + shiftRole_update?: ShiftRole_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateShiftRole`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateShiftRoleVariables } from '@dataconnect/generated'; +import { useUpdateShiftRole } from '@dataconnect/generated/react' + +export default function UpdateShiftRoleComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateShiftRole(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateShiftRole(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateShiftRole(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateShiftRole(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateShiftRole` Mutation requires an argument of type `UpdateShiftRoleVariables`: + const updateShiftRoleVars: UpdateShiftRoleVariables = { + shiftId: ..., + roleId: ..., + count: ..., // optional + assigned: ..., // optional + startTime: ..., // optional + endTime: ..., // optional + hours: ..., // optional + department: ..., // optional + uniform: ..., // optional + breakType: ..., // optional + totalValue: ..., // optional + }; + mutation.mutate(updateShiftRoleVars); + // Variables can be defined inline as well. + mutation.mutate({ shiftId: ..., roleId: ..., count: ..., assigned: ..., startTime: ..., endTime: ..., hours: ..., department: ..., uniform: ..., breakType: ..., totalValue: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateShiftRoleVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.shiftRole_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteShiftRole +You can execute the `deleteShiftRole` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteShiftRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteShiftRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteShiftRole` Mutation requires an argument of type `DeleteShiftRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteShiftRoleVariables { + shiftId: UUIDString; + roleId: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteShiftRole` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteShiftRole` Mutation is of type `DeleteShiftRoleData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteShiftRoleData { + shiftRole_delete?: ShiftRole_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteShiftRole`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteShiftRoleVariables } from '@dataconnect/generated'; +import { useDeleteShiftRole } from '@dataconnect/generated/react' + +export default function DeleteShiftRoleComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteShiftRole(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteShiftRole(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteShiftRole(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteShiftRole(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteShiftRole` Mutation requires an argument of type `DeleteShiftRoleVariables`: + const deleteShiftRoleVars: DeleteShiftRoleVariables = { + shiftId: ..., + roleId: ..., + }; + mutation.mutate(deleteShiftRoleVars); + // Variables can be defined inline as well. + mutation.mutate({ shiftId: ..., roleId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteShiftRoleVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.shiftRole_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createStaffRole +You can execute the `createStaffRole` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateStaffRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateStaffRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createStaffRole` Mutation requires an argument of type `CreateStaffRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateStaffRoleVariables { + staffId: UUIDString; + roleId: UUIDString; + roleType?: RoleType | null; +} +``` +### Return Type +Recall that calling the `createStaffRole` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createStaffRole` Mutation is of type `CreateStaffRoleData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateStaffRoleData { + staffRole_insert: StaffRole_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createStaffRole`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateStaffRoleVariables } from '@dataconnect/generated'; +import { useCreateStaffRole } from '@dataconnect/generated/react' + +export default function CreateStaffRoleComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateStaffRole(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateStaffRole(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateStaffRole(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateStaffRole(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateStaffRole` Mutation requires an argument of type `CreateStaffRoleVariables`: + const createStaffRoleVars: CreateStaffRoleVariables = { + staffId: ..., + roleId: ..., + roleType: ..., // optional + }; + mutation.mutate(createStaffRoleVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., roleId: ..., roleType: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createStaffRoleVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffRole_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteStaffRole +You can execute the `deleteStaffRole` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteStaffRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteStaffRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteStaffRole` Mutation requires an argument of type `DeleteStaffRoleVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteStaffRoleVariables { + staffId: UUIDString; + roleId: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteStaffRole` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteStaffRole` Mutation is of type `DeleteStaffRoleData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteStaffRoleData { + staffRole_delete?: StaffRole_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteStaffRole`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteStaffRoleVariables } from '@dataconnect/generated'; +import { useDeleteStaffRole } from '@dataconnect/generated/react' + +export default function DeleteStaffRoleComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteStaffRole(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteStaffRole(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteStaffRole(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteStaffRole(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteStaffRole` Mutation requires an argument of type `DeleteStaffRoleVariables`: + const deleteStaffRoleVars: DeleteStaffRoleVariables = { + staffId: ..., + roleId: ..., + }; + mutation.mutate(deleteStaffRoleVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., roleId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteStaffRoleVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffRole_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createAccount +You can execute the `createAccount` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateAccount(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateAccount(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createAccount` Mutation requires an argument of type `CreateAccountVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateAccountVariables { + bank: string; + type: AccountType; + last4: string; + isPrimary?: boolean | null; + ownerId: UUIDString; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `createAccount` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createAccount` Mutation is of type `CreateAccountData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateAccountData { + account_insert: Account_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createAccount`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateAccountVariables } from '@dataconnect/generated'; +import { useCreateAccount } from '@dataconnect/generated/react' + +export default function CreateAccountComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateAccount(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateAccount(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateAccount(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateAccount(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateAccount` Mutation requires an argument of type `CreateAccountVariables`: + const createAccountVars: CreateAccountVariables = { + bank: ..., + type: ..., + last4: ..., + isPrimary: ..., // optional + ownerId: ..., + accountNumber: ..., // optional + routeNumber: ..., // optional + expiryTime: ..., // optional + }; + mutation.mutate(createAccountVars); + // Variables can be defined inline as well. + mutation.mutate({ bank: ..., type: ..., last4: ..., isPrimary: ..., ownerId: ..., accountNumber: ..., routeNumber: ..., expiryTime: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createAccountVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.account_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateAccount +You can execute the `updateAccount` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateAccount(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateAccount(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateAccount` Mutation requires an argument of type `UpdateAccountVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateAccountVariables { + id: UUIDString; + bank?: string | null; + type?: AccountType | null; + last4?: string | null; + isPrimary?: boolean | null; + accountNumber?: string | null; + routeNumber?: string | null; + expiryTime?: TimestampString | null; +} +``` +### Return Type +Recall that calling the `updateAccount` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateAccount` Mutation is of type `UpdateAccountData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateAccountData { + account_update?: Account_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateAccount`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateAccountVariables } from '@dataconnect/generated'; +import { useUpdateAccount } from '@dataconnect/generated/react' + +export default function UpdateAccountComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateAccount(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateAccount(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateAccount(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateAccount(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateAccount` Mutation requires an argument of type `UpdateAccountVariables`: + const updateAccountVars: UpdateAccountVariables = { + id: ..., + bank: ..., // optional + type: ..., // optional + last4: ..., // optional + isPrimary: ..., // optional + accountNumber: ..., // optional + routeNumber: ..., // optional + expiryTime: ..., // optional + }; + mutation.mutate(updateAccountVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., bank: ..., type: ..., last4: ..., isPrimary: ..., accountNumber: ..., routeNumber: ..., expiryTime: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateAccountVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.account_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteAccount +You can execute the `deleteAccount` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteAccount(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteAccount(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteAccount` Mutation requires an argument of type `DeleteAccountVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteAccountVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteAccount` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteAccount` Mutation is of type `DeleteAccountData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteAccountData { + account_delete?: Account_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteAccount`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteAccountVariables } from '@dataconnect/generated'; +import { useDeleteAccount } from '@dataconnect/generated/react' + +export default function DeleteAccountComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteAccount(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteAccount(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteAccount(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteAccount(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteAccount` Mutation requires an argument of type `DeleteAccountVariables`: + const deleteAccountVars: DeleteAccountVariables = { + id: ..., + }; + mutation.mutate(deleteAccountVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteAccountVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.account_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createApplication +You can execute the `createApplication` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateApplication(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateApplication(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createApplication` Mutation requires an argument of type `CreateApplicationVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateApplicationVariables { + shiftId: UUIDString; + staffId: UUIDString; + status: ApplicationStatus; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + origin: ApplicationOrigin; + roleId: UUIDString; +} +``` +### Return Type +Recall that calling the `createApplication` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createApplication` Mutation is of type `CreateApplicationData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateApplicationData { + application_insert: Application_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createApplication`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateApplicationVariables } from '@dataconnect/generated'; +import { useCreateApplication } from '@dataconnect/generated/react' + +export default function CreateApplicationComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateApplication(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateApplication(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateApplication(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateApplication(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateApplication` Mutation requires an argument of type `CreateApplicationVariables`: + const createApplicationVars: CreateApplicationVariables = { + shiftId: ..., + staffId: ..., + status: ..., + checkInTime: ..., // optional + checkOutTime: ..., // optional + origin: ..., + roleId: ..., + }; + mutation.mutate(createApplicationVars); + // Variables can be defined inline as well. + mutation.mutate({ shiftId: ..., staffId: ..., status: ..., checkInTime: ..., checkOutTime: ..., origin: ..., roleId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createApplicationVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.application_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateApplicationStatus +You can execute the `updateApplicationStatus` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateApplicationStatus(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateApplicationStatus(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateApplicationStatus` Mutation requires an argument of type `UpdateApplicationStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateApplicationStatusVariables { + id: UUIDString; + shiftId?: UUIDString | null; + staffId?: UUIDString | null; + status?: ApplicationStatus | null; + checkInTime?: TimestampString | null; + checkOutTime?: TimestampString | null; + roleId?: UUIDString | null; +} +``` +### Return Type +Recall that calling the `updateApplicationStatus` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateApplicationStatus` Mutation is of type `UpdateApplicationStatusData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateApplicationStatusData { + application_update?: Application_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateApplicationStatus`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateApplicationStatusVariables } from '@dataconnect/generated'; +import { useUpdateApplicationStatus } from '@dataconnect/generated/react' + +export default function UpdateApplicationStatusComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateApplicationStatus(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateApplicationStatus(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateApplicationStatus(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateApplicationStatus(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateApplicationStatus` Mutation requires an argument of type `UpdateApplicationStatusVariables`: + const updateApplicationStatusVars: UpdateApplicationStatusVariables = { + id: ..., + shiftId: ..., // optional + staffId: ..., // optional + status: ..., // optional + checkInTime: ..., // optional + checkOutTime: ..., // optional + roleId: ..., // optional + }; + mutation.mutate(updateApplicationStatusVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., shiftId: ..., staffId: ..., status: ..., checkInTime: ..., checkOutTime: ..., roleId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateApplicationStatusVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.application_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteApplication +You can execute the `deleteApplication` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteApplication(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteApplication(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteApplication` Mutation requires an argument of type `DeleteApplicationVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteApplicationVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteApplication` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteApplication` Mutation is of type `DeleteApplicationData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteApplicationData { + application_delete?: Application_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteApplication`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteApplicationVariables } from '@dataconnect/generated'; +import { useDeleteApplication } from '@dataconnect/generated/react' + +export default function DeleteApplicationComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteApplication(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteApplication(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteApplication(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteApplication(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteApplication` Mutation requires an argument of type `DeleteApplicationVariables`: + const deleteApplicationVars: DeleteApplicationVariables = { + id: ..., + }; + mutation.mutate(deleteApplicationVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteApplicationVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.application_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## CreateAssignment +You can execute the `CreateAssignment` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateAssignment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateAssignment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `CreateAssignment` Mutation requires an argument of type `CreateAssignmentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateAssignmentVariables { + workforceId: UUIDString; + title?: string | null; + description?: string | null; + instructions?: string | null; + status?: AssignmentStatus | null; + tipsAvailable?: boolean | null; + travelTime?: boolean | null; + mealProvided?: boolean | null; + parkingAvailable?: boolean | null; + gasCompensation?: boolean | null; + managers?: unknown[] | null; + roleId: UUIDString; + shiftId: UUIDString; +} +``` +### Return Type +Recall that calling the `CreateAssignment` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `CreateAssignment` Mutation is of type `CreateAssignmentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateAssignmentData { + assignment_insert: Assignment_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `CreateAssignment`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateAssignmentVariables } from '@dataconnect/generated'; +import { useCreateAssignment } from '@dataconnect/generated/react' + +export default function CreateAssignmentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateAssignment(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateAssignment(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateAssignment(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateAssignment(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateAssignment` Mutation requires an argument of type `CreateAssignmentVariables`: + const createAssignmentVars: CreateAssignmentVariables = { + workforceId: ..., + title: ..., // optional + description: ..., // optional + instructions: ..., // optional + status: ..., // optional + tipsAvailable: ..., // optional + travelTime: ..., // optional + mealProvided: ..., // optional + parkingAvailable: ..., // optional + gasCompensation: ..., // optional + managers: ..., // optional + roleId: ..., + shiftId: ..., + }; + mutation.mutate(createAssignmentVars); + // Variables can be defined inline as well. + mutation.mutate({ workforceId: ..., title: ..., description: ..., instructions: ..., status: ..., tipsAvailable: ..., travelTime: ..., mealProvided: ..., parkingAvailable: ..., gasCompensation: ..., managers: ..., roleId: ..., shiftId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createAssignmentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.assignment_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## UpdateAssignment +You can execute the `UpdateAssignment` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateAssignment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateAssignment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `UpdateAssignment` Mutation requires an argument of type `UpdateAssignmentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateAssignmentVariables { + id: UUIDString; + title?: string | null; + description?: string | null; + instructions?: string | null; + status?: AssignmentStatus | null; + tipsAvailable?: boolean | null; + travelTime?: boolean | null; + mealProvided?: boolean | null; + parkingAvailable?: boolean | null; + gasCompensation?: boolean | null; + managers?: unknown[] | null; + roleId: UUIDString; + shiftId: UUIDString; +} +``` +### Return Type +Recall that calling the `UpdateAssignment` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `UpdateAssignment` Mutation is of type `UpdateAssignmentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateAssignmentData { + assignment_update?: Assignment_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `UpdateAssignment`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateAssignmentVariables } from '@dataconnect/generated'; +import { useUpdateAssignment } from '@dataconnect/generated/react' + +export default function UpdateAssignmentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateAssignment(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateAssignment(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateAssignment(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateAssignment(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateAssignment` Mutation requires an argument of type `UpdateAssignmentVariables`: + const updateAssignmentVars: UpdateAssignmentVariables = { + id: ..., + title: ..., // optional + description: ..., // optional + instructions: ..., // optional + status: ..., // optional + tipsAvailable: ..., // optional + travelTime: ..., // optional + mealProvided: ..., // optional + parkingAvailable: ..., // optional + gasCompensation: ..., // optional + managers: ..., // optional + roleId: ..., + shiftId: ..., + }; + mutation.mutate(updateAssignmentVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., title: ..., description: ..., instructions: ..., status: ..., tipsAvailable: ..., travelTime: ..., mealProvided: ..., parkingAvailable: ..., gasCompensation: ..., managers: ..., roleId: ..., shiftId: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateAssignmentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.assignment_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## DeleteAssignment +You can execute the `DeleteAssignment` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteAssignment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteAssignment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `DeleteAssignment` Mutation requires an argument of type `DeleteAssignmentVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteAssignmentVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `DeleteAssignment` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `DeleteAssignment` Mutation is of type `DeleteAssignmentData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteAssignmentData { + assignment_delete?: Assignment_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `DeleteAssignment`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteAssignmentVariables } from '@dataconnect/generated'; +import { useDeleteAssignment } from '@dataconnect/generated/react' + +export default function DeleteAssignmentComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteAssignment(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteAssignment(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteAssignment(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteAssignment(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteAssignment` Mutation requires an argument of type `DeleteAssignmentVariables`: + const deleteAssignmentVars: DeleteAssignmentVariables = { + id: ..., + }; + mutation.mutate(deleteAssignmentVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteAssignmentVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.assignment_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createInvoiceTemplate +You can execute the `createInvoiceTemplate` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateInvoiceTemplate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateInvoiceTemplate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createInvoiceTemplate` Mutation requires an argument of type `CreateInvoiceTemplateVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateInvoiceTemplateVariables { + name: string; + ownerId: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; +} +``` +### Return Type +Recall that calling the `createInvoiceTemplate` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createInvoiceTemplate` Mutation is of type `CreateInvoiceTemplateData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateInvoiceTemplateData { + invoiceTemplate_insert: InvoiceTemplate_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createInvoiceTemplate`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateInvoiceTemplateVariables } from '@dataconnect/generated'; +import { useCreateInvoiceTemplate } from '@dataconnect/generated/react' + +export default function CreateInvoiceTemplateComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateInvoiceTemplate(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateInvoiceTemplate(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateInvoiceTemplate(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateInvoiceTemplate(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateInvoiceTemplate` Mutation requires an argument of type `CreateInvoiceTemplateVariables`: + const createInvoiceTemplateVars: CreateInvoiceTemplateVariables = { + name: ..., + ownerId: ..., + vendorId: ..., // optional + businessId: ..., // optional + orderId: ..., // optional + paymentTerms: ..., // optional + invoiceNumber: ..., // optional + issueDate: ..., // optional + dueDate: ..., // optional + hub: ..., // optional + managerName: ..., // optional + vendorNumber: ..., // optional + roles: ..., // optional + charges: ..., // optional + otherCharges: ..., // optional + subtotal: ..., // optional + amount: ..., // optional + notes: ..., // optional + staffCount: ..., // optional + chargesCount: ..., // optional + }; + mutation.mutate(createInvoiceTemplateVars); + // Variables can be defined inline as well. + mutation.mutate({ name: ..., ownerId: ..., vendorId: ..., businessId: ..., orderId: ..., paymentTerms: ..., invoiceNumber: ..., issueDate: ..., dueDate: ..., hub: ..., managerName: ..., vendorNumber: ..., roles: ..., charges: ..., otherCharges: ..., subtotal: ..., amount: ..., notes: ..., staffCount: ..., chargesCount: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createInvoiceTemplateVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.invoiceTemplate_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateInvoiceTemplate +You can execute the `updateInvoiceTemplate` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateInvoiceTemplate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateInvoiceTemplate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateInvoiceTemplate` Mutation requires an argument of type `UpdateInvoiceTemplateVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateInvoiceTemplateVariables { + id: UUIDString; + name?: string | null; + ownerId?: UUIDString | null; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + orderId?: UUIDString | null; + paymentTerms?: InovicePaymentTermsTemp | null; + invoiceNumber?: string | null; + issueDate?: TimestampString | null; + dueDate?: TimestampString | null; + hub?: string | null; + managerName?: string | null; + vendorNumber?: string | null; + roles?: unknown | null; + charges?: unknown | null; + otherCharges?: number | null; + subtotal?: number | null; + amount?: number | null; + notes?: string | null; + staffCount?: number | null; + chargesCount?: number | null; +} +``` +### Return Type +Recall that calling the `updateInvoiceTemplate` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateInvoiceTemplate` Mutation is of type `UpdateInvoiceTemplateData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateInvoiceTemplateData { + invoiceTemplate_update?: InvoiceTemplate_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateInvoiceTemplate`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateInvoiceTemplateVariables } from '@dataconnect/generated'; +import { useUpdateInvoiceTemplate } from '@dataconnect/generated/react' + +export default function UpdateInvoiceTemplateComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateInvoiceTemplate(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateInvoiceTemplate(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateInvoiceTemplate(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateInvoiceTemplate(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateInvoiceTemplate` Mutation requires an argument of type `UpdateInvoiceTemplateVariables`: + const updateInvoiceTemplateVars: UpdateInvoiceTemplateVariables = { + id: ..., + name: ..., // optional + ownerId: ..., // optional + vendorId: ..., // optional + businessId: ..., // optional + orderId: ..., // optional + paymentTerms: ..., // optional + invoiceNumber: ..., // optional + issueDate: ..., // optional + dueDate: ..., // optional + hub: ..., // optional + managerName: ..., // optional + vendorNumber: ..., // optional + roles: ..., // optional + charges: ..., // optional + otherCharges: ..., // optional + subtotal: ..., // optional + amount: ..., // optional + notes: ..., // optional + staffCount: ..., // optional + chargesCount: ..., // optional + }; + mutation.mutate(updateInvoiceTemplateVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., name: ..., ownerId: ..., vendorId: ..., businessId: ..., orderId: ..., paymentTerms: ..., invoiceNumber: ..., issueDate: ..., dueDate: ..., hub: ..., managerName: ..., vendorNumber: ..., roles: ..., charges: ..., otherCharges: ..., subtotal: ..., amount: ..., notes: ..., staffCount: ..., chargesCount: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateInvoiceTemplateVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.invoiceTemplate_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteInvoiceTemplate +You can execute the `deleteInvoiceTemplate` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteInvoiceTemplate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteInvoiceTemplate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteInvoiceTemplate` Mutation requires an argument of type `DeleteInvoiceTemplateVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteInvoiceTemplateVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteInvoiceTemplate` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteInvoiceTemplate` Mutation is of type `DeleteInvoiceTemplateData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteInvoiceTemplateData { + invoiceTemplate_delete?: InvoiceTemplate_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteInvoiceTemplate`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteInvoiceTemplateVariables } from '@dataconnect/generated'; +import { useDeleteInvoiceTemplate } from '@dataconnect/generated/react' + +export default function DeleteInvoiceTemplateComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteInvoiceTemplate(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteInvoiceTemplate(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteInvoiceTemplate(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteInvoiceTemplate(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteInvoiceTemplate` Mutation requires an argument of type `DeleteInvoiceTemplateVariables`: + const deleteInvoiceTemplateVars: DeleteInvoiceTemplateVariables = { + id: ..., + }; + mutation.mutate(deleteInvoiceTemplateVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteInvoiceTemplateVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.invoiceTemplate_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createStaffAvailability +You can execute the `createStaffAvailability` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateStaffAvailability(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateStaffAvailability(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createStaffAvailability` Mutation requires an argument of type `CreateStaffAvailabilityVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateStaffAvailabilityVariables { + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status?: AvailabilityStatus | null; + notes?: string | null; +} +``` +### Return Type +Recall that calling the `createStaffAvailability` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createStaffAvailability` Mutation is of type `CreateStaffAvailabilityData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateStaffAvailabilityData { + staffAvailability_insert: StaffAvailability_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createStaffAvailability`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateStaffAvailabilityVariables } from '@dataconnect/generated'; +import { useCreateStaffAvailability } from '@dataconnect/generated/react' + +export default function CreateStaffAvailabilityComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateStaffAvailability(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateStaffAvailability(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateStaffAvailability(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateStaffAvailability(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateStaffAvailability` Mutation requires an argument of type `CreateStaffAvailabilityVariables`: + const createStaffAvailabilityVars: CreateStaffAvailabilityVariables = { + staffId: ..., + day: ..., + slot: ..., + status: ..., // optional + notes: ..., // optional + }; + mutation.mutate(createStaffAvailabilityVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., day: ..., slot: ..., status: ..., notes: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createStaffAvailabilityVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffAvailability_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateStaffAvailability +You can execute the `updateStaffAvailability` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateStaffAvailability(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateStaffAvailability(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateStaffAvailability` Mutation requires an argument of type `UpdateStaffAvailabilityVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateStaffAvailabilityVariables { + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; + status?: AvailabilityStatus | null; + notes?: string | null; +} +``` +### Return Type +Recall that calling the `updateStaffAvailability` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateStaffAvailability` Mutation is of type `UpdateStaffAvailabilityData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateStaffAvailabilityData { + staffAvailability_update?: StaffAvailability_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateStaffAvailability`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateStaffAvailabilityVariables } from '@dataconnect/generated'; +import { useUpdateStaffAvailability } from '@dataconnect/generated/react' + +export default function UpdateStaffAvailabilityComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateStaffAvailability(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateStaffAvailability(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateStaffAvailability(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateStaffAvailability(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateStaffAvailability` Mutation requires an argument of type `UpdateStaffAvailabilityVariables`: + const updateStaffAvailabilityVars: UpdateStaffAvailabilityVariables = { + staffId: ..., + day: ..., + slot: ..., + status: ..., // optional + notes: ..., // optional + }; + mutation.mutate(updateStaffAvailabilityVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., day: ..., slot: ..., status: ..., notes: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateStaffAvailabilityVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffAvailability_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteStaffAvailability +You can execute the `deleteStaffAvailability` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteStaffAvailability(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteStaffAvailability(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteStaffAvailability` Mutation requires an argument of type `DeleteStaffAvailabilityVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteStaffAvailabilityVariables { + staffId: UUIDString; + day: DayOfWeek; + slot: AvailabilitySlot; +} +``` +### Return Type +Recall that calling the `deleteStaffAvailability` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteStaffAvailability` Mutation is of type `DeleteStaffAvailabilityData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteStaffAvailabilityData { + staffAvailability_delete?: StaffAvailability_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteStaffAvailability`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteStaffAvailabilityVariables } from '@dataconnect/generated'; +import { useDeleteStaffAvailability } from '@dataconnect/generated/react' + +export default function DeleteStaffAvailabilityComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteStaffAvailability(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteStaffAvailability(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteStaffAvailability(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteStaffAvailability(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteStaffAvailability` Mutation requires an argument of type `DeleteStaffAvailabilityVariables`: + const deleteStaffAvailabilityVars: DeleteStaffAvailabilityVariables = { + staffId: ..., + day: ..., + slot: ..., + }; + mutation.mutate(deleteStaffAvailabilityVars); + // Variables can be defined inline as well. + mutation.mutate({ staffId: ..., day: ..., slot: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteStaffAvailabilityVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staffAvailability_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createTeamMember +You can execute the `createTeamMember` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateTeamMember(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateTeamMember(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createTeamMember` Mutation requires an argument of type `CreateTeamMemberVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateTeamMemberVariables { + teamId: UUIDString; + role: TeamMemberRole; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + userId: string; + inviteStatus?: TeamMemberInviteStatus | null; +} +``` +### Return Type +Recall that calling the `createTeamMember` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createTeamMember` Mutation is of type `CreateTeamMemberData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateTeamMemberData { + teamMember_insert: TeamMember_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createTeamMember`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateTeamMemberVariables } from '@dataconnect/generated'; +import { useCreateTeamMember } from '@dataconnect/generated/react' + +export default function CreateTeamMemberComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateTeamMember(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateTeamMember(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTeamMember(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTeamMember(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateTeamMember` Mutation requires an argument of type `CreateTeamMemberVariables`: + const createTeamMemberVars: CreateTeamMemberVariables = { + teamId: ..., + role: ..., + title: ..., // optional + department: ..., // optional + teamHubId: ..., // optional + isActive: ..., // optional + userId: ..., + inviteStatus: ..., // optional + }; + mutation.mutate(createTeamMemberVars); + // Variables can be defined inline as well. + mutation.mutate({ teamId: ..., role: ..., title: ..., department: ..., teamHubId: ..., isActive: ..., userId: ..., inviteStatus: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createTeamMemberVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.teamMember_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateTeamMember +You can execute the `updateTeamMember` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateTeamMember(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateTeamMember(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateTeamMember` Mutation requires an argument of type `UpdateTeamMemberVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateTeamMemberVariables { + id: UUIDString; + role?: TeamMemberRole | null; + title?: string | null; + department?: string | null; + teamHubId?: UUIDString | null; + isActive?: boolean | null; + inviteStatus?: TeamMemberInviteStatus | null; +} +``` +### Return Type +Recall that calling the `updateTeamMember` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateTeamMember` Mutation is of type `UpdateTeamMemberData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateTeamMemberData { + teamMember_update?: TeamMember_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateTeamMember`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateTeamMemberVariables } from '@dataconnect/generated'; +import { useUpdateTeamMember } from '@dataconnect/generated/react' + +export default function UpdateTeamMemberComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateTeamMember(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateTeamMember(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTeamMember(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTeamMember(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateTeamMember` Mutation requires an argument of type `UpdateTeamMemberVariables`: + const updateTeamMemberVars: UpdateTeamMemberVariables = { + id: ..., + role: ..., // optional + title: ..., // optional + department: ..., // optional + teamHubId: ..., // optional + isActive: ..., // optional + inviteStatus: ..., // optional + }; + mutation.mutate(updateTeamMemberVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., role: ..., title: ..., department: ..., teamHubId: ..., isActive: ..., inviteStatus: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateTeamMemberVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.teamMember_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateTeamMemberInviteStatus +You can execute the `updateTeamMemberInviteStatus` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateTeamMemberInviteStatus(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateTeamMemberInviteStatus(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateTeamMemberInviteStatus` Mutation requires an argument of type `UpdateTeamMemberInviteStatusVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateTeamMemberInviteStatusVariables { + id: UUIDString; + inviteStatus: TeamMemberInviteStatus; +} +``` +### Return Type +Recall that calling the `updateTeamMemberInviteStatus` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateTeamMemberInviteStatus` Mutation is of type `UpdateTeamMemberInviteStatusData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateTeamMemberInviteStatusData { + teamMember_update?: TeamMember_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateTeamMemberInviteStatus`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateTeamMemberInviteStatusVariables } from '@dataconnect/generated'; +import { useUpdateTeamMemberInviteStatus } from '@dataconnect/generated/react' + +export default function UpdateTeamMemberInviteStatusComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateTeamMemberInviteStatus(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateTeamMemberInviteStatus(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTeamMemberInviteStatus(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTeamMemberInviteStatus(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateTeamMemberInviteStatus` Mutation requires an argument of type `UpdateTeamMemberInviteStatusVariables`: + const updateTeamMemberInviteStatusVars: UpdateTeamMemberInviteStatusVariables = { + id: ..., + inviteStatus: ..., + }; + mutation.mutate(updateTeamMemberInviteStatusVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., inviteStatus: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateTeamMemberInviteStatusVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.teamMember_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## acceptInviteByCode +You can execute the `acceptInviteByCode` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useAcceptInviteByCode(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useAcceptInviteByCode(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `acceptInviteByCode` Mutation requires an argument of type `AcceptInviteByCodeVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface AcceptInviteByCodeVariables { + inviteCode: UUIDString; +} +``` +### Return Type +Recall that calling the `acceptInviteByCode` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `acceptInviteByCode` Mutation is of type `AcceptInviteByCodeData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface AcceptInviteByCodeData { + teamMember_updateMany: number; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `acceptInviteByCode`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, AcceptInviteByCodeVariables } from '@dataconnect/generated'; +import { useAcceptInviteByCode } from '@dataconnect/generated/react' + +export default function AcceptInviteByCodeComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useAcceptInviteByCode(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useAcceptInviteByCode(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useAcceptInviteByCode(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useAcceptInviteByCode(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useAcceptInviteByCode` Mutation requires an argument of type `AcceptInviteByCodeVariables`: + const acceptInviteByCodeVars: AcceptInviteByCodeVariables = { + inviteCode: ..., + }; + mutation.mutate(acceptInviteByCodeVars); + // Variables can be defined inline as well. + mutation.mutate({ inviteCode: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(acceptInviteByCodeVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.teamMember_updateMany); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## cancelInviteByCode +You can execute the `cancelInviteByCode` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCancelInviteByCode(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCancelInviteByCode(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `cancelInviteByCode` Mutation requires an argument of type `CancelInviteByCodeVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CancelInviteByCodeVariables { + inviteCode: UUIDString; +} +``` +### Return Type +Recall that calling the `cancelInviteByCode` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `cancelInviteByCode` Mutation is of type `CancelInviteByCodeData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CancelInviteByCodeData { + teamMember_updateMany: number; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `cancelInviteByCode`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CancelInviteByCodeVariables } from '@dataconnect/generated'; +import { useCancelInviteByCode } from '@dataconnect/generated/react' + +export default function CancelInviteByCodeComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCancelInviteByCode(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCancelInviteByCode(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCancelInviteByCode(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCancelInviteByCode(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCancelInviteByCode` Mutation requires an argument of type `CancelInviteByCodeVariables`: + const cancelInviteByCodeVars: CancelInviteByCodeVariables = { + inviteCode: ..., + }; + mutation.mutate(cancelInviteByCodeVars); + // Variables can be defined inline as well. + mutation.mutate({ inviteCode: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(cancelInviteByCodeVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.teamMember_updateMany); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteTeamMember +You can execute the `deleteTeamMember` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteTeamMember(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteTeamMember(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteTeamMember` Mutation requires an argument of type `DeleteTeamMemberVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteTeamMemberVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteTeamMember` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteTeamMember` Mutation is of type `DeleteTeamMemberData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteTeamMemberData { + teamMember_delete?: TeamMember_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteTeamMember`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteTeamMemberVariables } from '@dataconnect/generated'; +import { useDeleteTeamMember } from '@dataconnect/generated/react' + +export default function DeleteTeamMemberComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteTeamMember(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteTeamMember(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTeamMember(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTeamMember(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteTeamMember` Mutation requires an argument of type `DeleteTeamMemberVariables`: + const deleteTeamMemberVars: DeleteTeamMemberVariables = { + id: ..., + }; + mutation.mutate(deleteTeamMemberVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteTeamMemberVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.teamMember_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createLevel +You can execute the `createLevel` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateLevel(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateLevel(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createLevel` Mutation requires an argument of type `CreateLevelVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateLevelVariables { + name: string; + xpRequired: number; + icon?: string | null; + colors?: unknown | null; +} +``` +### Return Type +Recall that calling the `createLevel` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createLevel` Mutation is of type `CreateLevelData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateLevelData { + level_insert: Level_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createLevel`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateLevelVariables } from '@dataconnect/generated'; +import { useCreateLevel } from '@dataconnect/generated/react' + +export default function CreateLevelComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateLevel(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateLevel(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateLevel(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateLevel(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateLevel` Mutation requires an argument of type `CreateLevelVariables`: + const createLevelVars: CreateLevelVariables = { + name: ..., + xpRequired: ..., + icon: ..., // optional + colors: ..., // optional + }; + mutation.mutate(createLevelVars); + // Variables can be defined inline as well. + mutation.mutate({ name: ..., xpRequired: ..., icon: ..., colors: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createLevelVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.level_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateLevel +You can execute the `updateLevel` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateLevel(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateLevel(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateLevel` Mutation requires an argument of type `UpdateLevelVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateLevelVariables { + id: UUIDString; + name?: string | null; + xpRequired?: number | null; + icon?: string | null; + colors?: unknown | null; +} +``` +### Return Type +Recall that calling the `updateLevel` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateLevel` Mutation is of type `UpdateLevelData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateLevelData { + level_update?: Level_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateLevel`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateLevelVariables } from '@dataconnect/generated'; +import { useUpdateLevel } from '@dataconnect/generated/react' + +export default function UpdateLevelComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateLevel(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateLevel(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateLevel(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateLevel(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateLevel` Mutation requires an argument of type `UpdateLevelVariables`: + const updateLevelVars: UpdateLevelVariables = { + id: ..., + name: ..., // optional + xpRequired: ..., // optional + icon: ..., // optional + colors: ..., // optional + }; + mutation.mutate(updateLevelVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., name: ..., xpRequired: ..., icon: ..., colors: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateLevelVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.level_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteLevel +You can execute the `deleteLevel` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteLevel(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteLevel(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteLevel` Mutation requires an argument of type `DeleteLevelVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteLevelVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteLevel` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteLevel` Mutation is of type `DeleteLevelData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteLevelData { + level_delete?: Level_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteLevel`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteLevelVariables } from '@dataconnect/generated'; +import { useDeleteLevel } from '@dataconnect/generated/react' + +export default function DeleteLevelComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteLevel(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteLevel(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteLevel(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteLevel(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteLevel` Mutation requires an argument of type `DeleteLevelVariables`: + const deleteLevelVars: DeleteLevelVariables = { + id: ..., + }; + mutation.mutate(deleteLevelVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteLevelVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.level_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createOrder +You can execute the `createOrder` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateOrder(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateOrder(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createOrder` Mutation requires an argument of type `CreateOrderVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateOrderVariables { + vendorId?: UUIDString | null; + businessId: UUIDString; + orderType: OrderType; + status?: OrderStatus | null; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + duration?: OrderDuration | null; + lunchBreak?: number | null; + total?: number | null; + eventName?: string | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + teamHubId: UUIDString; + recurringDays?: unknown | null; + permanentStartDate?: TimestampString | null; + permanentDays?: unknown | null; + notes?: string | null; + detectedConflicts?: unknown | null; + poReference?: string | null; +} +``` +### Return Type +Recall that calling the `createOrder` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createOrder` Mutation is of type `CreateOrderData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateOrderData { + order_insert: Order_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createOrder`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateOrderVariables } from '@dataconnect/generated'; +import { useCreateOrder } from '@dataconnect/generated/react' + +export default function CreateOrderComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateOrder(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateOrder(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateOrder(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateOrder(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateOrder` Mutation requires an argument of type `CreateOrderVariables`: + const createOrderVars: CreateOrderVariables = { + vendorId: ..., // optional + businessId: ..., + orderType: ..., + status: ..., // optional + date: ..., // optional + startDate: ..., // optional + endDate: ..., // optional + duration: ..., // optional + lunchBreak: ..., // optional + total: ..., // optional + eventName: ..., // optional + assignedStaff: ..., // optional + shifts: ..., // optional + requested: ..., // optional + teamHubId: ..., + recurringDays: ..., // optional + permanentStartDate: ..., // optional + permanentDays: ..., // optional + notes: ..., // optional + detectedConflicts: ..., // optional + poReference: ..., // optional + }; + mutation.mutate(createOrderVars); + // Variables can be defined inline as well. + mutation.mutate({ vendorId: ..., businessId: ..., orderType: ..., status: ..., date: ..., startDate: ..., endDate: ..., duration: ..., lunchBreak: ..., total: ..., eventName: ..., assignedStaff: ..., shifts: ..., requested: ..., teamHubId: ..., recurringDays: ..., permanentStartDate: ..., permanentDays: ..., notes: ..., detectedConflicts: ..., poReference: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createOrderVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.order_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateOrder +You can execute the `updateOrder` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateOrder(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateOrder(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateOrder` Mutation requires an argument of type `UpdateOrderVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateOrderVariables { + id: UUIDString; + vendorId?: UUIDString | null; + businessId?: UUIDString | null; + status?: OrderStatus | null; + date?: TimestampString | null; + startDate?: TimestampString | null; + endDate?: TimestampString | null; + total?: number | null; + eventName?: string | null; + assignedStaff?: unknown | null; + shifts?: unknown | null; + requested?: number | null; + teamHubId: UUIDString; + recurringDays?: unknown | null; + permanentDays?: unknown | null; + notes?: string | null; + detectedConflicts?: unknown | null; + poReference?: string | null; +} +``` +### Return Type +Recall that calling the `updateOrder` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateOrder` Mutation is of type `UpdateOrderData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateOrderData { + order_update?: Order_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateOrder`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateOrderVariables } from '@dataconnect/generated'; +import { useUpdateOrder } from '@dataconnect/generated/react' + +export default function UpdateOrderComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateOrder(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateOrder(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateOrder(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateOrder(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateOrder` Mutation requires an argument of type `UpdateOrderVariables`: + const updateOrderVars: UpdateOrderVariables = { + id: ..., + vendorId: ..., // optional + businessId: ..., // optional + status: ..., // optional + date: ..., // optional + startDate: ..., // optional + endDate: ..., // optional + total: ..., // optional + eventName: ..., // optional + assignedStaff: ..., // optional + shifts: ..., // optional + requested: ..., // optional + teamHubId: ..., + recurringDays: ..., // optional + permanentDays: ..., // optional + notes: ..., // optional + detectedConflicts: ..., // optional + poReference: ..., // optional + }; + mutation.mutate(updateOrderVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., vendorId: ..., businessId: ..., status: ..., date: ..., startDate: ..., endDate: ..., total: ..., eventName: ..., assignedStaff: ..., shifts: ..., requested: ..., teamHubId: ..., recurringDays: ..., permanentDays: ..., notes: ..., detectedConflicts: ..., poReference: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateOrderVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.order_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteOrder +You can execute the `deleteOrder` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteOrder(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteOrder(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteOrder` Mutation requires an argument of type `DeleteOrderVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteOrderVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteOrder` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteOrder` Mutation is of type `DeleteOrderData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteOrderData { + order_delete?: Order_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteOrder`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteOrderVariables } from '@dataconnect/generated'; +import { useDeleteOrder } from '@dataconnect/generated/react' + +export default function DeleteOrderComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteOrder(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteOrder(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteOrder(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteOrder(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteOrder` Mutation requires an argument of type `DeleteOrderVariables`: + const deleteOrderVars: DeleteOrderVariables = { + id: ..., + }; + mutation.mutate(deleteOrderVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteOrderVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.order_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createCategory +You can execute the `createCategory` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateCategory(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateCategory(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createCategory` Mutation requires an argument of type `CreateCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateCategoryVariables { + categoryId: string; + label: string; + icon?: string | null; +} +``` +### Return Type +Recall that calling the `createCategory` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createCategory` Mutation is of type `CreateCategoryData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateCategoryData { + category_insert: Category_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createCategory`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateCategoryVariables } from '@dataconnect/generated'; +import { useCreateCategory } from '@dataconnect/generated/react' + +export default function CreateCategoryComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateCategory(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateCategory(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateCategory(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateCategory(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateCategory` Mutation requires an argument of type `CreateCategoryVariables`: + const createCategoryVars: CreateCategoryVariables = { + categoryId: ..., + label: ..., + icon: ..., // optional + }; + mutation.mutate(createCategoryVars); + // Variables can be defined inline as well. + mutation.mutate({ categoryId: ..., label: ..., icon: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createCategoryVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.category_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateCategory +You can execute the `updateCategory` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateCategory(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateCategory(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateCategory` Mutation requires an argument of type `UpdateCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateCategoryVariables { + id: UUIDString; + categoryId?: string | null; + label?: string | null; + icon?: string | null; +} +``` +### Return Type +Recall that calling the `updateCategory` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateCategory` Mutation is of type `UpdateCategoryData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateCategoryData { + category_update?: Category_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateCategory`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateCategoryVariables } from '@dataconnect/generated'; +import { useUpdateCategory } from '@dataconnect/generated/react' + +export default function UpdateCategoryComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateCategory(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateCategory(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateCategory(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateCategory(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateCategory` Mutation requires an argument of type `UpdateCategoryVariables`: + const updateCategoryVars: UpdateCategoryVariables = { + id: ..., + categoryId: ..., // optional + label: ..., // optional + icon: ..., // optional + }; + mutation.mutate(updateCategoryVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., categoryId: ..., label: ..., icon: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateCategoryVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.category_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteCategory +You can execute the `deleteCategory` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteCategory(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteCategory(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteCategory` Mutation requires an argument of type `DeleteCategoryVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteCategoryVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteCategory` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteCategory` Mutation is of type `DeleteCategoryData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteCategoryData { + category_delete?: Category_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteCategory`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteCategoryVariables } from '@dataconnect/generated'; +import { useDeleteCategory } from '@dataconnect/generated/react' + +export default function DeleteCategoryComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteCategory(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteCategory(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteCategory(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteCategory(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteCategory` Mutation requires an argument of type `DeleteCategoryVariables`: + const deleteCategoryVars: DeleteCategoryVariables = { + id: ..., + }; + mutation.mutate(deleteCategoryVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteCategoryVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.category_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createTaxForm +You can execute the `createTaxForm` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateTaxForm(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateTaxForm(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createTaxForm` Mutation requires an argument of type `CreateTaxFormVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateTaxFormVariables { + formType: TaxFormType; + firstName: string; + lastName: string; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN: number; + email?: string | null; + phone?: string | null; + address: string; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + apt?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status: TaxFormStatus; + staffId: UUIDString; + createdBy?: string | null; +} +``` +### Return Type +Recall that calling the `createTaxForm` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createTaxForm` Mutation is of type `CreateTaxFormData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateTaxFormData { + taxForm_insert: TaxForm_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createTaxForm`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateTaxFormVariables } from '@dataconnect/generated'; +import { useCreateTaxForm } from '@dataconnect/generated/react' + +export default function CreateTaxFormComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateTaxForm(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateTaxForm(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTaxForm(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateTaxForm(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateTaxForm` Mutation requires an argument of type `CreateTaxFormVariables`: + const createTaxFormVars: CreateTaxFormVariables = { + formType: ..., + firstName: ..., + lastName: ..., + mInitial: ..., // optional + oLastName: ..., // optional + dob: ..., // optional + socialSN: ..., + email: ..., // optional + phone: ..., // optional + address: ..., + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + apt: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + marital: ..., // optional + multipleJob: ..., // optional + childrens: ..., // optional + otherDeps: ..., // optional + totalCredits: ..., // optional + otherInconme: ..., // optional + deductions: ..., // optional + extraWithholding: ..., // optional + citizen: ..., // optional + uscis: ..., // optional + passportNumber: ..., // optional + countryIssue: ..., // optional + prepartorOrTranslator: ..., // optional + signature: ..., // optional + date: ..., // optional + status: ..., + staffId: ..., + createdBy: ..., // optional + }; + mutation.mutate(createTaxFormVars); + // Variables can be defined inline as well. + mutation.mutate({ formType: ..., firstName: ..., lastName: ..., mInitial: ..., oLastName: ..., dob: ..., socialSN: ..., email: ..., phone: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., apt: ..., state: ..., street: ..., country: ..., zipCode: ..., marital: ..., multipleJob: ..., childrens: ..., otherDeps: ..., totalCredits: ..., otherInconme: ..., deductions: ..., extraWithholding: ..., citizen: ..., uscis: ..., passportNumber: ..., countryIssue: ..., prepartorOrTranslator: ..., signature: ..., date: ..., status: ..., staffId: ..., createdBy: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createTaxFormVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.taxForm_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateTaxForm +You can execute the `updateTaxForm` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateTaxForm(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateTaxForm(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateTaxForm` Mutation requires an argument of type `UpdateTaxFormVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateTaxFormVariables { + id: UUIDString; + formType?: TaxFormType | null; + firstName?: string | null; + lastName?: string | null; + mInitial?: string | null; + oLastName?: string | null; + dob?: TimestampString | null; + socialSN?: number | null; + email?: string | null; + phone?: string | null; + address?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + city?: string | null; + apt?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; + marital?: MaritalStatus | null; + multipleJob?: boolean | null; + childrens?: number | null; + otherDeps?: number | null; + totalCredits?: number | null; + otherInconme?: number | null; + deductions?: number | null; + extraWithholding?: number | null; + citizen?: CitizenshipStatus | null; + uscis?: string | null; + passportNumber?: string | null; + countryIssue?: string | null; + prepartorOrTranslator?: boolean | null; + signature?: string | null; + date?: TimestampString | null; + status?: TaxFormStatus | null; +} +``` +### Return Type +Recall that calling the `updateTaxForm` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateTaxForm` Mutation is of type `UpdateTaxFormData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateTaxFormData { + taxForm_update?: TaxForm_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateTaxForm`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateTaxFormVariables } from '@dataconnect/generated'; +import { useUpdateTaxForm } from '@dataconnect/generated/react' + +export default function UpdateTaxFormComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateTaxForm(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateTaxForm(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTaxForm(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateTaxForm(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateTaxForm` Mutation requires an argument of type `UpdateTaxFormVariables`: + const updateTaxFormVars: UpdateTaxFormVariables = { + id: ..., + formType: ..., // optional + firstName: ..., // optional + lastName: ..., // optional + mInitial: ..., // optional + oLastName: ..., // optional + dob: ..., // optional + socialSN: ..., // optional + email: ..., // optional + phone: ..., // optional + address: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + city: ..., // optional + apt: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + marital: ..., // optional + multipleJob: ..., // optional + childrens: ..., // optional + otherDeps: ..., // optional + totalCredits: ..., // optional + otherInconme: ..., // optional + deductions: ..., // optional + extraWithholding: ..., // optional + citizen: ..., // optional + uscis: ..., // optional + passportNumber: ..., // optional + countryIssue: ..., // optional + prepartorOrTranslator: ..., // optional + signature: ..., // optional + date: ..., // optional + status: ..., // optional + }; + mutation.mutate(updateTaxFormVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., formType: ..., firstName: ..., lastName: ..., mInitial: ..., oLastName: ..., dob: ..., socialSN: ..., email: ..., phone: ..., address: ..., placeId: ..., latitude: ..., longitude: ..., city: ..., apt: ..., state: ..., street: ..., country: ..., zipCode: ..., marital: ..., multipleJob: ..., childrens: ..., otherDeps: ..., totalCredits: ..., otherInconme: ..., deductions: ..., extraWithholding: ..., citizen: ..., uscis: ..., passportNumber: ..., countryIssue: ..., prepartorOrTranslator: ..., signature: ..., date: ..., status: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateTaxFormVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.taxForm_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteTaxForm +You can execute the `deleteTaxForm` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteTaxForm(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteTaxForm(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteTaxForm` Mutation requires an argument of type `DeleteTaxFormVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteTaxFormVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteTaxForm` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteTaxForm` Mutation is of type `DeleteTaxFormData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteTaxFormData { + taxForm_delete?: TaxForm_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteTaxForm`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteTaxFormVariables } from '@dataconnect/generated'; +import { useDeleteTaxForm } from '@dataconnect/generated/react' + +export default function DeleteTaxFormComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteTaxForm(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteTaxForm(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTaxForm(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteTaxForm(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteTaxForm` Mutation requires an argument of type `DeleteTaxFormVariables`: + const deleteTaxFormVars: DeleteTaxFormVariables = { + id: ..., + }; + mutation.mutate(deleteTaxFormVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteTaxFormVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.taxForm_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createVendorRate +You can execute the `createVendorRate` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateVendorRate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateVendorRate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createVendorRate` Mutation requires an argument of type `CreateVendorRateVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateVendorRateVariables { + vendorId: UUIDString; + roleName?: string | null; + category?: CategoryType | null; + clientRate?: number | null; + employeeWage?: number | null; + markupPercentage?: number | null; + vendorFeePercentage?: number | null; + isActive?: boolean | null; + notes?: string | null; +} +``` +### Return Type +Recall that calling the `createVendorRate` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createVendorRate` Mutation is of type `CreateVendorRateData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateVendorRateData { + vendorRate_insert: VendorRate_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createVendorRate`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateVendorRateVariables } from '@dataconnect/generated'; +import { useCreateVendorRate } from '@dataconnect/generated/react' + +export default function CreateVendorRateComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateVendorRate(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateVendorRate(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateVendorRate(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateVendorRate(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateVendorRate` Mutation requires an argument of type `CreateVendorRateVariables`: + const createVendorRateVars: CreateVendorRateVariables = { + vendorId: ..., + roleName: ..., // optional + category: ..., // optional + clientRate: ..., // optional + employeeWage: ..., // optional + markupPercentage: ..., // optional + vendorFeePercentage: ..., // optional + isActive: ..., // optional + notes: ..., // optional + }; + mutation.mutate(createVendorRateVars); + // Variables can be defined inline as well. + mutation.mutate({ vendorId: ..., roleName: ..., category: ..., clientRate: ..., employeeWage: ..., markupPercentage: ..., vendorFeePercentage: ..., isActive: ..., notes: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createVendorRateVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.vendorRate_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateVendorRate +You can execute the `updateVendorRate` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateVendorRate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateVendorRate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateVendorRate` Mutation requires an argument of type `UpdateVendorRateVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateVendorRateVariables { + id: UUIDString; + vendorId?: UUIDString | null; + roleName?: string | null; + category?: CategoryType | null; + clientRate?: number | null; + employeeWage?: number | null; + markupPercentage?: number | null; + vendorFeePercentage?: number | null; + isActive?: boolean | null; + notes?: string | null; +} +``` +### Return Type +Recall that calling the `updateVendorRate` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateVendorRate` Mutation is of type `UpdateVendorRateData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateVendorRateData { + vendorRate_update?: VendorRate_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateVendorRate`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateVendorRateVariables } from '@dataconnect/generated'; +import { useUpdateVendorRate } from '@dataconnect/generated/react' + +export default function UpdateVendorRateComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateVendorRate(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateVendorRate(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateVendorRate(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateVendorRate(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateVendorRate` Mutation requires an argument of type `UpdateVendorRateVariables`: + const updateVendorRateVars: UpdateVendorRateVariables = { + id: ..., + vendorId: ..., // optional + roleName: ..., // optional + category: ..., // optional + clientRate: ..., // optional + employeeWage: ..., // optional + markupPercentage: ..., // optional + vendorFeePercentage: ..., // optional + isActive: ..., // optional + notes: ..., // optional + }; + mutation.mutate(updateVendorRateVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., vendorId: ..., roleName: ..., category: ..., clientRate: ..., employeeWage: ..., markupPercentage: ..., vendorFeePercentage: ..., isActive: ..., notes: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateVendorRateVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.vendorRate_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteVendorRate +You can execute the `deleteVendorRate` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteVendorRate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteVendorRate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteVendorRate` Mutation requires an argument of type `DeleteVendorRateVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteVendorRateVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteVendorRate` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteVendorRate` Mutation is of type `DeleteVendorRateData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteVendorRateData { + vendorRate_delete?: VendorRate_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteVendorRate`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteVendorRateVariables } from '@dataconnect/generated'; +import { useDeleteVendorRate } from '@dataconnect/generated/react' + +export default function DeleteVendorRateComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteVendorRate(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteVendorRate(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteVendorRate(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteVendorRate(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteVendorRate` Mutation requires an argument of type `DeleteVendorRateVariables`: + const deleteVendorRateVars: DeleteVendorRateVariables = { + id: ..., + }; + mutation.mutate(deleteVendorRateVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteVendorRateVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.vendorRate_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createActivityLog +You can execute the `createActivityLog` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateActivityLog(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateActivityLog(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createActivityLog` Mutation requires an argument of type `CreateActivityLogVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateActivityLogVariables { + userId: string; + date: TimestampString; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title: string; + description: string; + isRead?: boolean | null; + activityType: ActivityType; +} +``` +### Return Type +Recall that calling the `createActivityLog` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createActivityLog` Mutation is of type `CreateActivityLogData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateActivityLogData { + activityLog_insert: ActivityLog_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createActivityLog`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateActivityLogVariables } from '@dataconnect/generated'; +import { useCreateActivityLog } from '@dataconnect/generated/react' + +export default function CreateActivityLogComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateActivityLog(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateActivityLog(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateActivityLog(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateActivityLog(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateActivityLog` Mutation requires an argument of type `CreateActivityLogVariables`: + const createActivityLogVars: CreateActivityLogVariables = { + userId: ..., + date: ..., + hourStart: ..., // optional + hourEnd: ..., // optional + totalhours: ..., // optional + iconType: ..., // optional + iconColor: ..., // optional + title: ..., + description: ..., + isRead: ..., // optional + activityType: ..., + }; + mutation.mutate(createActivityLogVars); + // Variables can be defined inline as well. + mutation.mutate({ userId: ..., date: ..., hourStart: ..., hourEnd: ..., totalhours: ..., iconType: ..., iconColor: ..., title: ..., description: ..., isRead: ..., activityType: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createActivityLogVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.activityLog_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateActivityLog +You can execute the `updateActivityLog` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateActivityLog(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateActivityLog(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateActivityLog` Mutation requires an argument of type `UpdateActivityLogVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateActivityLogVariables { + id: UUIDString; + userId?: string | null; + date?: TimestampString | null; + hourStart?: string | null; + hourEnd?: string | null; + totalhours?: string | null; + iconType?: ActivityIconType | null; + iconColor?: string | null; + title?: string | null; + description?: string | null; + isRead?: boolean | null; + activityType?: ActivityType | null; +} +``` +### Return Type +Recall that calling the `updateActivityLog` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateActivityLog` Mutation is of type `UpdateActivityLogData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateActivityLogData { + activityLog_update?: ActivityLog_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateActivityLog`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateActivityLogVariables } from '@dataconnect/generated'; +import { useUpdateActivityLog } from '@dataconnect/generated/react' + +export default function UpdateActivityLogComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateActivityLog(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateActivityLog(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateActivityLog(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateActivityLog(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateActivityLog` Mutation requires an argument of type `UpdateActivityLogVariables`: + const updateActivityLogVars: UpdateActivityLogVariables = { + id: ..., + userId: ..., // optional + date: ..., // optional + hourStart: ..., // optional + hourEnd: ..., // optional + totalhours: ..., // optional + iconType: ..., // optional + iconColor: ..., // optional + title: ..., // optional + description: ..., // optional + isRead: ..., // optional + activityType: ..., // optional + }; + mutation.mutate(updateActivityLogVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., userId: ..., date: ..., hourStart: ..., hourEnd: ..., totalhours: ..., iconType: ..., iconColor: ..., title: ..., description: ..., isRead: ..., activityType: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateActivityLogVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.activityLog_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## markActivityLogAsRead +You can execute the `markActivityLogAsRead` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useMarkActivityLogAsRead(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useMarkActivityLogAsRead(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `markActivityLogAsRead` Mutation requires an argument of type `MarkActivityLogAsReadVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface MarkActivityLogAsReadVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `markActivityLogAsRead` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `markActivityLogAsRead` Mutation is of type `MarkActivityLogAsReadData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface MarkActivityLogAsReadData { + activityLog_update?: ActivityLog_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `markActivityLogAsRead`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, MarkActivityLogAsReadVariables } from '@dataconnect/generated'; +import { useMarkActivityLogAsRead } from '@dataconnect/generated/react' + +export default function MarkActivityLogAsReadComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useMarkActivityLogAsRead(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useMarkActivityLogAsRead(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useMarkActivityLogAsRead(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useMarkActivityLogAsRead(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useMarkActivityLogAsRead` Mutation requires an argument of type `MarkActivityLogAsReadVariables`: + const markActivityLogAsReadVars: MarkActivityLogAsReadVariables = { + id: ..., + }; + mutation.mutate(markActivityLogAsReadVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(markActivityLogAsReadVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.activityLog_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## markActivityLogsAsRead +You can execute the `markActivityLogsAsRead` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useMarkActivityLogsAsRead(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useMarkActivityLogsAsRead(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `markActivityLogsAsRead` Mutation requires an argument of type `MarkActivityLogsAsReadVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface MarkActivityLogsAsReadVariables { + ids: UUIDString[]; +} +``` +### Return Type +Recall that calling the `markActivityLogsAsRead` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `markActivityLogsAsRead` Mutation is of type `MarkActivityLogsAsReadData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface MarkActivityLogsAsReadData { + activityLog_updateMany: number; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `markActivityLogsAsRead`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, MarkActivityLogsAsReadVariables } from '@dataconnect/generated'; +import { useMarkActivityLogsAsRead } from '@dataconnect/generated/react' + +export default function MarkActivityLogsAsReadComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useMarkActivityLogsAsRead(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useMarkActivityLogsAsRead(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useMarkActivityLogsAsRead(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useMarkActivityLogsAsRead(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useMarkActivityLogsAsRead` Mutation requires an argument of type `MarkActivityLogsAsReadVariables`: + const markActivityLogsAsReadVars: MarkActivityLogsAsReadVariables = { + ids: ..., + }; + mutation.mutate(markActivityLogsAsReadVars); + // Variables can be defined inline as well. + mutation.mutate({ ids: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(markActivityLogsAsReadVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.activityLog_updateMany); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteActivityLog +You can execute the `deleteActivityLog` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteActivityLog(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteActivityLog(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteActivityLog` Mutation requires an argument of type `DeleteActivityLogVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteActivityLogVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteActivityLog` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteActivityLog` Mutation is of type `DeleteActivityLogData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteActivityLogData { + activityLog_delete?: ActivityLog_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteActivityLog`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteActivityLogVariables } from '@dataconnect/generated'; +import { useDeleteActivityLog } from '@dataconnect/generated/react' + +export default function DeleteActivityLogComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteActivityLog(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteActivityLog(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteActivityLog(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteActivityLog(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteActivityLog` Mutation requires an argument of type `DeleteActivityLogVariables`: + const deleteActivityLogVars: DeleteActivityLogVariables = { + id: ..., + }; + mutation.mutate(deleteActivityLogVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteActivityLogVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.activityLog_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## createShift +You can execute the `createShift` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateShift(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateShift(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `createShift` Mutation requires an argument of type `CreateShiftVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateShiftVariables { + title: string; + orderId: UUIDString; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; + createdBy?: string | null; +} +``` +### Return Type +Recall that calling the `createShift` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `createShift` Mutation is of type `CreateShiftData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateShiftData { + shift_insert: Shift_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `createShift`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateShiftVariables } from '@dataconnect/generated'; +import { useCreateShift } from '@dataconnect/generated/react' + +export default function CreateShiftComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateShift(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateShift(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateShift(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateShift(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateShift` Mutation requires an argument of type `CreateShiftVariables`: + const createShiftVars: CreateShiftVariables = { + title: ..., + orderId: ..., + date: ..., // optional + startTime: ..., // optional + endTime: ..., // optional + hours: ..., // optional + cost: ..., // optional + location: ..., // optional + locationAddress: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + placeId: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + description: ..., // optional + status: ..., // optional + workersNeeded: ..., // optional + filled: ..., // optional + filledAt: ..., // optional + managers: ..., // optional + durationDays: ..., // optional + createdBy: ..., // optional + }; + mutation.mutate(createShiftVars); + // Variables can be defined inline as well. + mutation.mutate({ title: ..., orderId: ..., date: ..., startTime: ..., endTime: ..., hours: ..., cost: ..., location: ..., locationAddress: ..., latitude: ..., longitude: ..., placeId: ..., city: ..., state: ..., street: ..., country: ..., description: ..., status: ..., workersNeeded: ..., filled: ..., filledAt: ..., managers: ..., durationDays: ..., createdBy: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createShiftVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.shift_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## updateShift +You can execute the `updateShift` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateShift(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateShift(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `updateShift` Mutation requires an argument of type `UpdateShiftVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateShiftVariables { + id: UUIDString; + title?: string | null; + orderId?: UUIDString | null; + date?: TimestampString | null; + startTime?: TimestampString | null; + endTime?: TimestampString | null; + hours?: number | null; + cost?: number | null; + location?: string | null; + locationAddress?: string | null; + latitude?: number | null; + longitude?: number | null; + placeId?: string | null; + city?: string | null; + state?: string | null; + street?: string | null; + country?: string | null; + description?: string | null; + status?: ShiftStatus | null; + workersNeeded?: number | null; + filled?: number | null; + filledAt?: TimestampString | null; + managers?: unknown[] | null; + durationDays?: number | null; +} +``` +### Return Type +Recall that calling the `updateShift` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `updateShift` Mutation is of type `UpdateShiftData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateShiftData { + shift_update?: Shift_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `updateShift`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateShiftVariables } from '@dataconnect/generated'; +import { useUpdateShift } from '@dataconnect/generated/react' + +export default function UpdateShiftComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateShift(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateShift(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateShift(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateShift(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateShift` Mutation requires an argument of type `UpdateShiftVariables`: + const updateShiftVars: UpdateShiftVariables = { + id: ..., + title: ..., // optional + orderId: ..., // optional + date: ..., // optional + startTime: ..., // optional + endTime: ..., // optional + hours: ..., // optional + cost: ..., // optional + location: ..., // optional + locationAddress: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + placeId: ..., // optional + city: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + description: ..., // optional + status: ..., // optional + workersNeeded: ..., // optional + filled: ..., // optional + filledAt: ..., // optional + managers: ..., // optional + durationDays: ..., // optional + }; + mutation.mutate(updateShiftVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., title: ..., orderId: ..., date: ..., startTime: ..., endTime: ..., hours: ..., cost: ..., location: ..., locationAddress: ..., latitude: ..., longitude: ..., placeId: ..., city: ..., state: ..., street: ..., country: ..., description: ..., status: ..., workersNeeded: ..., filled: ..., filledAt: ..., managers: ..., durationDays: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateShiftVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.shift_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## deleteShift +You can execute the `deleteShift` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteShift(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteShift(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `deleteShift` Mutation requires an argument of type `DeleteShiftVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteShiftVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `deleteShift` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `deleteShift` Mutation is of type `DeleteShiftData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteShiftData { + shift_delete?: Shift_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `deleteShift`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteShiftVariables } from '@dataconnect/generated'; +import { useDeleteShift } from '@dataconnect/generated/react' + +export default function DeleteShiftComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteShift(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteShift(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteShift(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteShift(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteShift` Mutation requires an argument of type `DeleteShiftVariables`: + const deleteShiftVars: DeleteShiftVariables = { + id: ..., + }; + mutation.mutate(deleteShiftVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteShiftVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.shift_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## CreateStaff +You can execute the `CreateStaff` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useCreateStaff(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useCreateStaff(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `CreateStaff` Mutation requires an argument of type `CreateStaffVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface CreateStaffVariables { + userId: string; + fullName: string; + level?: string | null; + role?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + ownerId?: UUIDString | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; +} +``` +### Return Type +Recall that calling the `CreateStaff` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `CreateStaff` Mutation is of type `CreateStaffData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface CreateStaffData { + staff_insert: Staff_Key; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `CreateStaff`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, CreateStaffVariables } from '@dataconnect/generated'; +import { useCreateStaff } from '@dataconnect/generated/react' + +export default function CreateStaffComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useCreateStaff(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useCreateStaff(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateStaff(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useCreateStaff(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useCreateStaff` Mutation requires an argument of type `CreateStaffVariables`: + const createStaffVars: CreateStaffVariables = { + userId: ..., + fullName: ..., + level: ..., // optional + role: ..., // optional + phone: ..., // optional + email: ..., // optional + photoUrl: ..., // optional + totalShifts: ..., // optional + averageRating: ..., // optional + onTimeRate: ..., // optional + noShowCount: ..., // optional + cancellationCount: ..., // optional + reliabilityScore: ..., // optional + bio: ..., // optional + skills: ..., // optional + industries: ..., // optional + preferredLocations: ..., // optional + maxDistanceMiles: ..., // optional + languages: ..., // optional + itemsAttire: ..., // optional + xp: ..., // optional + badges: ..., // optional + isRecommended: ..., // optional + ownerId: ..., // optional + department: ..., // optional + hubId: ..., // optional + manager: ..., // optional + english: ..., // optional + backgroundCheckStatus: ..., // optional + employmentType: ..., // optional + initial: ..., // optional + englishRequired: ..., // optional + city: ..., // optional + addres: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + }; + mutation.mutate(createStaffVars); + // Variables can be defined inline as well. + mutation.mutate({ userId: ..., fullName: ..., level: ..., role: ..., phone: ..., email: ..., photoUrl: ..., totalShifts: ..., averageRating: ..., onTimeRate: ..., noShowCount: ..., cancellationCount: ..., reliabilityScore: ..., bio: ..., skills: ..., industries: ..., preferredLocations: ..., maxDistanceMiles: ..., languages: ..., itemsAttire: ..., xp: ..., badges: ..., isRecommended: ..., ownerId: ..., department: ..., hubId: ..., manager: ..., english: ..., backgroundCheckStatus: ..., employmentType: ..., initial: ..., englishRequired: ..., city: ..., addres: ..., placeId: ..., latitude: ..., longitude: ..., state: ..., street: ..., country: ..., zipCode: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(createStaffVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staff_insert); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## UpdateStaff +You can execute the `UpdateStaff` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useUpdateStaff(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useUpdateStaff(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `UpdateStaff` Mutation requires an argument of type `UpdateStaffVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface UpdateStaffVariables { + id: UUIDString; + userId?: string | null; + fullName?: string | null; + level?: string | null; + role?: string | null; + phone?: string | null; + email?: string | null; + photoUrl?: string | null; + totalShifts?: number | null; + averageRating?: number | null; + onTimeRate?: number | null; + noShowCount?: number | null; + cancellationCount?: number | null; + reliabilityScore?: number | null; + bio?: string | null; + skills?: string[] | null; + industries?: string[] | null; + preferredLocations?: string[] | null; + maxDistanceMiles?: number | null; + languages?: unknown | null; + itemsAttire?: unknown | null; + xp?: number | null; + badges?: unknown | null; + isRecommended?: boolean | null; + ownerId?: UUIDString | null; + department?: DepartmentType | null; + hubId?: UUIDString | null; + manager?: UUIDString | null; + english?: EnglishProficiency | null; + backgroundCheckStatus?: BackgroundCheckStatus | null; + employmentType?: EmploymentType | null; + initial?: string | null; + englishRequired?: boolean | null; + city?: string | null; + addres?: string | null; + placeId?: string | null; + latitude?: number | null; + longitude?: number | null; + state?: string | null; + street?: string | null; + country?: string | null; + zipCode?: string | null; +} +``` +### Return Type +Recall that calling the `UpdateStaff` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `UpdateStaff` Mutation is of type `UpdateStaffData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface UpdateStaffData { + staff_update?: Staff_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `UpdateStaff`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, UpdateStaffVariables } from '@dataconnect/generated'; +import { useUpdateStaff } from '@dataconnect/generated/react' + +export default function UpdateStaffComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useUpdateStaff(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useUpdateStaff(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateStaff(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useUpdateStaff(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useUpdateStaff` Mutation requires an argument of type `UpdateStaffVariables`: + const updateStaffVars: UpdateStaffVariables = { + id: ..., + userId: ..., // optional + fullName: ..., // optional + level: ..., // optional + role: ..., // optional + phone: ..., // optional + email: ..., // optional + photoUrl: ..., // optional + totalShifts: ..., // optional + averageRating: ..., // optional + onTimeRate: ..., // optional + noShowCount: ..., // optional + cancellationCount: ..., // optional + reliabilityScore: ..., // optional + bio: ..., // optional + skills: ..., // optional + industries: ..., // optional + preferredLocations: ..., // optional + maxDistanceMiles: ..., // optional + languages: ..., // optional + itemsAttire: ..., // optional + xp: ..., // optional + badges: ..., // optional + isRecommended: ..., // optional + ownerId: ..., // optional + department: ..., // optional + hubId: ..., // optional + manager: ..., // optional + english: ..., // optional + backgroundCheckStatus: ..., // optional + employmentType: ..., // optional + initial: ..., // optional + englishRequired: ..., // optional + city: ..., // optional + addres: ..., // optional + placeId: ..., // optional + latitude: ..., // optional + longitude: ..., // optional + state: ..., // optional + street: ..., // optional + country: ..., // optional + zipCode: ..., // optional + }; + mutation.mutate(updateStaffVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., userId: ..., fullName: ..., level: ..., role: ..., phone: ..., email: ..., photoUrl: ..., totalShifts: ..., averageRating: ..., onTimeRate: ..., noShowCount: ..., cancellationCount: ..., reliabilityScore: ..., bio: ..., skills: ..., industries: ..., preferredLocations: ..., maxDistanceMiles: ..., languages: ..., itemsAttire: ..., xp: ..., badges: ..., isRecommended: ..., ownerId: ..., department: ..., hubId: ..., manager: ..., english: ..., backgroundCheckStatus: ..., employmentType: ..., initial: ..., englishRequired: ..., city: ..., addres: ..., placeId: ..., latitude: ..., longitude: ..., state: ..., street: ..., country: ..., zipCode: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(updateStaffVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staff_update); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + +## DeleteStaff +You can execute the `DeleteStaff` Mutation using the `UseMutationResult` object returned by the following Mutation hook function (which is defined in [dataconnect-generated/react/index.d.ts](./index.d.ts)): +```javascript +useDeleteStaff(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` +You can also pass in a `DataConnect` instance to the Mutation hook function. +```javascript +useDeleteStaff(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +``` + +### Variables +The `DeleteStaff` Mutation requires an argument of type `DeleteStaffVariables`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: + +```javascript +export interface DeleteStaffVariables { + id: UUIDString; +} +``` +### Return Type +Recall that calling the `DeleteStaff` Mutation hook function returns a `UseMutationResult` object. This object holds the state of your Mutation, including whether the Mutation is loading, has completed, or has succeeded/failed, among other things. + +To check the status of a Mutation, use the `UseMutationResult.status` field. You can also check for pending / success / error status using the `UseMutationResult.isPending`, `UseMutationResult.isSuccess`, and `UseMutationResult.isError` fields. + +To execute the Mutation, call `UseMutationResult.mutate()`. This function executes the Mutation, but does not return the data from the Mutation. + +To access the data returned by a Mutation, use the `UseMutationResult.data` field. The data for the `DeleteStaff` Mutation is of type `DeleteStaffData`, which is defined in [dataconnect-generated/index.d.ts](../index.d.ts). It has the following fields: +```javascript +export interface DeleteStaffData { + staff_delete?: Staff_Key | null; +} +``` + +To learn more about the `UseMutationResult` object, see the [TanStack React Query documentation](https://tanstack.com/query/v5/docs/framework/react/reference/useMutation). + +### Using `DeleteStaff`'s Mutation hook function + +```javascript +import { getDataConnect } from 'firebase/data-connect'; +import { connectorConfig, DeleteStaffVariables } from '@dataconnect/generated'; +import { useDeleteStaff } from '@dataconnect/generated/react' + +export default function DeleteStaffComponent() { + // Call the Mutation hook function to get a `UseMutationResult` object which holds the state of your Mutation. + const mutation = useDeleteStaff(); + + // You can also pass in a `DataConnect` instance to the Mutation hook function. + const dataConnect = getDataConnect(connectorConfig); + const mutation = useDeleteStaff(dataConnect); + + // You can also pass in a `useDataConnectMutationOptions` object to the Mutation hook function. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteStaff(options); + + // You can also pass both a `DataConnect` instance and a `useDataConnectMutationOptions` object. + const dataConnect = getDataConnect(connectorConfig); + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + const mutation = useDeleteStaff(dataConnect, options); + + // After calling the Mutation hook function, you must call `UseMutationResult.mutate()` to execute the Mutation. + // The `useDeleteStaff` Mutation requires an argument of type `DeleteStaffVariables`: + const deleteStaffVars: DeleteStaffVariables = { + id: ..., + }; + mutation.mutate(deleteStaffVars); + // Variables can be defined inline as well. + mutation.mutate({ id: ..., }); + + // You can also pass in a `useDataConnectMutationOptions` object to `UseMutationResult.mutate()`. + const options = { + onSuccess: () => { console.log('Mutation succeeded!'); } + }; + mutation.mutate(deleteStaffVars, options); + + // Then, you can render your component dynamically based on the status of the Mutation. + if (mutation.isPending) { + return
Loading...
; + } + + if (mutation.isError) { + return
Error: {mutation.error.message}
; + } + + // If the Mutation is successful, you can access the data returned using the `UseMutationResult.data` field. + if (mutation.isSuccess) { + console.log(mutation.data.staff_delete); + } + return
Mutation execution {mutation.isSuccess ? 'successful' : 'failed'}!
; +} +``` + diff --git a/apps/web/src/dataconnect-generated/react/esm/index.esm.js b/apps/web/src/dataconnect-generated/react/esm/index.esm.js new file mode 100644 index 00000000..0f608631 --- /dev/null +++ b/apps/web/src/dataconnect-generated/react/esm/index.esm.js @@ -0,0 +1,2536 @@ +import { createBenefitsDataRef, updateBenefitsDataRef, deleteBenefitsDataRef, listShiftsRef, getShiftByIdRef, filterShiftsRef, getShiftsByBusinessIdRef, getShiftsByVendorIdRef, createStaffDocumentRef, updateStaffDocumentRef, deleteStaffDocumentRef, listEmergencyContactsRef, getEmergencyContactByIdRef, getEmergencyContactsByStaffIdRef, getMyTasksRef, getMemberTaskByIdKeyRef, getMemberTasksByTaskIdRef, createTeamHudDepartmentRef, updateTeamHudDepartmentRef, deleteTeamHudDepartmentRef, listCertificatesRef, getCertificateByIdRef, listCertificatesByStaffIdRef, createMemberTaskRef, deleteMemberTaskRef, createTeamRef, updateTeamRef, deleteTeamRef, createUserConversationRef, updateUserConversationRef, markConversationAsReadRef, incrementUnreadForUserRef, deleteUserConversationRef, listAssignmentsRef, getAssignmentByIdRef, listAssignmentsByWorkforceIdRef, listAssignmentsByWorkforceIdsRef, listAssignmentsByShiftRoleRef, filterAssignmentsRef, createAttireOptionRef, updateAttireOptionRef, deleteAttireOptionRef, createCourseRef, updateCourseRef, deleteCourseRef, createEmergencyContactRef, updateEmergencyContactRef, deleteEmergencyContactRef, listInvoiceTemplatesRef, getInvoiceTemplateByIdRef, listInvoiceTemplatesByOwnerIdRef, listInvoiceTemplatesByVendorIdRef, listInvoiceTemplatesByBusinessIdRef, listInvoiceTemplatesByOrderIdRef, searchInvoiceTemplatesByOwnerAndNameRef, createStaffCourseRef, updateStaffCourseRef, deleteStaffCourseRef, getStaffDocumentByKeyRef, listStaffDocumentsByStaffIdRef, listStaffDocumentsByDocumentTypeRef, listStaffDocumentsByStatusRef, createTaskRef, updateTaskRef, deleteTaskRef, listAccountsRef, getAccountByIdRef, getAccountsByOwnerIdRef, filterAccountsRef, listApplicationsRef, getApplicationByIdRef, getApplicationsByShiftIdRef, getApplicationsByShiftIdAndStatusRef, getApplicationsByStaffIdRef, vaidateDayStaffApplicationRef, getApplicationByStaffShiftAndRoleRef, listAcceptedApplicationsByShiftRoleKeyRef, listAcceptedApplicationsByBusinessForDayRef, listStaffsApplicationsByBusinessForDayRef, listCompletedApplicationsByStaffIdRef, listAttireOptionsRef, getAttireOptionByIdRef, filterAttireOptionsRef, createCertificateRef, updateCertificateRef, deleteCertificateRef, listCustomRateCardsRef, getCustomRateCardByIdRef, createRoleRef, updateRoleRef, deleteRoleRef, listRoleCategoriesRef, getRoleCategoryByIdRef, getRoleCategoriesByCategoryRef, listStaffAvailabilitiesRef, listStaffAvailabilitiesByStaffIdRef, getStaffAvailabilityByKeyRef, listStaffAvailabilitiesByDayRef, listRecentPaymentsRef, getRecentPaymentByIdRef, listRecentPaymentsByStaffIdRef, listRecentPaymentsByApplicationIdRef, listRecentPaymentsByInvoiceIdRef, listRecentPaymentsByStatusRef, listRecentPaymentsByInvoiceIdsRef, listRecentPaymentsByBusinessIdRef, listBusinessesRef, getBusinessesByUserIdRef, getBusinessByIdRef, createClientFeedbackRef, updateClientFeedbackRef, deleteClientFeedbackRef, listConversationsRef, getConversationByIdRef, listConversationsByTypeRef, listConversationsByStatusRef, filterConversationsRef, listOrdersRef, getOrderByIdRef, getOrdersByBusinessIdRef, getOrdersByVendorIdRef, getOrdersByStatusRef, getOrdersByDateRangeRef, getRapidOrdersRef, listOrdersByBusinessAndTeamHubRef, listStaffRolesRef, getStaffRoleByKeyRef, listStaffRolesByStaffIdRef, listStaffRolesByRoleIdRef, filterStaffRolesRef, listTaskCommentsRef, getTaskCommentByIdRef, getTaskCommentsByTaskIdRef, createBusinessRef, updateBusinessRef, deleteBusinessRef, createConversationRef, updateConversationRef, updateConversationLastMessageRef, deleteConversationRef, createCustomRateCardRef, updateCustomRateCardRef, deleteCustomRateCardRef, listDocumentsRef, getDocumentByIdRef, filterDocumentsRef, createRecentPaymentRef, updateRecentPaymentRef, deleteRecentPaymentRef, listShiftsForCoverageRef, listApplicationsForCoverageRef, listShiftsForDailyOpsByBusinessRef, listShiftsForDailyOpsByVendorRef, listApplicationsForDailyOpsRef, listShiftsForForecastByBusinessRef, listShiftsForForecastByVendorRef, listShiftsForNoShowRangeByBusinessRef, listShiftsForNoShowRangeByVendorRef, listApplicationsForNoShowRangeRef, listStaffForNoShowReportRef, listInvoicesForSpendByBusinessRef, listInvoicesForSpendByVendorRef, listInvoicesForSpendByOrderRef, listTimesheetsForSpendRef, listShiftsForPerformanceByBusinessRef, listShiftsForPerformanceByVendorRef, listApplicationsForPerformanceRef, listStaffForPerformanceRef, createUserRef, updateUserRef, deleteUserRef, createVendorRef, updateVendorRef, deleteVendorRef, createDocumentRef, updateDocumentRef, deleteDocumentRef, listRolesRef, getRoleByIdRef, listRolesByVendorIdRef, listRolesByroleCategoryIdRef, getShiftRoleByIdRef, listShiftRolesByShiftIdRef, listShiftRolesByRoleIdRef, listShiftRolesByShiftIdAndTimeRangeRef, listShiftRolesByVendorIdRef, listShiftRolesByBusinessAndDateRangeRef, listShiftRolesByBusinessAndOrderRef, listShiftRolesByBusinessDateRangeCompletedOrdersRef, listShiftRolesByBusinessAndDatesSummaryRef, getCompletedShiftsByBusinessIdRef, createTaskCommentRef, updateTaskCommentRef, deleteTaskCommentRef, listTaxFormsRef, getTaxFormByIdRef, getTaxFormsByStaffIdRef, listTaxFormsWhereRef, createVendorBenefitPlanRef, updateVendorBenefitPlanRef, deleteVendorBenefitPlanRef, listFaqDatasRef, getFaqDataByIdRef, filterFaqDatasRef, createMessageRef, updateMessageRef, deleteMessageRef, getStaffCourseByIdRef, listStaffCoursesByStaffIdRef, listStaffCoursesByCourseIdRef, getStaffCourseByStaffAndCourseRef, createWorkforceRef, updateWorkforceRef, deactivateWorkforceRef, listActivityLogsRef, getActivityLogByIdRef, listActivityLogsByUserIdRef, listUnreadActivityLogsByUserIdRef, filterActivityLogsRef, listBenefitsDataRef, getBenefitsDataByKeyRef, listBenefitsDataByStaffIdRef, listBenefitsDataByVendorBenefitPlanIdRef, listBenefitsDataByVendorBenefitPlanIdsRef, createFaqDataRef, updateFaqDataRef, deleteFaqDataRef, createInvoiceRef, updateInvoiceRef, deleteInvoiceRef, listStaffRef, getStaffByIdRef, getStaffByUserIdRef, filterStaffRef, listTasksRef, getTaskByIdRef, getTasksByOwnerIdRef, filterTasksRef, createTeamHubRef, updateTeamHubRef, deleteTeamHubRef, listTeamHubsRef, getTeamHubByIdRef, getTeamHubsByTeamIdRef, listTeamHubsByOwnerIdRef, listClientFeedbacksRef, getClientFeedbackByIdRef, listClientFeedbacksByBusinessIdRef, listClientFeedbacksByVendorIdRef, listClientFeedbacksByBusinessAndVendorRef, filterClientFeedbacksRef, listClientFeedbackRatingsByVendorIdRef, createHubRef, updateHubRef, deleteHubRef, createRoleCategoryRef, updateRoleCategoryRef, deleteRoleCategoryRef, createStaffAvailabilityStatsRef, updateStaffAvailabilityStatsRef, deleteStaffAvailabilityStatsRef, listUsersRef, getUserByIdRef, filterUsersRef, getVendorByIdRef, getVendorByUserIdRef, listVendorsRef, listCategoriesRef, getCategoryByIdRef, filterCategoriesRef, listMessagesRef, getMessageByIdRef, getMessagesByConversationIdRef, createShiftRoleRef, updateShiftRoleRef, deleteShiftRoleRef, createStaffRoleRef, deleteStaffRoleRef, listUserConversationsRef, getUserConversationByKeyRef, listUserConversationsByUserIdRef, listUnreadUserConversationsByUserIdRef, listUserConversationsByConversationIdRef, filterUserConversationsRef, createAccountRef, updateAccountRef, deleteAccountRef, createApplicationRef, updateApplicationStatusRef, deleteApplicationRef, createAssignmentRef, updateAssignmentRef, deleteAssignmentRef, listHubsRef, getHubByIdRef, getHubsByOwnerIdRef, filterHubsRef, listInvoicesRef, getInvoiceByIdRef, listInvoicesByVendorIdRef, listInvoicesByBusinessIdRef, listInvoicesByOrderIdRef, listInvoicesByStatusRef, filterInvoicesRef, listOverdueInvoicesRef, createInvoiceTemplateRef, updateInvoiceTemplateRef, deleteInvoiceTemplateRef, createStaffAvailabilityRef, updateStaffAvailabilityRef, deleteStaffAvailabilityRef, createTeamMemberRef, updateTeamMemberRef, updateTeamMemberInviteStatusRef, acceptInviteByCodeRef, cancelInviteByCodeRef, deleteTeamMemberRef, listCoursesRef, getCourseByIdRef, filterCoursesRef, createLevelRef, updateLevelRef, deleteLevelRef, createOrderRef, updateOrderRef, deleteOrderRef, listVendorRatesRef, getVendorRateByIdRef, getWorkforceByIdRef, getWorkforceByVendorAndStaffRef, listWorkforceByVendorIdRef, listWorkforceByStaffIdRef, getWorkforceByVendorAndNumberRef, createCategoryRef, updateCategoryRef, deleteCategoryRef, listStaffAvailabilityStatsRef, getStaffAvailabilityStatsByStaffIdRef, filterStaffAvailabilityStatsRef, createTaxFormRef, updateTaxFormRef, deleteTaxFormRef, listTeamHudDepartmentsRef, getTeamHudDepartmentByIdRef, listTeamHudDepartmentsByTeamHubIdRef, createVendorRateRef, updateVendorRateRef, deleteVendorRateRef, createActivityLogRef, updateActivityLogRef, markActivityLogAsReadRef, markActivityLogsAsReadRef, deleteActivityLogRef, listLevelsRef, getLevelByIdRef, filterLevelsRef, createShiftRef, updateShiftRef, deleteShiftRef, createStaffRef, updateStaffRef, deleteStaffRef, listTeamsRef, getTeamByIdRef, getTeamsByOwnerIdRef, listTeamMembersRef, getTeamMemberByIdRef, getTeamMembersByTeamIdRef, listVendorBenefitPlansRef, getVendorBenefitPlanByIdRef, listVendorBenefitPlansByVendorIdRef, listActiveVendorBenefitPlansByVendorIdRef, filterVendorBenefitPlansRef, connectorConfig } from '../../esm/index.esm.js'; +import { validateArgs, CallerSdkTypeEnum } from 'firebase/data-connect'; +import { useDataConnectQuery, useDataConnectMutation, validateReactArgs } from '@tanstack-query-firebase/react/data-connect'; + +export function useCreateBenefitsData(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createBenefitsDataRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateBenefitsData(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateBenefitsDataRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteBenefitsData(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteBenefitsDataRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListShifts(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listShiftsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetShiftById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getShiftByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterShifts(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterShiftsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetShiftsByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getShiftsByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetShiftsByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getShiftsByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateStaffDocument(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createStaffDocumentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateStaffDocument(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateStaffDocumentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteStaffDocument(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteStaffDocumentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListEmergencyContacts(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listEmergencyContactsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetEmergencyContactById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getEmergencyContactByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetEmergencyContactsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getEmergencyContactsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetMyTasks(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getMyTasksRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetMemberTaskByIdKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getMemberTaskByIdKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetMemberTasksByTaskId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getMemberTasksByTaskIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateTeamHudDepartment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTeamHudDepartmentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateTeamHudDepartment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTeamHudDepartmentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteTeamHudDepartment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTeamHudDepartmentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListCertificates(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listCertificatesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetCertificateById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getCertificateByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListCertificatesByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listCertificatesByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateMemberTask(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createMemberTaskRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteMemberTask(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteMemberTaskRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateTeam(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTeamRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateTeam(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTeamRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteTeam(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTeamRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateUserConversation(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createUserConversationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateUserConversation(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateUserConversationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useMarkConversationAsRead(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return markConversationAsReadRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useIncrementUnreadForUser(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return incrementUnreadForUserRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteUserConversation(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteUserConversationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListAssignments(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listAssignmentsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetAssignmentById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getAssignmentByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListAssignmentsByWorkforceId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listAssignmentsByWorkforceIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListAssignmentsByWorkforceIds(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listAssignmentsByWorkforceIdsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListAssignmentsByShiftRole(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listAssignmentsByShiftRoleRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterAssignments(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = filterAssignmentsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateAttireOption(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createAttireOptionRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateAttireOption(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateAttireOptionRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteAttireOption(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteAttireOptionRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateCourse(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createCourseRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateCourse(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateCourseRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteCourse(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteCourseRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateEmergencyContact(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createEmergencyContactRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateEmergencyContact(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateEmergencyContactRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteEmergencyContact(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteEmergencyContactRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListInvoiceTemplates(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listInvoiceTemplatesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetInvoiceTemplateById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getInvoiceTemplateByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListInvoiceTemplatesByOwnerId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoiceTemplatesByOwnerIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListInvoiceTemplatesByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoiceTemplatesByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListInvoiceTemplatesByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoiceTemplatesByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListInvoiceTemplatesByOrderId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoiceTemplatesByOrderIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useSearchInvoiceTemplatesByOwnerAndName(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = searchInvoiceTemplatesByOwnerAndNameRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateStaffCourse(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createStaffCourseRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateStaffCourse(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateStaffCourseRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteStaffCourse(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteStaffCourseRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useGetStaffDocumentByKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffDocumentByKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffDocumentsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffDocumentsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffDocumentsByDocumentType(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffDocumentsByDocumentTypeRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffDocumentsByStatus(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffDocumentsByStatusRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateTask(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTaskRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateTask(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTaskRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteTask(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTaskRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListAccounts(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listAccountsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetAccountById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getAccountByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetAccountsByOwnerId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getAccountsByOwnerIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterAccounts(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterAccountsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListApplications(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listApplicationsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetApplicationById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getApplicationByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetApplicationsByShiftId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getApplicationsByShiftIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetApplicationsByShiftIdAndStatus(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getApplicationsByShiftIdAndStatusRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetApplicationsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getApplicationsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useVaidateDayStaffApplication(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = vaidateDayStaffApplicationRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetApplicationByStaffShiftAndRole(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getApplicationByStaffShiftAndRoleRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListAcceptedApplicationsByShiftRoleKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listAcceptedApplicationsByShiftRoleKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListAcceptedApplicationsByBusinessForDay(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listAcceptedApplicationsByBusinessForDayRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffsApplicationsByBusinessForDay(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffsApplicationsByBusinessForDayRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListCompletedApplicationsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listCompletedApplicationsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListAttireOptions(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listAttireOptionsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetAttireOptionById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getAttireOptionByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterAttireOptions(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterAttireOptionsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateCertificate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createCertificateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateCertificate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateCertificateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteCertificate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteCertificateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListCustomRateCards(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listCustomRateCardsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetCustomRateCardById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getCustomRateCardByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListRoleCategories(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listRoleCategoriesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetRoleCategoryById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getRoleCategoryByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetRoleCategoriesByCategory(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getRoleCategoriesByCategoryRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffAvailabilities(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listStaffAvailabilitiesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffAvailabilitiesByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffAvailabilitiesByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetStaffAvailabilityByKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffAvailabilityByKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffAvailabilitiesByDay(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffAvailabilitiesByDayRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListRecentPayments(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listRecentPaymentsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetRecentPaymentById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getRecentPaymentByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListRecentPaymentsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRecentPaymentsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListRecentPaymentsByApplicationId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRecentPaymentsByApplicationIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListRecentPaymentsByInvoiceId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRecentPaymentsByInvoiceIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListRecentPaymentsByStatus(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRecentPaymentsByStatusRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListRecentPaymentsByInvoiceIds(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRecentPaymentsByInvoiceIdsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListRecentPaymentsByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRecentPaymentsByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListBusinesses(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listBusinessesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetBusinessesByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getBusinessesByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetBusinessById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getBusinessByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateClientFeedback(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createClientFeedbackRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateClientFeedback(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateClientFeedbackRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteClientFeedback(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteClientFeedbackRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListConversations(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listConversationsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetConversationById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getConversationByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListConversationsByType(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listConversationsByTypeRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListConversationsByStatus(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listConversationsByStatusRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterConversations(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterConversationsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListOrders(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listOrdersRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetOrderById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getOrderByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetOrdersByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getOrdersByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetOrdersByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getOrdersByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetOrdersByStatus(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getOrdersByStatusRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetOrdersByDateRange(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getOrdersByDateRangeRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetRapidOrders(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = getRapidOrdersRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListOrdersByBusinessAndTeamHub(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listOrdersByBusinessAndTeamHubRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffRoles(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listStaffRolesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetStaffRoleByKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffRoleByKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffRolesByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffRolesByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffRolesByRoleId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffRolesByRoleIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterStaffRoles(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterStaffRolesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListTaskComments(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listTaskCommentsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetTaskCommentById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTaskCommentByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetTaskCommentsByTaskId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTaskCommentsByTaskIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateBusiness(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createBusinessRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateBusiness(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateBusinessRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteBusiness(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteBusinessRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateConversation(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createConversationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateConversation(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateConversationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateConversationLastMessage(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateConversationLastMessageRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteConversation(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteConversationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateCustomRateCard(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createCustomRateCardRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateCustomRateCard(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateCustomRateCardRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteCustomRateCard(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteCustomRateCardRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListDocuments(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listDocumentsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetDocumentById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getDocumentByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterDocuments(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterDocumentsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateRecentPayment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createRecentPaymentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateRecentPayment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateRecentPaymentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteRecentPayment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteRecentPaymentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListShiftsForCoverage(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForCoverageRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListApplicationsForCoverage(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listApplicationsForCoverageRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftsForDailyOpsByBusiness(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForDailyOpsByBusinessRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftsForDailyOpsByVendor(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForDailyOpsByVendorRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListApplicationsForDailyOps(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listApplicationsForDailyOpsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftsForForecastByBusiness(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForForecastByBusinessRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftsForForecastByVendor(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForForecastByVendorRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftsForNoShowRangeByBusiness(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForNoShowRangeByBusinessRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftsForNoShowRangeByVendor(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForNoShowRangeByVendorRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListApplicationsForNoShowRange(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listApplicationsForNoShowRangeRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffForNoShowReport(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffForNoShowReportRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListInvoicesForSpendByBusiness(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesForSpendByBusinessRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListInvoicesForSpendByVendor(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesForSpendByVendorRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListInvoicesForSpendByOrder(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesForSpendByOrderRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListTimesheetsForSpend(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listTimesheetsForSpendRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftsForPerformanceByBusiness(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForPerformanceByBusinessRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftsForPerformanceByVendor(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForPerformanceByVendorRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListApplicationsForPerformance(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listApplicationsForPerformanceRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffForPerformance(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffForPerformanceRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateUser(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createUserRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateUser(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateUserRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteUser(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteUserRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateVendor(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createVendorRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateVendor(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateVendorRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteVendor(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteVendorRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateDocument(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createDocumentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateDocument(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateDocumentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteDocument(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteDocumentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListRoles(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listRolesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetRoleById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getRoleByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListRolesByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRolesByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListRolesByroleCategoryId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRolesByroleCategoryIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetShiftRoleById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getShiftRoleByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftRolesByShiftId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByShiftIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftRolesByRoleId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByRoleIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftRolesByShiftIdAndTimeRange(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByShiftIdAndTimeRangeRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftRolesByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftRolesByBusinessAndDateRange(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByBusinessAndDateRangeRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftRolesByBusinessAndOrder(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByBusinessAndOrderRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftRolesByBusinessDateRangeCompletedOrders(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByBusinessDateRangeCompletedOrdersRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListShiftRolesByBusinessAndDatesSummary(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByBusinessAndDatesSummaryRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetCompletedShiftsByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getCompletedShiftsByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateTaskComment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTaskCommentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateTaskComment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTaskCommentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteTaskComment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTaskCommentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListTaxForms(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listTaxFormsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetTaxFormById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTaxFormByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetTaxFormsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTaxFormsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListTaxFormsWhere(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listTaxFormsWhereRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateVendorBenefitPlan(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createVendorBenefitPlanRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateVendorBenefitPlan(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateVendorBenefitPlanRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteVendorBenefitPlan(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteVendorBenefitPlanRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListFaqDatas(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listFaqDatasRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetFaqDataById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getFaqDataByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterFaqDatas(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterFaqDatasRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateMessage(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createMessageRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateMessage(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateMessageRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteMessage(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteMessageRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useGetStaffCourseById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffCourseByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffCoursesByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffCoursesByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListStaffCoursesByCourseId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffCoursesByCourseIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetStaffCourseByStaffAndCourse(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffCourseByStaffAndCourseRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateWorkforce(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createWorkforceRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateWorkforce(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateWorkforceRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeactivateWorkforce(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deactivateWorkforceRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListActivityLogs(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listActivityLogsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetActivityLogById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getActivityLogByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListActivityLogsByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listActivityLogsByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListUnreadActivityLogsByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listUnreadActivityLogsByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterActivityLogs(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterActivityLogsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListBenefitsData(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listBenefitsDataRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetBenefitsDataByKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getBenefitsDataByKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListBenefitsDataByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listBenefitsDataByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListBenefitsDataByVendorBenefitPlanId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listBenefitsDataByVendorBenefitPlanIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListBenefitsDataByVendorBenefitPlanIds(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listBenefitsDataByVendorBenefitPlanIdsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateFaqData(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createFaqDataRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateFaqData(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateFaqDataRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteFaqData(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteFaqDataRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateInvoice(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createInvoiceRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateInvoice(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateInvoiceRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteInvoice(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteInvoiceRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListStaff(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listStaffRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetStaffById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetStaffByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterStaff(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterStaffRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListTasks(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listTasksRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetTaskById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTaskByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetTasksByOwnerId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTasksByOwnerIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterTasks(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterTasksRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateTeamHub(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTeamHubRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateTeamHub(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTeamHubRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteTeamHub(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTeamHubRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListTeamHubs(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listTeamHubsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetTeamHubById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamHubByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetTeamHubsByTeamId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamHubsByTeamIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListTeamHubsByOwnerId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listTeamHubsByOwnerIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListClientFeedbacks(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listClientFeedbacksRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetClientFeedbackById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getClientFeedbackByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListClientFeedbacksByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listClientFeedbacksByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListClientFeedbacksByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listClientFeedbacksByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListClientFeedbacksByBusinessAndVendor(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listClientFeedbacksByBusinessAndVendorRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterClientFeedbacks(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterClientFeedbacksRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListClientFeedbackRatingsByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listClientFeedbackRatingsByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateHub(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createHubRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateHub(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateHubRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteHub(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteHubRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateRoleCategory(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createRoleCategoryRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateRoleCategory(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateRoleCategoryRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteRoleCategory(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteRoleCategoryRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateStaffAvailabilityStats(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createStaffAvailabilityStatsRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateStaffAvailabilityStats(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateStaffAvailabilityStatsRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteStaffAvailabilityStats(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteStaffAvailabilityStatsRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListUsers(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listUsersRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetUserById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getUserByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterUsers(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterUsersRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetVendorById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getVendorByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetVendorByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getVendorByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListVendors(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listVendorsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListCategories(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listCategoriesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetCategoryById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getCategoryByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterCategories(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterCategoriesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListMessages(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listMessagesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetMessageById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getMessageByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetMessagesByConversationId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getMessagesByConversationIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateShiftRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createShiftRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateShiftRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateShiftRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteShiftRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteShiftRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateStaffRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createStaffRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteStaffRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteStaffRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListUserConversations(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listUserConversationsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetUserConversationByKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getUserConversationByKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListUserConversationsByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listUserConversationsByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListUnreadUserConversationsByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listUnreadUserConversationsByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListUserConversationsByConversationId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listUserConversationsByConversationIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterUserConversations(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterUserConversationsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateAccount(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createAccountRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateAccount(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateAccountRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteAccount(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteAccountRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateApplication(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createApplicationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateApplicationStatus(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateApplicationStatusRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteApplication(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteApplicationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateAssignment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createAssignmentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateAssignment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateAssignmentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteAssignment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteAssignmentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListHubs(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listHubsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetHubById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getHubByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetHubsByOwnerId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getHubsByOwnerIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterHubs(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterHubsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListInvoices(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listInvoicesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetInvoiceById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getInvoiceByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListInvoicesByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListInvoicesByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListInvoicesByOrderId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesByOrderIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListInvoicesByStatus(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesByStatusRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterInvoices(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterInvoicesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListOverdueInvoices(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listOverdueInvoicesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateInvoiceTemplate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createInvoiceTemplateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateInvoiceTemplate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateInvoiceTemplateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteInvoiceTemplate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteInvoiceTemplateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateStaffAvailability(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createStaffAvailabilityRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateStaffAvailability(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateStaffAvailabilityRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteStaffAvailability(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteStaffAvailabilityRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateTeamMember(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTeamMemberRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateTeamMember(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTeamMemberRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateTeamMemberInviteStatus(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTeamMemberInviteStatusRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useAcceptInviteByCode(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return acceptInviteByCodeRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCancelInviteByCode(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return cancelInviteByCodeRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteTeamMember(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTeamMemberRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListCourses(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listCoursesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetCourseById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getCourseByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterCourses(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterCoursesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateLevel(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createLevelRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateLevel(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateLevelRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteLevel(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteLevelRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateOrder(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createOrderRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateOrder(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateOrderRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteOrder(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteOrderRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListVendorRates(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listVendorRatesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetVendorRateById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getVendorRateByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetWorkforceById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getWorkforceByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetWorkforceByVendorAndStaff(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getWorkforceByVendorAndStaffRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListWorkforceByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listWorkforceByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListWorkforceByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listWorkforceByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetWorkforceByVendorAndNumber(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getWorkforceByVendorAndNumberRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateCategory(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createCategoryRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateCategory(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateCategoryRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteCategory(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteCategoryRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListStaffAvailabilityStats(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listStaffAvailabilityStatsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetStaffAvailabilityStatsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffAvailabilityStatsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterStaffAvailabilityStats(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterStaffAvailabilityStatsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateTaxForm(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTaxFormRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateTaxForm(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTaxFormRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteTaxForm(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTaxFormRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListTeamHudDepartments(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listTeamHudDepartmentsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetTeamHudDepartmentById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamHudDepartmentByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListTeamHudDepartmentsByTeamHubId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listTeamHudDepartmentsByTeamHubIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateVendorRate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createVendorRateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateVendorRate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateVendorRateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteVendorRate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteVendorRateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateActivityLog(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createActivityLogRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateActivityLog(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateActivityLogRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useMarkActivityLogAsRead(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return markActivityLogAsReadRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useMarkActivityLogsAsRead(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return markActivityLogsAsReadRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteActivityLog(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteActivityLogRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListLevels(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listLevelsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetLevelById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getLevelByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterLevels(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterLevelsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +export function useCreateShift(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createShiftRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateShift(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateShiftRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteShift(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteShiftRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useCreateStaff(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createStaffRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useUpdateStaff(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateStaffRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useDeleteStaff(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteStaffRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +export function useListTeams(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listTeamsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetTeamById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetTeamsByOwnerId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamsByOwnerIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListTeamMembers(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listTeamMembersRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetTeamMemberById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamMemberByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetTeamMembersByTeamId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamMembersByTeamIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListVendorBenefitPlans(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listVendorBenefitPlansRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useGetVendorBenefitPlanById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getVendorBenefitPlanByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListVendorBenefitPlansByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listVendorBenefitPlansByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useListActiveVendorBenefitPlansByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listActiveVendorBenefitPlansByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +export function useFilterVendorBenefitPlans(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterVendorBenefitPlansRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} \ No newline at end of file diff --git a/apps/web/src/dataconnect-generated/react/esm/package.json b/apps/web/src/dataconnect-generated/react/esm/package.json new file mode 100644 index 00000000..7c34deb5 --- /dev/null +++ b/apps/web/src/dataconnect-generated/react/esm/package.json @@ -0,0 +1 @@ +{"type":"module"} \ No newline at end of file diff --git a/apps/web/src/dataconnect-generated/react/index.cjs.js b/apps/web/src/dataconnect-generated/react/index.cjs.js new file mode 100644 index 00000000..421311b0 --- /dev/null +++ b/apps/web/src/dataconnect-generated/react/index.cjs.js @@ -0,0 +1,2536 @@ +const { createBenefitsDataRef, updateBenefitsDataRef, deleteBenefitsDataRef, listShiftsRef, getShiftByIdRef, filterShiftsRef, getShiftsByBusinessIdRef, getShiftsByVendorIdRef, createStaffDocumentRef, updateStaffDocumentRef, deleteStaffDocumentRef, listEmergencyContactsRef, getEmergencyContactByIdRef, getEmergencyContactsByStaffIdRef, getMyTasksRef, getMemberTaskByIdKeyRef, getMemberTasksByTaskIdRef, createTeamHudDepartmentRef, updateTeamHudDepartmentRef, deleteTeamHudDepartmentRef, listCertificatesRef, getCertificateByIdRef, listCertificatesByStaffIdRef, createMemberTaskRef, deleteMemberTaskRef, createTeamRef, updateTeamRef, deleteTeamRef, createUserConversationRef, updateUserConversationRef, markConversationAsReadRef, incrementUnreadForUserRef, deleteUserConversationRef, listAssignmentsRef, getAssignmentByIdRef, listAssignmentsByWorkforceIdRef, listAssignmentsByWorkforceIdsRef, listAssignmentsByShiftRoleRef, filterAssignmentsRef, createAttireOptionRef, updateAttireOptionRef, deleteAttireOptionRef, createCourseRef, updateCourseRef, deleteCourseRef, createEmergencyContactRef, updateEmergencyContactRef, deleteEmergencyContactRef, listInvoiceTemplatesRef, getInvoiceTemplateByIdRef, listInvoiceTemplatesByOwnerIdRef, listInvoiceTemplatesByVendorIdRef, listInvoiceTemplatesByBusinessIdRef, listInvoiceTemplatesByOrderIdRef, searchInvoiceTemplatesByOwnerAndNameRef, createStaffCourseRef, updateStaffCourseRef, deleteStaffCourseRef, getStaffDocumentByKeyRef, listStaffDocumentsByStaffIdRef, listStaffDocumentsByDocumentTypeRef, listStaffDocumentsByStatusRef, createTaskRef, updateTaskRef, deleteTaskRef, listAccountsRef, getAccountByIdRef, getAccountsByOwnerIdRef, filterAccountsRef, listApplicationsRef, getApplicationByIdRef, getApplicationsByShiftIdRef, getApplicationsByShiftIdAndStatusRef, getApplicationsByStaffIdRef, vaidateDayStaffApplicationRef, getApplicationByStaffShiftAndRoleRef, listAcceptedApplicationsByShiftRoleKeyRef, listAcceptedApplicationsByBusinessForDayRef, listStaffsApplicationsByBusinessForDayRef, listCompletedApplicationsByStaffIdRef, listAttireOptionsRef, getAttireOptionByIdRef, filterAttireOptionsRef, createCertificateRef, updateCertificateRef, deleteCertificateRef, listCustomRateCardsRef, getCustomRateCardByIdRef, createRoleRef, updateRoleRef, deleteRoleRef, listRoleCategoriesRef, getRoleCategoryByIdRef, getRoleCategoriesByCategoryRef, listStaffAvailabilitiesRef, listStaffAvailabilitiesByStaffIdRef, getStaffAvailabilityByKeyRef, listStaffAvailabilitiesByDayRef, listRecentPaymentsRef, getRecentPaymentByIdRef, listRecentPaymentsByStaffIdRef, listRecentPaymentsByApplicationIdRef, listRecentPaymentsByInvoiceIdRef, listRecentPaymentsByStatusRef, listRecentPaymentsByInvoiceIdsRef, listRecentPaymentsByBusinessIdRef, listBusinessesRef, getBusinessesByUserIdRef, getBusinessByIdRef, createClientFeedbackRef, updateClientFeedbackRef, deleteClientFeedbackRef, listConversationsRef, getConversationByIdRef, listConversationsByTypeRef, listConversationsByStatusRef, filterConversationsRef, listOrdersRef, getOrderByIdRef, getOrdersByBusinessIdRef, getOrdersByVendorIdRef, getOrdersByStatusRef, getOrdersByDateRangeRef, getRapidOrdersRef, listOrdersByBusinessAndTeamHubRef, listStaffRolesRef, getStaffRoleByKeyRef, listStaffRolesByStaffIdRef, listStaffRolesByRoleIdRef, filterStaffRolesRef, listTaskCommentsRef, getTaskCommentByIdRef, getTaskCommentsByTaskIdRef, createBusinessRef, updateBusinessRef, deleteBusinessRef, createConversationRef, updateConversationRef, updateConversationLastMessageRef, deleteConversationRef, createCustomRateCardRef, updateCustomRateCardRef, deleteCustomRateCardRef, listDocumentsRef, getDocumentByIdRef, filterDocumentsRef, createRecentPaymentRef, updateRecentPaymentRef, deleteRecentPaymentRef, listShiftsForCoverageRef, listApplicationsForCoverageRef, listShiftsForDailyOpsByBusinessRef, listShiftsForDailyOpsByVendorRef, listApplicationsForDailyOpsRef, listShiftsForForecastByBusinessRef, listShiftsForForecastByVendorRef, listShiftsForNoShowRangeByBusinessRef, listShiftsForNoShowRangeByVendorRef, listApplicationsForNoShowRangeRef, listStaffForNoShowReportRef, listInvoicesForSpendByBusinessRef, listInvoicesForSpendByVendorRef, listInvoicesForSpendByOrderRef, listTimesheetsForSpendRef, listShiftsForPerformanceByBusinessRef, listShiftsForPerformanceByVendorRef, listApplicationsForPerformanceRef, listStaffForPerformanceRef, createUserRef, updateUserRef, deleteUserRef, createVendorRef, updateVendorRef, deleteVendorRef, createDocumentRef, updateDocumentRef, deleteDocumentRef, listRolesRef, getRoleByIdRef, listRolesByVendorIdRef, listRolesByroleCategoryIdRef, getShiftRoleByIdRef, listShiftRolesByShiftIdRef, listShiftRolesByRoleIdRef, listShiftRolesByShiftIdAndTimeRangeRef, listShiftRolesByVendorIdRef, listShiftRolesByBusinessAndDateRangeRef, listShiftRolesByBusinessAndOrderRef, listShiftRolesByBusinessDateRangeCompletedOrdersRef, listShiftRolesByBusinessAndDatesSummaryRef, getCompletedShiftsByBusinessIdRef, createTaskCommentRef, updateTaskCommentRef, deleteTaskCommentRef, listTaxFormsRef, getTaxFormByIdRef, getTaxFormsByStaffIdRef, listTaxFormsWhereRef, createVendorBenefitPlanRef, updateVendorBenefitPlanRef, deleteVendorBenefitPlanRef, listFaqDatasRef, getFaqDataByIdRef, filterFaqDatasRef, createMessageRef, updateMessageRef, deleteMessageRef, getStaffCourseByIdRef, listStaffCoursesByStaffIdRef, listStaffCoursesByCourseIdRef, getStaffCourseByStaffAndCourseRef, createWorkforceRef, updateWorkforceRef, deactivateWorkforceRef, listActivityLogsRef, getActivityLogByIdRef, listActivityLogsByUserIdRef, listUnreadActivityLogsByUserIdRef, filterActivityLogsRef, listBenefitsDataRef, getBenefitsDataByKeyRef, listBenefitsDataByStaffIdRef, listBenefitsDataByVendorBenefitPlanIdRef, listBenefitsDataByVendorBenefitPlanIdsRef, createFaqDataRef, updateFaqDataRef, deleteFaqDataRef, createInvoiceRef, updateInvoiceRef, deleteInvoiceRef, listStaffRef, getStaffByIdRef, getStaffByUserIdRef, filterStaffRef, listTasksRef, getTaskByIdRef, getTasksByOwnerIdRef, filterTasksRef, createTeamHubRef, updateTeamHubRef, deleteTeamHubRef, listTeamHubsRef, getTeamHubByIdRef, getTeamHubsByTeamIdRef, listTeamHubsByOwnerIdRef, listClientFeedbacksRef, getClientFeedbackByIdRef, listClientFeedbacksByBusinessIdRef, listClientFeedbacksByVendorIdRef, listClientFeedbacksByBusinessAndVendorRef, filterClientFeedbacksRef, listClientFeedbackRatingsByVendorIdRef, createHubRef, updateHubRef, deleteHubRef, createRoleCategoryRef, updateRoleCategoryRef, deleteRoleCategoryRef, createStaffAvailabilityStatsRef, updateStaffAvailabilityStatsRef, deleteStaffAvailabilityStatsRef, listUsersRef, getUserByIdRef, filterUsersRef, getVendorByIdRef, getVendorByUserIdRef, listVendorsRef, listCategoriesRef, getCategoryByIdRef, filterCategoriesRef, listMessagesRef, getMessageByIdRef, getMessagesByConversationIdRef, createShiftRoleRef, updateShiftRoleRef, deleteShiftRoleRef, createStaffRoleRef, deleteStaffRoleRef, listUserConversationsRef, getUserConversationByKeyRef, listUserConversationsByUserIdRef, listUnreadUserConversationsByUserIdRef, listUserConversationsByConversationIdRef, filterUserConversationsRef, createAccountRef, updateAccountRef, deleteAccountRef, createApplicationRef, updateApplicationStatusRef, deleteApplicationRef, createAssignmentRef, updateAssignmentRef, deleteAssignmentRef, listHubsRef, getHubByIdRef, getHubsByOwnerIdRef, filterHubsRef, listInvoicesRef, getInvoiceByIdRef, listInvoicesByVendorIdRef, listInvoicesByBusinessIdRef, listInvoicesByOrderIdRef, listInvoicesByStatusRef, filterInvoicesRef, listOverdueInvoicesRef, createInvoiceTemplateRef, updateInvoiceTemplateRef, deleteInvoiceTemplateRef, createStaffAvailabilityRef, updateStaffAvailabilityRef, deleteStaffAvailabilityRef, createTeamMemberRef, updateTeamMemberRef, updateTeamMemberInviteStatusRef, acceptInviteByCodeRef, cancelInviteByCodeRef, deleteTeamMemberRef, listCoursesRef, getCourseByIdRef, filterCoursesRef, createLevelRef, updateLevelRef, deleteLevelRef, createOrderRef, updateOrderRef, deleteOrderRef, listVendorRatesRef, getVendorRateByIdRef, getWorkforceByIdRef, getWorkforceByVendorAndStaffRef, listWorkforceByVendorIdRef, listWorkforceByStaffIdRef, getWorkforceByVendorAndNumberRef, createCategoryRef, updateCategoryRef, deleteCategoryRef, listStaffAvailabilityStatsRef, getStaffAvailabilityStatsByStaffIdRef, filterStaffAvailabilityStatsRef, createTaxFormRef, updateTaxFormRef, deleteTaxFormRef, listTeamHudDepartmentsRef, getTeamHudDepartmentByIdRef, listTeamHudDepartmentsByTeamHubIdRef, createVendorRateRef, updateVendorRateRef, deleteVendorRateRef, createActivityLogRef, updateActivityLogRef, markActivityLogAsReadRef, markActivityLogsAsReadRef, deleteActivityLogRef, listLevelsRef, getLevelByIdRef, filterLevelsRef, createShiftRef, updateShiftRef, deleteShiftRef, createStaffRef, updateStaffRef, deleteStaffRef, listTeamsRef, getTeamByIdRef, getTeamsByOwnerIdRef, listTeamMembersRef, getTeamMemberByIdRef, getTeamMembersByTeamIdRef, listVendorBenefitPlansRef, getVendorBenefitPlanByIdRef, listVendorBenefitPlansByVendorIdRef, listActiveVendorBenefitPlansByVendorIdRef, filterVendorBenefitPlansRef, connectorConfig } = require('../index.cjs.js'); +const { validateArgs, CallerSdkTypeEnum } = require('firebase/data-connect'); +const { useDataConnectQuery, useDataConnectMutation, validateReactArgs } = require('@tanstack-query-firebase/react/data-connect'); + +exports.useCreateBenefitsData = function useCreateBenefitsData(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createBenefitsDataRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateBenefitsData = function useUpdateBenefitsData(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateBenefitsDataRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteBenefitsData = function useDeleteBenefitsData(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteBenefitsDataRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListShifts = function useListShifts(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listShiftsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetShiftById = function useGetShiftById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getShiftByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterShifts = function useFilterShifts(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterShiftsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetShiftsByBusinessId = function useGetShiftsByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getShiftsByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetShiftsByVendorId = function useGetShiftsByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getShiftsByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateStaffDocument = function useCreateStaffDocument(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createStaffDocumentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateStaffDocument = function useUpdateStaffDocument(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateStaffDocumentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteStaffDocument = function useDeleteStaffDocument(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteStaffDocumentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListEmergencyContacts = function useListEmergencyContacts(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listEmergencyContactsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetEmergencyContactById = function useGetEmergencyContactById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getEmergencyContactByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetEmergencyContactsByStaffId = function useGetEmergencyContactsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getEmergencyContactsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetMyTasks = function useGetMyTasks(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getMyTasksRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetMemberTaskByIdKey = function useGetMemberTaskByIdKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getMemberTaskByIdKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetMemberTasksByTaskId = function useGetMemberTasksByTaskId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getMemberTasksByTaskIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateTeamHudDepartment = function useCreateTeamHudDepartment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTeamHudDepartmentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateTeamHudDepartment = function useUpdateTeamHudDepartment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTeamHudDepartmentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteTeamHudDepartment = function useDeleteTeamHudDepartment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTeamHudDepartmentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListCertificates = function useListCertificates(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listCertificatesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetCertificateById = function useGetCertificateById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getCertificateByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListCertificatesByStaffId = function useListCertificatesByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listCertificatesByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateMemberTask = function useCreateMemberTask(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createMemberTaskRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteMemberTask = function useDeleteMemberTask(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteMemberTaskRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateTeam = function useCreateTeam(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTeamRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateTeam = function useUpdateTeam(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTeamRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteTeam = function useDeleteTeam(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTeamRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateUserConversation = function useCreateUserConversation(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createUserConversationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateUserConversation = function useUpdateUserConversation(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateUserConversationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useMarkConversationAsRead = function useMarkConversationAsRead(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return markConversationAsReadRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useIncrementUnreadForUser = function useIncrementUnreadForUser(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return incrementUnreadForUserRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteUserConversation = function useDeleteUserConversation(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteUserConversationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListAssignments = function useListAssignments(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listAssignmentsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetAssignmentById = function useGetAssignmentById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getAssignmentByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListAssignmentsByWorkforceId = function useListAssignmentsByWorkforceId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listAssignmentsByWorkforceIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListAssignmentsByWorkforceIds = function useListAssignmentsByWorkforceIds(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listAssignmentsByWorkforceIdsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListAssignmentsByShiftRole = function useListAssignmentsByShiftRole(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listAssignmentsByShiftRoleRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterAssignments = function useFilterAssignments(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = filterAssignmentsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateAttireOption = function useCreateAttireOption(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createAttireOptionRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateAttireOption = function useUpdateAttireOption(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateAttireOptionRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteAttireOption = function useDeleteAttireOption(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteAttireOptionRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateCourse = function useCreateCourse(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createCourseRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateCourse = function useUpdateCourse(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateCourseRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteCourse = function useDeleteCourse(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteCourseRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateEmergencyContact = function useCreateEmergencyContact(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createEmergencyContactRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateEmergencyContact = function useUpdateEmergencyContact(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateEmergencyContactRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteEmergencyContact = function useDeleteEmergencyContact(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteEmergencyContactRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListInvoiceTemplates = function useListInvoiceTemplates(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listInvoiceTemplatesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetInvoiceTemplateById = function useGetInvoiceTemplateById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getInvoiceTemplateByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListInvoiceTemplatesByOwnerId = function useListInvoiceTemplatesByOwnerId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoiceTemplatesByOwnerIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListInvoiceTemplatesByVendorId = function useListInvoiceTemplatesByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoiceTemplatesByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListInvoiceTemplatesByBusinessId = function useListInvoiceTemplatesByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoiceTemplatesByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListInvoiceTemplatesByOrderId = function useListInvoiceTemplatesByOrderId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoiceTemplatesByOrderIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useSearchInvoiceTemplatesByOwnerAndName = function useSearchInvoiceTemplatesByOwnerAndName(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = searchInvoiceTemplatesByOwnerAndNameRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateStaffCourse = function useCreateStaffCourse(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createStaffCourseRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateStaffCourse = function useUpdateStaffCourse(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateStaffCourseRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteStaffCourse = function useDeleteStaffCourse(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteStaffCourseRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useGetStaffDocumentByKey = function useGetStaffDocumentByKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffDocumentByKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffDocumentsByStaffId = function useListStaffDocumentsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffDocumentsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffDocumentsByDocumentType = function useListStaffDocumentsByDocumentType(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffDocumentsByDocumentTypeRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffDocumentsByStatus = function useListStaffDocumentsByStatus(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffDocumentsByStatusRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateTask = function useCreateTask(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTaskRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateTask = function useUpdateTask(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTaskRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteTask = function useDeleteTask(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTaskRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListAccounts = function useListAccounts(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listAccountsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetAccountById = function useGetAccountById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getAccountByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetAccountsByOwnerId = function useGetAccountsByOwnerId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getAccountsByOwnerIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterAccounts = function useFilterAccounts(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterAccountsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListApplications = function useListApplications(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listApplicationsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetApplicationById = function useGetApplicationById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getApplicationByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetApplicationsByShiftId = function useGetApplicationsByShiftId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getApplicationsByShiftIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetApplicationsByShiftIdAndStatus = function useGetApplicationsByShiftIdAndStatus(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getApplicationsByShiftIdAndStatusRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetApplicationsByStaffId = function useGetApplicationsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getApplicationsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useVaidateDayStaffApplication = function useVaidateDayStaffApplication(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = vaidateDayStaffApplicationRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetApplicationByStaffShiftAndRole = function useGetApplicationByStaffShiftAndRole(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getApplicationByStaffShiftAndRoleRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListAcceptedApplicationsByShiftRoleKey = function useListAcceptedApplicationsByShiftRoleKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listAcceptedApplicationsByShiftRoleKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListAcceptedApplicationsByBusinessForDay = function useListAcceptedApplicationsByBusinessForDay(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listAcceptedApplicationsByBusinessForDayRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffsApplicationsByBusinessForDay = function useListStaffsApplicationsByBusinessForDay(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffsApplicationsByBusinessForDayRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListCompletedApplicationsByStaffId = function useListCompletedApplicationsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listCompletedApplicationsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListAttireOptions = function useListAttireOptions(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listAttireOptionsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetAttireOptionById = function useGetAttireOptionById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getAttireOptionByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterAttireOptions = function useFilterAttireOptions(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterAttireOptionsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateCertificate = function useCreateCertificate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createCertificateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateCertificate = function useUpdateCertificate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateCertificateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteCertificate = function useDeleteCertificate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteCertificateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListCustomRateCards = function useListCustomRateCards(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listCustomRateCardsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetCustomRateCardById = function useGetCustomRateCardById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getCustomRateCardByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateRole = function useCreateRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateRole = function useUpdateRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteRole = function useDeleteRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListRoleCategories = function useListRoleCategories(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listRoleCategoriesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetRoleCategoryById = function useGetRoleCategoryById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getRoleCategoryByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetRoleCategoriesByCategory = function useGetRoleCategoriesByCategory(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getRoleCategoriesByCategoryRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffAvailabilities = function useListStaffAvailabilities(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listStaffAvailabilitiesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffAvailabilitiesByStaffId = function useListStaffAvailabilitiesByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffAvailabilitiesByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetStaffAvailabilityByKey = function useGetStaffAvailabilityByKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffAvailabilityByKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffAvailabilitiesByDay = function useListStaffAvailabilitiesByDay(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffAvailabilitiesByDayRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListRecentPayments = function useListRecentPayments(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listRecentPaymentsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetRecentPaymentById = function useGetRecentPaymentById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getRecentPaymentByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListRecentPaymentsByStaffId = function useListRecentPaymentsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRecentPaymentsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListRecentPaymentsByApplicationId = function useListRecentPaymentsByApplicationId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRecentPaymentsByApplicationIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListRecentPaymentsByInvoiceId = function useListRecentPaymentsByInvoiceId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRecentPaymentsByInvoiceIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListRecentPaymentsByStatus = function useListRecentPaymentsByStatus(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRecentPaymentsByStatusRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListRecentPaymentsByInvoiceIds = function useListRecentPaymentsByInvoiceIds(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRecentPaymentsByInvoiceIdsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListRecentPaymentsByBusinessId = function useListRecentPaymentsByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRecentPaymentsByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListBusinesses = function useListBusinesses(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listBusinessesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetBusinessesByUserId = function useGetBusinessesByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getBusinessesByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetBusinessById = function useGetBusinessById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getBusinessByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateClientFeedback = function useCreateClientFeedback(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createClientFeedbackRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateClientFeedback = function useUpdateClientFeedback(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateClientFeedbackRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteClientFeedback = function useDeleteClientFeedback(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteClientFeedbackRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListConversations = function useListConversations(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listConversationsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetConversationById = function useGetConversationById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getConversationByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListConversationsByType = function useListConversationsByType(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listConversationsByTypeRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListConversationsByStatus = function useListConversationsByStatus(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listConversationsByStatusRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterConversations = function useFilterConversations(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterConversationsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListOrders = function useListOrders(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listOrdersRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetOrderById = function useGetOrderById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getOrderByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetOrdersByBusinessId = function useGetOrdersByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getOrdersByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetOrdersByVendorId = function useGetOrdersByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getOrdersByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetOrdersByStatus = function useGetOrdersByStatus(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getOrdersByStatusRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetOrdersByDateRange = function useGetOrdersByDateRange(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getOrdersByDateRangeRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetRapidOrders = function useGetRapidOrders(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = getRapidOrdersRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListOrdersByBusinessAndTeamHub = function useListOrdersByBusinessAndTeamHub(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listOrdersByBusinessAndTeamHubRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffRoles = function useListStaffRoles(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listStaffRolesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetStaffRoleByKey = function useGetStaffRoleByKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffRoleByKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffRolesByStaffId = function useListStaffRolesByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffRolesByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffRolesByRoleId = function useListStaffRolesByRoleId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffRolesByRoleIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterStaffRoles = function useFilterStaffRoles(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterStaffRolesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListTaskComments = function useListTaskComments(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listTaskCommentsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetTaskCommentById = function useGetTaskCommentById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTaskCommentByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetTaskCommentsByTaskId = function useGetTaskCommentsByTaskId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTaskCommentsByTaskIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateBusiness = function useCreateBusiness(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createBusinessRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateBusiness = function useUpdateBusiness(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateBusinessRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteBusiness = function useDeleteBusiness(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteBusinessRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateConversation = function useCreateConversation(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createConversationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateConversation = function useUpdateConversation(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateConversationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateConversationLastMessage = function useUpdateConversationLastMessage(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateConversationLastMessageRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteConversation = function useDeleteConversation(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteConversationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateCustomRateCard = function useCreateCustomRateCard(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createCustomRateCardRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateCustomRateCard = function useUpdateCustomRateCard(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateCustomRateCardRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteCustomRateCard = function useDeleteCustomRateCard(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteCustomRateCardRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListDocuments = function useListDocuments(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listDocumentsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetDocumentById = function useGetDocumentById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getDocumentByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterDocuments = function useFilterDocuments(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterDocumentsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateRecentPayment = function useCreateRecentPayment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createRecentPaymentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateRecentPayment = function useUpdateRecentPayment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateRecentPaymentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteRecentPayment = function useDeleteRecentPayment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteRecentPaymentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListShiftsForCoverage = function useListShiftsForCoverage(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForCoverageRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListApplicationsForCoverage = function useListApplicationsForCoverage(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listApplicationsForCoverageRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftsForDailyOpsByBusiness = function useListShiftsForDailyOpsByBusiness(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForDailyOpsByBusinessRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftsForDailyOpsByVendor = function useListShiftsForDailyOpsByVendor(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForDailyOpsByVendorRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListApplicationsForDailyOps = function useListApplicationsForDailyOps(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listApplicationsForDailyOpsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftsForForecastByBusiness = function useListShiftsForForecastByBusiness(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForForecastByBusinessRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftsForForecastByVendor = function useListShiftsForForecastByVendor(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForForecastByVendorRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftsForNoShowRangeByBusiness = function useListShiftsForNoShowRangeByBusiness(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForNoShowRangeByBusinessRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftsForNoShowRangeByVendor = function useListShiftsForNoShowRangeByVendor(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForNoShowRangeByVendorRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListApplicationsForNoShowRange = function useListApplicationsForNoShowRange(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listApplicationsForNoShowRangeRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffForNoShowReport = function useListStaffForNoShowReport(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffForNoShowReportRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListInvoicesForSpendByBusiness = function useListInvoicesForSpendByBusiness(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesForSpendByBusinessRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListInvoicesForSpendByVendor = function useListInvoicesForSpendByVendor(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesForSpendByVendorRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListInvoicesForSpendByOrder = function useListInvoicesForSpendByOrder(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesForSpendByOrderRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListTimesheetsForSpend = function useListTimesheetsForSpend(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listTimesheetsForSpendRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftsForPerformanceByBusiness = function useListShiftsForPerformanceByBusiness(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForPerformanceByBusinessRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftsForPerformanceByVendor = function useListShiftsForPerformanceByVendor(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftsForPerformanceByVendorRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListApplicationsForPerformance = function useListApplicationsForPerformance(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listApplicationsForPerformanceRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffForPerformance = function useListStaffForPerformance(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffForPerformanceRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateUser = function useCreateUser(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createUserRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateUser = function useUpdateUser(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateUserRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteUser = function useDeleteUser(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteUserRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateVendor = function useCreateVendor(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createVendorRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateVendor = function useUpdateVendor(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateVendorRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteVendor = function useDeleteVendor(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteVendorRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateDocument = function useCreateDocument(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createDocumentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateDocument = function useUpdateDocument(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateDocumentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteDocument = function useDeleteDocument(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteDocumentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListRoles = function useListRoles(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listRolesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetRoleById = function useGetRoleById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getRoleByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListRolesByVendorId = function useListRolesByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRolesByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListRolesByroleCategoryId = function useListRolesByroleCategoryId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listRolesByroleCategoryIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetShiftRoleById = function useGetShiftRoleById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getShiftRoleByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftRolesByShiftId = function useListShiftRolesByShiftId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByShiftIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftRolesByRoleId = function useListShiftRolesByRoleId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByRoleIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftRolesByShiftIdAndTimeRange = function useListShiftRolesByShiftIdAndTimeRange(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByShiftIdAndTimeRangeRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftRolesByVendorId = function useListShiftRolesByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftRolesByBusinessAndDateRange = function useListShiftRolesByBusinessAndDateRange(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByBusinessAndDateRangeRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftRolesByBusinessAndOrder = function useListShiftRolesByBusinessAndOrder(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByBusinessAndOrderRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftRolesByBusinessDateRangeCompletedOrders = function useListShiftRolesByBusinessDateRangeCompletedOrders(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByBusinessDateRangeCompletedOrdersRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListShiftRolesByBusinessAndDatesSummary = function useListShiftRolesByBusinessAndDatesSummary(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listShiftRolesByBusinessAndDatesSummaryRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetCompletedShiftsByBusinessId = function useGetCompletedShiftsByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getCompletedShiftsByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateTaskComment = function useCreateTaskComment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTaskCommentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateTaskComment = function useUpdateTaskComment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTaskCommentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteTaskComment = function useDeleteTaskComment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTaskCommentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListTaxForms = function useListTaxForms(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listTaxFormsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetTaxFormById = function useGetTaxFormById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTaxFormByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetTaxFormsByStaffId = function useGetTaxFormsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTaxFormsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListTaxFormsWhere = function useListTaxFormsWhere(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listTaxFormsWhereRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateVendorBenefitPlan = function useCreateVendorBenefitPlan(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createVendorBenefitPlanRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateVendorBenefitPlan = function useUpdateVendorBenefitPlan(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateVendorBenefitPlanRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteVendorBenefitPlan = function useDeleteVendorBenefitPlan(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteVendorBenefitPlanRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListFaqDatas = function useListFaqDatas(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listFaqDatasRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetFaqDataById = function useGetFaqDataById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getFaqDataByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterFaqDatas = function useFilterFaqDatas(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterFaqDatasRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateMessage = function useCreateMessage(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createMessageRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateMessage = function useUpdateMessage(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateMessageRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteMessage = function useDeleteMessage(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteMessageRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useGetStaffCourseById = function useGetStaffCourseById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffCourseByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffCoursesByStaffId = function useListStaffCoursesByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffCoursesByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListStaffCoursesByCourseId = function useListStaffCoursesByCourseId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listStaffCoursesByCourseIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetStaffCourseByStaffAndCourse = function useGetStaffCourseByStaffAndCourse(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffCourseByStaffAndCourseRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateWorkforce = function useCreateWorkforce(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createWorkforceRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateWorkforce = function useUpdateWorkforce(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateWorkforceRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeactivateWorkforce = function useDeactivateWorkforce(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deactivateWorkforceRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListActivityLogs = function useListActivityLogs(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listActivityLogsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetActivityLogById = function useGetActivityLogById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getActivityLogByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListActivityLogsByUserId = function useListActivityLogsByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listActivityLogsByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListUnreadActivityLogsByUserId = function useListUnreadActivityLogsByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listUnreadActivityLogsByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterActivityLogs = function useFilterActivityLogs(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterActivityLogsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListBenefitsData = function useListBenefitsData(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listBenefitsDataRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetBenefitsDataByKey = function useGetBenefitsDataByKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getBenefitsDataByKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListBenefitsDataByStaffId = function useListBenefitsDataByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listBenefitsDataByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListBenefitsDataByVendorBenefitPlanId = function useListBenefitsDataByVendorBenefitPlanId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listBenefitsDataByVendorBenefitPlanIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListBenefitsDataByVendorBenefitPlanIds = function useListBenefitsDataByVendorBenefitPlanIds(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listBenefitsDataByVendorBenefitPlanIdsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateFaqData = function useCreateFaqData(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createFaqDataRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateFaqData = function useUpdateFaqData(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateFaqDataRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteFaqData = function useDeleteFaqData(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteFaqDataRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateInvoice = function useCreateInvoice(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createInvoiceRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateInvoice = function useUpdateInvoice(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateInvoiceRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteInvoice = function useDeleteInvoice(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteInvoiceRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListStaff = function useListStaff(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listStaffRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetStaffById = function useGetStaffById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetStaffByUserId = function useGetStaffByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterStaff = function useFilterStaff(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterStaffRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListTasks = function useListTasks(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listTasksRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetTaskById = function useGetTaskById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTaskByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetTasksByOwnerId = function useGetTasksByOwnerId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTasksByOwnerIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterTasks = function useFilterTasks(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterTasksRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateTeamHub = function useCreateTeamHub(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTeamHubRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateTeamHub = function useUpdateTeamHub(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTeamHubRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteTeamHub = function useDeleteTeamHub(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTeamHubRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListTeamHubs = function useListTeamHubs(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listTeamHubsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetTeamHubById = function useGetTeamHubById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamHubByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetTeamHubsByTeamId = function useGetTeamHubsByTeamId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamHubsByTeamIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListTeamHubsByOwnerId = function useListTeamHubsByOwnerId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listTeamHubsByOwnerIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListClientFeedbacks = function useListClientFeedbacks(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listClientFeedbacksRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetClientFeedbackById = function useGetClientFeedbackById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getClientFeedbackByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListClientFeedbacksByBusinessId = function useListClientFeedbacksByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listClientFeedbacksByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListClientFeedbacksByVendorId = function useListClientFeedbacksByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listClientFeedbacksByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListClientFeedbacksByBusinessAndVendor = function useListClientFeedbacksByBusinessAndVendor(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listClientFeedbacksByBusinessAndVendorRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterClientFeedbacks = function useFilterClientFeedbacks(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterClientFeedbacksRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListClientFeedbackRatingsByVendorId = function useListClientFeedbackRatingsByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listClientFeedbackRatingsByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateHub = function useCreateHub(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createHubRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateHub = function useUpdateHub(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateHubRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteHub = function useDeleteHub(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteHubRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateRoleCategory = function useCreateRoleCategory(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createRoleCategoryRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateRoleCategory = function useUpdateRoleCategory(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateRoleCategoryRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteRoleCategory = function useDeleteRoleCategory(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteRoleCategoryRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateStaffAvailabilityStats = function useCreateStaffAvailabilityStats(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createStaffAvailabilityStatsRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateStaffAvailabilityStats = function useUpdateStaffAvailabilityStats(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateStaffAvailabilityStatsRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteStaffAvailabilityStats = function useDeleteStaffAvailabilityStats(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteStaffAvailabilityStatsRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListUsers = function useListUsers(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listUsersRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetUserById = function useGetUserById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getUserByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterUsers = function useFilterUsers(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterUsersRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetVendorById = function useGetVendorById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getVendorByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetVendorByUserId = function useGetVendorByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getVendorByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListVendors = function useListVendors(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listVendorsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListCategories = function useListCategories(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listCategoriesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetCategoryById = function useGetCategoryById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getCategoryByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterCategories = function useFilterCategories(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterCategoriesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListMessages = function useListMessages(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listMessagesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetMessageById = function useGetMessageById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getMessageByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetMessagesByConversationId = function useGetMessagesByConversationId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getMessagesByConversationIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateShiftRole = function useCreateShiftRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createShiftRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateShiftRole = function useUpdateShiftRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateShiftRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteShiftRole = function useDeleteShiftRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteShiftRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateStaffRole = function useCreateStaffRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createStaffRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteStaffRole = function useDeleteStaffRole(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteStaffRoleRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListUserConversations = function useListUserConversations(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listUserConversationsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetUserConversationByKey = function useGetUserConversationByKey(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getUserConversationByKeyRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListUserConversationsByUserId = function useListUserConversationsByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listUserConversationsByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListUnreadUserConversationsByUserId = function useListUnreadUserConversationsByUserId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listUnreadUserConversationsByUserIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListUserConversationsByConversationId = function useListUserConversationsByConversationId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listUserConversationsByConversationIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterUserConversations = function useFilterUserConversations(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterUserConversationsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateAccount = function useCreateAccount(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createAccountRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateAccount = function useUpdateAccount(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateAccountRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteAccount = function useDeleteAccount(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteAccountRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateApplication = function useCreateApplication(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createApplicationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateApplicationStatus = function useUpdateApplicationStatus(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateApplicationStatusRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteApplication = function useDeleteApplication(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteApplicationRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateAssignment = function useCreateAssignment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createAssignmentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateAssignment = function useUpdateAssignment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateAssignmentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteAssignment = function useDeleteAssignment(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteAssignmentRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListHubs = function useListHubs(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listHubsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetHubById = function useGetHubById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getHubByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetHubsByOwnerId = function useGetHubsByOwnerId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getHubsByOwnerIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterHubs = function useFilterHubs(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterHubsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListInvoices = function useListInvoices(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listInvoicesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetInvoiceById = function useGetInvoiceById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getInvoiceByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListInvoicesByVendorId = function useListInvoicesByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListInvoicesByBusinessId = function useListInvoicesByBusinessId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesByBusinessIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListInvoicesByOrderId = function useListInvoicesByOrderId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesByOrderIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListInvoicesByStatus = function useListInvoicesByStatus(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listInvoicesByStatusRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterInvoices = function useFilterInvoices(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterInvoicesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListOverdueInvoices = function useListOverdueInvoices(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listOverdueInvoicesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateInvoiceTemplate = function useCreateInvoiceTemplate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createInvoiceTemplateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateInvoiceTemplate = function useUpdateInvoiceTemplate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateInvoiceTemplateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteInvoiceTemplate = function useDeleteInvoiceTemplate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteInvoiceTemplateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateStaffAvailability = function useCreateStaffAvailability(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createStaffAvailabilityRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateStaffAvailability = function useUpdateStaffAvailability(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateStaffAvailabilityRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteStaffAvailability = function useDeleteStaffAvailability(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteStaffAvailabilityRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateTeamMember = function useCreateTeamMember(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTeamMemberRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateTeamMember = function useUpdateTeamMember(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTeamMemberRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateTeamMemberInviteStatus = function useUpdateTeamMemberInviteStatus(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTeamMemberInviteStatusRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useAcceptInviteByCode = function useAcceptInviteByCode(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return acceptInviteByCodeRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCancelInviteByCode = function useCancelInviteByCode(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return cancelInviteByCodeRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteTeamMember = function useDeleteTeamMember(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTeamMemberRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListCourses = function useListCourses(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listCoursesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetCourseById = function useGetCourseById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getCourseByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterCourses = function useFilterCourses(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterCoursesRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateLevel = function useCreateLevel(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createLevelRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateLevel = function useUpdateLevel(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateLevelRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteLevel = function useDeleteLevel(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteLevelRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateOrder = function useCreateOrder(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createOrderRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateOrder = function useUpdateOrder(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateOrderRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteOrder = function useDeleteOrder(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteOrderRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListVendorRates = function useListVendorRates(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listVendorRatesRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetVendorRateById = function useGetVendorRateById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getVendorRateByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetWorkforceById = function useGetWorkforceById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getWorkforceByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetWorkforceByVendorAndStaff = function useGetWorkforceByVendorAndStaff(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getWorkforceByVendorAndStaffRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListWorkforceByVendorId = function useListWorkforceByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listWorkforceByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListWorkforceByStaffId = function useListWorkforceByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listWorkforceByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetWorkforceByVendorAndNumber = function useGetWorkforceByVendorAndNumber(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getWorkforceByVendorAndNumberRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateCategory = function useCreateCategory(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createCategoryRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateCategory = function useUpdateCategory(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateCategoryRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteCategory = function useDeleteCategory(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteCategoryRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListStaffAvailabilityStats = function useListStaffAvailabilityStats(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listStaffAvailabilityStatsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetStaffAvailabilityStatsByStaffId = function useGetStaffAvailabilityStatsByStaffId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getStaffAvailabilityStatsByStaffIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterStaffAvailabilityStats = function useFilterStaffAvailabilityStats(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterStaffAvailabilityStatsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateTaxForm = function useCreateTaxForm(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createTaxFormRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateTaxForm = function useUpdateTaxForm(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateTaxFormRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteTaxForm = function useDeleteTaxForm(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteTaxFormRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListTeamHudDepartments = function useListTeamHudDepartments(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listTeamHudDepartmentsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetTeamHudDepartmentById = function useGetTeamHudDepartmentById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamHudDepartmentByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListTeamHudDepartmentsByTeamHubId = function useListTeamHudDepartmentsByTeamHubId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listTeamHudDepartmentsByTeamHubIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateVendorRate = function useCreateVendorRate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createVendorRateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateVendorRate = function useUpdateVendorRate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateVendorRateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteVendorRate = function useDeleteVendorRate(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteVendorRateRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateActivityLog = function useCreateActivityLog(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createActivityLogRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateActivityLog = function useUpdateActivityLog(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateActivityLogRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useMarkActivityLogAsRead = function useMarkActivityLogAsRead(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return markActivityLogAsReadRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useMarkActivityLogsAsRead = function useMarkActivityLogsAsRead(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return markActivityLogsAsReadRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteActivityLog = function useDeleteActivityLog(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteActivityLogRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListLevels = function useListLevels(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listLevelsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetLevelById = function useGetLevelById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getLevelByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterLevels = function useFilterLevels(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterLevelsRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} +exports.useCreateShift = function useCreateShift(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createShiftRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateShift = function useUpdateShift(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateShiftRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteShift = function useDeleteShift(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteShiftRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useCreateStaff = function useCreateStaff(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return createStaffRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useUpdateStaff = function useUpdateStaff(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return updateStaffRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useDeleteStaff = function useDeleteStaff(dcOrOptions, options) { + const { dc: dcInstance, vars: inputOpts } = validateArgs(connectorConfig, dcOrOptions, options); + function refFactory(vars) { + return deleteStaffRef(dcInstance, vars); + } + return useDataConnectMutation(refFactory, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + + +exports.useListTeams = function useListTeams(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listTeamsRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetTeamById = function useGetTeamById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetTeamsByOwnerId = function useGetTeamsByOwnerId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamsByOwnerIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListTeamMembers = function useListTeamMembers(dcOrOptions, options) { + const { dc: dcInstance, options: inputOpts } = validateReactArgs(connectorConfig, dcOrOptions, options); + const ref = listTeamMembersRef(dcInstance); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetTeamMemberById = function useGetTeamMemberById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamMemberByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetTeamMembersByTeamId = function useGetTeamMembersByTeamId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getTeamMembersByTeamIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListVendorBenefitPlans = function useListVendorBenefitPlans(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = listVendorBenefitPlansRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useGetVendorBenefitPlanById = function useGetVendorBenefitPlanById(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = getVendorBenefitPlanByIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListVendorBenefitPlansByVendorId = function useListVendorBenefitPlansByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listVendorBenefitPlansByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useListActiveVendorBenefitPlansByVendorId = function useListActiveVendorBenefitPlansByVendorId(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, true); + const ref = listActiveVendorBenefitPlansByVendorIdRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} + +exports.useFilterVendorBenefitPlans = function useFilterVendorBenefitPlans(dcOrVars, varsOrOptions, options) { + const { dc: dcInstance, vars: inputVars, options: inputOpts } = validateReactArgs(connectorConfig, dcOrVars, varsOrOptions, options, true, false); + const ref = filterVendorBenefitPlansRef(dcInstance, inputVars); + return useDataConnectQuery(ref, inputOpts, CallerSdkTypeEnum.GeneratedReact); +} \ No newline at end of file diff --git a/apps/web/src/dataconnect-generated/react/index.d.ts b/apps/web/src/dataconnect-generated/react/index.d.ts new file mode 100644 index 00000000..d931c518 --- /dev/null +++ b/apps/web/src/dataconnect-generated/react/index.d.ts @@ -0,0 +1,1125 @@ +import { CreateBenefitsDataData, CreateBenefitsDataVariables, UpdateBenefitsDataData, UpdateBenefitsDataVariables, DeleteBenefitsDataData, DeleteBenefitsDataVariables, ListShiftsData, ListShiftsVariables, GetShiftByIdData, GetShiftByIdVariables, FilterShiftsData, FilterShiftsVariables, GetShiftsByBusinessIdData, GetShiftsByBusinessIdVariables, GetShiftsByVendorIdData, GetShiftsByVendorIdVariables, CreateStaffDocumentData, CreateStaffDocumentVariables, UpdateStaffDocumentData, UpdateStaffDocumentVariables, DeleteStaffDocumentData, DeleteStaffDocumentVariables, ListEmergencyContactsData, GetEmergencyContactByIdData, GetEmergencyContactByIdVariables, GetEmergencyContactsByStaffIdData, GetEmergencyContactsByStaffIdVariables, GetMyTasksData, GetMyTasksVariables, GetMemberTaskByIdKeyData, GetMemberTaskByIdKeyVariables, GetMemberTasksByTaskIdData, GetMemberTasksByTaskIdVariables, CreateTeamHudDepartmentData, CreateTeamHudDepartmentVariables, UpdateTeamHudDepartmentData, UpdateTeamHudDepartmentVariables, DeleteTeamHudDepartmentData, DeleteTeamHudDepartmentVariables, ListCertificatesData, GetCertificateByIdData, GetCertificateByIdVariables, ListCertificatesByStaffIdData, ListCertificatesByStaffIdVariables, CreateMemberTaskData, CreateMemberTaskVariables, DeleteMemberTaskData, DeleteMemberTaskVariables, CreateTeamData, CreateTeamVariables, UpdateTeamData, UpdateTeamVariables, DeleteTeamData, DeleteTeamVariables, CreateUserConversationData, CreateUserConversationVariables, UpdateUserConversationData, UpdateUserConversationVariables, MarkConversationAsReadData, MarkConversationAsReadVariables, IncrementUnreadForUserData, IncrementUnreadForUserVariables, DeleteUserConversationData, DeleteUserConversationVariables, ListAssignmentsData, ListAssignmentsVariables, GetAssignmentByIdData, GetAssignmentByIdVariables, ListAssignmentsByWorkforceIdData, ListAssignmentsByWorkforceIdVariables, ListAssignmentsByWorkforceIdsData, ListAssignmentsByWorkforceIdsVariables, ListAssignmentsByShiftRoleData, ListAssignmentsByShiftRoleVariables, FilterAssignmentsData, FilterAssignmentsVariables, CreateAttireOptionData, CreateAttireOptionVariables, UpdateAttireOptionData, UpdateAttireOptionVariables, DeleteAttireOptionData, DeleteAttireOptionVariables, CreateCourseData, CreateCourseVariables, UpdateCourseData, UpdateCourseVariables, DeleteCourseData, DeleteCourseVariables, CreateEmergencyContactData, CreateEmergencyContactVariables, UpdateEmergencyContactData, UpdateEmergencyContactVariables, DeleteEmergencyContactData, DeleteEmergencyContactVariables, ListInvoiceTemplatesData, ListInvoiceTemplatesVariables, GetInvoiceTemplateByIdData, GetInvoiceTemplateByIdVariables, ListInvoiceTemplatesByOwnerIdData, ListInvoiceTemplatesByOwnerIdVariables, ListInvoiceTemplatesByVendorIdData, ListInvoiceTemplatesByVendorIdVariables, ListInvoiceTemplatesByBusinessIdData, ListInvoiceTemplatesByBusinessIdVariables, ListInvoiceTemplatesByOrderIdData, ListInvoiceTemplatesByOrderIdVariables, SearchInvoiceTemplatesByOwnerAndNameData, SearchInvoiceTemplatesByOwnerAndNameVariables, CreateStaffCourseData, CreateStaffCourseVariables, UpdateStaffCourseData, UpdateStaffCourseVariables, DeleteStaffCourseData, DeleteStaffCourseVariables, GetStaffDocumentByKeyData, GetStaffDocumentByKeyVariables, ListStaffDocumentsByStaffIdData, ListStaffDocumentsByStaffIdVariables, ListStaffDocumentsByDocumentTypeData, ListStaffDocumentsByDocumentTypeVariables, ListStaffDocumentsByStatusData, ListStaffDocumentsByStatusVariables, CreateTaskData, CreateTaskVariables, UpdateTaskData, UpdateTaskVariables, DeleteTaskData, DeleteTaskVariables, ListAccountsData, GetAccountByIdData, GetAccountByIdVariables, GetAccountsByOwnerIdData, GetAccountsByOwnerIdVariables, FilterAccountsData, FilterAccountsVariables, ListApplicationsData, GetApplicationByIdData, GetApplicationByIdVariables, GetApplicationsByShiftIdData, GetApplicationsByShiftIdVariables, GetApplicationsByShiftIdAndStatusData, GetApplicationsByShiftIdAndStatusVariables, GetApplicationsByStaffIdData, GetApplicationsByStaffIdVariables, VaidateDayStaffApplicationData, VaidateDayStaffApplicationVariables, GetApplicationByStaffShiftAndRoleData, GetApplicationByStaffShiftAndRoleVariables, ListAcceptedApplicationsByShiftRoleKeyData, ListAcceptedApplicationsByShiftRoleKeyVariables, ListAcceptedApplicationsByBusinessForDayData, ListAcceptedApplicationsByBusinessForDayVariables, ListStaffsApplicationsByBusinessForDayData, ListStaffsApplicationsByBusinessForDayVariables, ListCompletedApplicationsByStaffIdData, ListCompletedApplicationsByStaffIdVariables, ListAttireOptionsData, GetAttireOptionByIdData, GetAttireOptionByIdVariables, FilterAttireOptionsData, FilterAttireOptionsVariables, CreateCertificateData, CreateCertificateVariables, UpdateCertificateData, UpdateCertificateVariables, DeleteCertificateData, DeleteCertificateVariables, ListCustomRateCardsData, GetCustomRateCardByIdData, GetCustomRateCardByIdVariables, CreateRoleData, CreateRoleVariables, UpdateRoleData, UpdateRoleVariables, DeleteRoleData, DeleteRoleVariables, ListRoleCategoriesData, GetRoleCategoryByIdData, GetRoleCategoryByIdVariables, GetRoleCategoriesByCategoryData, GetRoleCategoriesByCategoryVariables, ListStaffAvailabilitiesData, ListStaffAvailabilitiesVariables, ListStaffAvailabilitiesByStaffIdData, ListStaffAvailabilitiesByStaffIdVariables, GetStaffAvailabilityByKeyData, GetStaffAvailabilityByKeyVariables, ListStaffAvailabilitiesByDayData, ListStaffAvailabilitiesByDayVariables, ListRecentPaymentsData, ListRecentPaymentsVariables, GetRecentPaymentByIdData, GetRecentPaymentByIdVariables, ListRecentPaymentsByStaffIdData, ListRecentPaymentsByStaffIdVariables, ListRecentPaymentsByApplicationIdData, ListRecentPaymentsByApplicationIdVariables, ListRecentPaymentsByInvoiceIdData, ListRecentPaymentsByInvoiceIdVariables, ListRecentPaymentsByStatusData, ListRecentPaymentsByStatusVariables, ListRecentPaymentsByInvoiceIdsData, ListRecentPaymentsByInvoiceIdsVariables, ListRecentPaymentsByBusinessIdData, ListRecentPaymentsByBusinessIdVariables, ListBusinessesData, GetBusinessesByUserIdData, GetBusinessesByUserIdVariables, GetBusinessByIdData, GetBusinessByIdVariables, CreateClientFeedbackData, CreateClientFeedbackVariables, UpdateClientFeedbackData, UpdateClientFeedbackVariables, DeleteClientFeedbackData, DeleteClientFeedbackVariables, ListConversationsData, ListConversationsVariables, GetConversationByIdData, GetConversationByIdVariables, ListConversationsByTypeData, ListConversationsByTypeVariables, ListConversationsByStatusData, ListConversationsByStatusVariables, FilterConversationsData, FilterConversationsVariables, ListOrdersData, ListOrdersVariables, GetOrderByIdData, GetOrderByIdVariables, GetOrdersByBusinessIdData, GetOrdersByBusinessIdVariables, GetOrdersByVendorIdData, GetOrdersByVendorIdVariables, GetOrdersByStatusData, GetOrdersByStatusVariables, GetOrdersByDateRangeData, GetOrdersByDateRangeVariables, GetRapidOrdersData, GetRapidOrdersVariables, ListOrdersByBusinessAndTeamHubData, ListOrdersByBusinessAndTeamHubVariables, ListStaffRolesData, ListStaffRolesVariables, GetStaffRoleByKeyData, GetStaffRoleByKeyVariables, ListStaffRolesByStaffIdData, ListStaffRolesByStaffIdVariables, ListStaffRolesByRoleIdData, ListStaffRolesByRoleIdVariables, FilterStaffRolesData, FilterStaffRolesVariables, ListTaskCommentsData, GetTaskCommentByIdData, GetTaskCommentByIdVariables, GetTaskCommentsByTaskIdData, GetTaskCommentsByTaskIdVariables, CreateBusinessData, CreateBusinessVariables, UpdateBusinessData, UpdateBusinessVariables, DeleteBusinessData, DeleteBusinessVariables, CreateConversationData, CreateConversationVariables, UpdateConversationData, UpdateConversationVariables, UpdateConversationLastMessageData, UpdateConversationLastMessageVariables, DeleteConversationData, DeleteConversationVariables, CreateCustomRateCardData, CreateCustomRateCardVariables, UpdateCustomRateCardData, UpdateCustomRateCardVariables, DeleteCustomRateCardData, DeleteCustomRateCardVariables, ListDocumentsData, GetDocumentByIdData, GetDocumentByIdVariables, FilterDocumentsData, FilterDocumentsVariables, CreateRecentPaymentData, CreateRecentPaymentVariables, UpdateRecentPaymentData, UpdateRecentPaymentVariables, DeleteRecentPaymentData, DeleteRecentPaymentVariables, ListShiftsForCoverageData, ListShiftsForCoverageVariables, ListApplicationsForCoverageData, ListApplicationsForCoverageVariables, ListShiftsForDailyOpsByBusinessData, ListShiftsForDailyOpsByBusinessVariables, ListShiftsForDailyOpsByVendorData, ListShiftsForDailyOpsByVendorVariables, ListApplicationsForDailyOpsData, ListApplicationsForDailyOpsVariables, ListShiftsForForecastByBusinessData, ListShiftsForForecastByBusinessVariables, ListShiftsForForecastByVendorData, ListShiftsForForecastByVendorVariables, ListShiftsForNoShowRangeByBusinessData, ListShiftsForNoShowRangeByBusinessVariables, ListShiftsForNoShowRangeByVendorData, ListShiftsForNoShowRangeByVendorVariables, ListApplicationsForNoShowRangeData, ListApplicationsForNoShowRangeVariables, ListStaffForNoShowReportData, ListStaffForNoShowReportVariables, ListInvoicesForSpendByBusinessData, ListInvoicesForSpendByBusinessVariables, ListInvoicesForSpendByVendorData, ListInvoicesForSpendByVendorVariables, ListInvoicesForSpendByOrderData, ListInvoicesForSpendByOrderVariables, ListTimesheetsForSpendData, ListTimesheetsForSpendVariables, ListShiftsForPerformanceByBusinessData, ListShiftsForPerformanceByBusinessVariables, ListShiftsForPerformanceByVendorData, ListShiftsForPerformanceByVendorVariables, ListApplicationsForPerformanceData, ListApplicationsForPerformanceVariables, ListStaffForPerformanceData, ListStaffForPerformanceVariables, CreateUserData, CreateUserVariables, UpdateUserData, UpdateUserVariables, DeleteUserData, DeleteUserVariables, CreateVendorData, CreateVendorVariables, UpdateVendorData, UpdateVendorVariables, DeleteVendorData, DeleteVendorVariables, CreateDocumentData, CreateDocumentVariables, UpdateDocumentData, UpdateDocumentVariables, DeleteDocumentData, DeleteDocumentVariables, ListRolesData, GetRoleByIdData, GetRoleByIdVariables, ListRolesByVendorIdData, ListRolesByVendorIdVariables, ListRolesByroleCategoryIdData, ListRolesByroleCategoryIdVariables, GetShiftRoleByIdData, GetShiftRoleByIdVariables, ListShiftRolesByShiftIdData, ListShiftRolesByShiftIdVariables, ListShiftRolesByRoleIdData, ListShiftRolesByRoleIdVariables, ListShiftRolesByShiftIdAndTimeRangeData, ListShiftRolesByShiftIdAndTimeRangeVariables, ListShiftRolesByVendorIdData, ListShiftRolesByVendorIdVariables, ListShiftRolesByBusinessAndDateRangeData, ListShiftRolesByBusinessAndDateRangeVariables, ListShiftRolesByBusinessAndOrderData, ListShiftRolesByBusinessAndOrderVariables, ListShiftRolesByBusinessDateRangeCompletedOrdersData, ListShiftRolesByBusinessDateRangeCompletedOrdersVariables, ListShiftRolesByBusinessAndDatesSummaryData, ListShiftRolesByBusinessAndDatesSummaryVariables, GetCompletedShiftsByBusinessIdData, GetCompletedShiftsByBusinessIdVariables, CreateTaskCommentData, CreateTaskCommentVariables, UpdateTaskCommentData, UpdateTaskCommentVariables, DeleteTaskCommentData, DeleteTaskCommentVariables, ListTaxFormsData, ListTaxFormsVariables, GetTaxFormByIdData, GetTaxFormByIdVariables, GetTaxFormsByStaffIdData, GetTaxFormsByStaffIdVariables, ListTaxFormsWhereData, ListTaxFormsWhereVariables, CreateVendorBenefitPlanData, CreateVendorBenefitPlanVariables, UpdateVendorBenefitPlanData, UpdateVendorBenefitPlanVariables, DeleteVendorBenefitPlanData, DeleteVendorBenefitPlanVariables, ListFaqDatasData, GetFaqDataByIdData, GetFaqDataByIdVariables, FilterFaqDatasData, FilterFaqDatasVariables, CreateMessageData, CreateMessageVariables, UpdateMessageData, UpdateMessageVariables, DeleteMessageData, DeleteMessageVariables, GetStaffCourseByIdData, GetStaffCourseByIdVariables, ListStaffCoursesByStaffIdData, ListStaffCoursesByStaffIdVariables, ListStaffCoursesByCourseIdData, ListStaffCoursesByCourseIdVariables, GetStaffCourseByStaffAndCourseData, GetStaffCourseByStaffAndCourseVariables, CreateWorkforceData, CreateWorkforceVariables, UpdateWorkforceData, UpdateWorkforceVariables, DeactivateWorkforceData, DeactivateWorkforceVariables, ListActivityLogsData, ListActivityLogsVariables, GetActivityLogByIdData, GetActivityLogByIdVariables, ListActivityLogsByUserIdData, ListActivityLogsByUserIdVariables, ListUnreadActivityLogsByUserIdData, ListUnreadActivityLogsByUserIdVariables, FilterActivityLogsData, FilterActivityLogsVariables, ListBenefitsDataData, ListBenefitsDataVariables, GetBenefitsDataByKeyData, GetBenefitsDataByKeyVariables, ListBenefitsDataByStaffIdData, ListBenefitsDataByStaffIdVariables, ListBenefitsDataByVendorBenefitPlanIdData, ListBenefitsDataByVendorBenefitPlanIdVariables, ListBenefitsDataByVendorBenefitPlanIdsData, ListBenefitsDataByVendorBenefitPlanIdsVariables, CreateFaqDataData, CreateFaqDataVariables, UpdateFaqDataData, UpdateFaqDataVariables, DeleteFaqDataData, DeleteFaqDataVariables, CreateInvoiceData, CreateInvoiceVariables, UpdateInvoiceData, UpdateInvoiceVariables, DeleteInvoiceData, DeleteInvoiceVariables, ListStaffData, GetStaffByIdData, GetStaffByIdVariables, GetStaffByUserIdData, GetStaffByUserIdVariables, FilterStaffData, FilterStaffVariables, ListTasksData, GetTaskByIdData, GetTaskByIdVariables, GetTasksByOwnerIdData, GetTasksByOwnerIdVariables, FilterTasksData, FilterTasksVariables, CreateTeamHubData, CreateTeamHubVariables, UpdateTeamHubData, UpdateTeamHubVariables, DeleteTeamHubData, DeleteTeamHubVariables, ListTeamHubsData, ListTeamHubsVariables, GetTeamHubByIdData, GetTeamHubByIdVariables, GetTeamHubsByTeamIdData, GetTeamHubsByTeamIdVariables, ListTeamHubsByOwnerIdData, ListTeamHubsByOwnerIdVariables, ListClientFeedbacksData, ListClientFeedbacksVariables, GetClientFeedbackByIdData, GetClientFeedbackByIdVariables, ListClientFeedbacksByBusinessIdData, ListClientFeedbacksByBusinessIdVariables, ListClientFeedbacksByVendorIdData, ListClientFeedbacksByVendorIdVariables, ListClientFeedbacksByBusinessAndVendorData, ListClientFeedbacksByBusinessAndVendorVariables, FilterClientFeedbacksData, FilterClientFeedbacksVariables, ListClientFeedbackRatingsByVendorIdData, ListClientFeedbackRatingsByVendorIdVariables, CreateHubData, CreateHubVariables, UpdateHubData, UpdateHubVariables, DeleteHubData, DeleteHubVariables, CreateRoleCategoryData, CreateRoleCategoryVariables, UpdateRoleCategoryData, UpdateRoleCategoryVariables, DeleteRoleCategoryData, DeleteRoleCategoryVariables, CreateStaffAvailabilityStatsData, CreateStaffAvailabilityStatsVariables, UpdateStaffAvailabilityStatsData, UpdateStaffAvailabilityStatsVariables, DeleteStaffAvailabilityStatsData, DeleteStaffAvailabilityStatsVariables, ListUsersData, GetUserByIdData, GetUserByIdVariables, FilterUsersData, FilterUsersVariables, GetVendorByIdData, GetVendorByIdVariables, GetVendorByUserIdData, GetVendorByUserIdVariables, ListVendorsData, ListCategoriesData, GetCategoryByIdData, GetCategoryByIdVariables, FilterCategoriesData, FilterCategoriesVariables, ListMessagesData, GetMessageByIdData, GetMessageByIdVariables, GetMessagesByConversationIdData, GetMessagesByConversationIdVariables, CreateShiftRoleData, CreateShiftRoleVariables, UpdateShiftRoleData, UpdateShiftRoleVariables, DeleteShiftRoleData, DeleteShiftRoleVariables, CreateStaffRoleData, CreateStaffRoleVariables, DeleteStaffRoleData, DeleteStaffRoleVariables, ListUserConversationsData, ListUserConversationsVariables, GetUserConversationByKeyData, GetUserConversationByKeyVariables, ListUserConversationsByUserIdData, ListUserConversationsByUserIdVariables, ListUnreadUserConversationsByUserIdData, ListUnreadUserConversationsByUserIdVariables, ListUserConversationsByConversationIdData, ListUserConversationsByConversationIdVariables, FilterUserConversationsData, FilterUserConversationsVariables, CreateAccountData, CreateAccountVariables, UpdateAccountData, UpdateAccountVariables, DeleteAccountData, DeleteAccountVariables, CreateApplicationData, CreateApplicationVariables, UpdateApplicationStatusData, UpdateApplicationStatusVariables, DeleteApplicationData, DeleteApplicationVariables, CreateAssignmentData, CreateAssignmentVariables, UpdateAssignmentData, UpdateAssignmentVariables, DeleteAssignmentData, DeleteAssignmentVariables, ListHubsData, GetHubByIdData, GetHubByIdVariables, GetHubsByOwnerIdData, GetHubsByOwnerIdVariables, FilterHubsData, FilterHubsVariables, ListInvoicesData, ListInvoicesVariables, GetInvoiceByIdData, GetInvoiceByIdVariables, ListInvoicesByVendorIdData, ListInvoicesByVendorIdVariables, ListInvoicesByBusinessIdData, ListInvoicesByBusinessIdVariables, ListInvoicesByOrderIdData, ListInvoicesByOrderIdVariables, ListInvoicesByStatusData, ListInvoicesByStatusVariables, FilterInvoicesData, FilterInvoicesVariables, ListOverdueInvoicesData, ListOverdueInvoicesVariables, CreateInvoiceTemplateData, CreateInvoiceTemplateVariables, UpdateInvoiceTemplateData, UpdateInvoiceTemplateVariables, DeleteInvoiceTemplateData, DeleteInvoiceTemplateVariables, CreateStaffAvailabilityData, CreateStaffAvailabilityVariables, UpdateStaffAvailabilityData, UpdateStaffAvailabilityVariables, DeleteStaffAvailabilityData, DeleteStaffAvailabilityVariables, CreateTeamMemberData, CreateTeamMemberVariables, UpdateTeamMemberData, UpdateTeamMemberVariables, UpdateTeamMemberInviteStatusData, UpdateTeamMemberInviteStatusVariables, AcceptInviteByCodeData, AcceptInviteByCodeVariables, CancelInviteByCodeData, CancelInviteByCodeVariables, DeleteTeamMemberData, DeleteTeamMemberVariables, ListCoursesData, GetCourseByIdData, GetCourseByIdVariables, FilterCoursesData, FilterCoursesVariables, CreateLevelData, CreateLevelVariables, UpdateLevelData, UpdateLevelVariables, DeleteLevelData, DeleteLevelVariables, CreateOrderData, CreateOrderVariables, UpdateOrderData, UpdateOrderVariables, DeleteOrderData, DeleteOrderVariables, ListVendorRatesData, GetVendorRateByIdData, GetVendorRateByIdVariables, GetWorkforceByIdData, GetWorkforceByIdVariables, GetWorkforceByVendorAndStaffData, GetWorkforceByVendorAndStaffVariables, ListWorkforceByVendorIdData, ListWorkforceByVendorIdVariables, ListWorkforceByStaffIdData, ListWorkforceByStaffIdVariables, GetWorkforceByVendorAndNumberData, GetWorkforceByVendorAndNumberVariables, CreateCategoryData, CreateCategoryVariables, UpdateCategoryData, UpdateCategoryVariables, DeleteCategoryData, DeleteCategoryVariables, ListStaffAvailabilityStatsData, ListStaffAvailabilityStatsVariables, GetStaffAvailabilityStatsByStaffIdData, GetStaffAvailabilityStatsByStaffIdVariables, FilterStaffAvailabilityStatsData, FilterStaffAvailabilityStatsVariables, CreateTaxFormData, CreateTaxFormVariables, UpdateTaxFormData, UpdateTaxFormVariables, DeleteTaxFormData, DeleteTaxFormVariables, ListTeamHudDepartmentsData, ListTeamHudDepartmentsVariables, GetTeamHudDepartmentByIdData, GetTeamHudDepartmentByIdVariables, ListTeamHudDepartmentsByTeamHubIdData, ListTeamHudDepartmentsByTeamHubIdVariables, CreateVendorRateData, CreateVendorRateVariables, UpdateVendorRateData, UpdateVendorRateVariables, DeleteVendorRateData, DeleteVendorRateVariables, CreateActivityLogData, CreateActivityLogVariables, UpdateActivityLogData, UpdateActivityLogVariables, MarkActivityLogAsReadData, MarkActivityLogAsReadVariables, MarkActivityLogsAsReadData, MarkActivityLogsAsReadVariables, DeleteActivityLogData, DeleteActivityLogVariables, ListLevelsData, GetLevelByIdData, GetLevelByIdVariables, FilterLevelsData, FilterLevelsVariables, CreateShiftData, CreateShiftVariables, UpdateShiftData, UpdateShiftVariables, DeleteShiftData, DeleteShiftVariables, CreateStaffData, CreateStaffVariables, UpdateStaffData, UpdateStaffVariables, DeleteStaffData, DeleteStaffVariables, ListTeamsData, GetTeamByIdData, GetTeamByIdVariables, GetTeamsByOwnerIdData, GetTeamsByOwnerIdVariables, ListTeamMembersData, GetTeamMemberByIdData, GetTeamMemberByIdVariables, GetTeamMembersByTeamIdData, GetTeamMembersByTeamIdVariables, ListVendorBenefitPlansData, ListVendorBenefitPlansVariables, GetVendorBenefitPlanByIdData, GetVendorBenefitPlanByIdVariables, ListVendorBenefitPlansByVendorIdData, ListVendorBenefitPlansByVendorIdVariables, ListActiveVendorBenefitPlansByVendorIdData, ListActiveVendorBenefitPlansByVendorIdVariables, FilterVendorBenefitPlansData, FilterVendorBenefitPlansVariables } from '../'; +import { UseDataConnectQueryResult, useDataConnectQueryOptions, UseDataConnectMutationResult, useDataConnectMutationOptions} from '@tanstack-query-firebase/react/data-connect'; +import { UseQueryResult, UseMutationResult} from '@tanstack/react-query'; +import { DataConnect } from 'firebase/data-connect'; +import { FirebaseError } from 'firebase/app'; + + +export function useCreateBenefitsData(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateBenefitsData(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateBenefitsData(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateBenefitsData(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteBenefitsData(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteBenefitsData(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListShifts(vars?: ListShiftsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShifts(dc: DataConnect, vars?: ListShiftsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetShiftById(vars: GetShiftByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetShiftById(dc: DataConnect, vars: GetShiftByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterShifts(vars?: FilterShiftsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterShifts(dc: DataConnect, vars?: FilterShiftsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetShiftsByBusinessId(vars: GetShiftsByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetShiftsByBusinessId(dc: DataConnect, vars: GetShiftsByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetShiftsByVendorId(vars: GetShiftsByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetShiftsByVendorId(dc: DataConnect, vars: GetShiftsByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateStaffDocument(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateStaffDocument(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateStaffDocument(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateStaffDocument(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteStaffDocument(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteStaffDocument(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListEmergencyContacts(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListEmergencyContacts(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetEmergencyContactById(vars: GetEmergencyContactByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetEmergencyContactById(dc: DataConnect, vars: GetEmergencyContactByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetEmergencyContactsByStaffId(vars: GetEmergencyContactsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetEmergencyContactsByStaffId(dc: DataConnect, vars: GetEmergencyContactsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetMyTasks(vars: GetMyTasksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetMyTasks(dc: DataConnect, vars: GetMyTasksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetMemberTaskByIdKey(vars: GetMemberTaskByIdKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetMemberTaskByIdKey(dc: DataConnect, vars: GetMemberTaskByIdKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetMemberTasksByTaskId(vars: GetMemberTasksByTaskIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetMemberTasksByTaskId(dc: DataConnect, vars: GetMemberTasksByTaskIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateTeamHudDepartment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateTeamHudDepartment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateTeamHudDepartment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateTeamHudDepartment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteTeamHudDepartment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteTeamHudDepartment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListCertificates(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListCertificates(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetCertificateById(vars: GetCertificateByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetCertificateById(dc: DataConnect, vars: GetCertificateByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListCertificatesByStaffId(vars: ListCertificatesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListCertificatesByStaffId(dc: DataConnect, vars: ListCertificatesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateMemberTask(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateMemberTask(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteMemberTask(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteMemberTask(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateTeam(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateTeam(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateTeam(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateTeam(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteTeam(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteTeam(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateUserConversation(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateUserConversation(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateUserConversation(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateUserConversation(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useMarkConversationAsRead(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useMarkConversationAsRead(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useIncrementUnreadForUser(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useIncrementUnreadForUser(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteUserConversation(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteUserConversation(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListAssignments(vars?: ListAssignmentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListAssignments(dc: DataConnect, vars?: ListAssignmentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetAssignmentById(vars: GetAssignmentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetAssignmentById(dc: DataConnect, vars: GetAssignmentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListAssignmentsByWorkforceId(vars: ListAssignmentsByWorkforceIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListAssignmentsByWorkforceId(dc: DataConnect, vars: ListAssignmentsByWorkforceIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListAssignmentsByWorkforceIds(vars: ListAssignmentsByWorkforceIdsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListAssignmentsByWorkforceIds(dc: DataConnect, vars: ListAssignmentsByWorkforceIdsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListAssignmentsByShiftRole(vars: ListAssignmentsByShiftRoleVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListAssignmentsByShiftRole(dc: DataConnect, vars: ListAssignmentsByShiftRoleVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterAssignments(vars: FilterAssignmentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterAssignments(dc: DataConnect, vars: FilterAssignmentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateAttireOption(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateAttireOption(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateAttireOption(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateAttireOption(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteAttireOption(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteAttireOption(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateCourse(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateCourse(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateCourse(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateCourse(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteCourse(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteCourse(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateEmergencyContact(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateEmergencyContact(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateEmergencyContact(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateEmergencyContact(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteEmergencyContact(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteEmergencyContact(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListInvoiceTemplates(vars?: ListInvoiceTemplatesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListInvoiceTemplates(dc: DataConnect, vars?: ListInvoiceTemplatesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetInvoiceTemplateById(vars: GetInvoiceTemplateByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetInvoiceTemplateById(dc: DataConnect, vars: GetInvoiceTemplateByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListInvoiceTemplatesByOwnerId(vars: ListInvoiceTemplatesByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListInvoiceTemplatesByOwnerId(dc: DataConnect, vars: ListInvoiceTemplatesByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListInvoiceTemplatesByVendorId(vars: ListInvoiceTemplatesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListInvoiceTemplatesByVendorId(dc: DataConnect, vars: ListInvoiceTemplatesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListInvoiceTemplatesByBusinessId(vars: ListInvoiceTemplatesByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListInvoiceTemplatesByBusinessId(dc: DataConnect, vars: ListInvoiceTemplatesByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListInvoiceTemplatesByOrderId(vars: ListInvoiceTemplatesByOrderIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListInvoiceTemplatesByOrderId(dc: DataConnect, vars: ListInvoiceTemplatesByOrderIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useSearchInvoiceTemplatesByOwnerAndName(vars: SearchInvoiceTemplatesByOwnerAndNameVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useSearchInvoiceTemplatesByOwnerAndName(dc: DataConnect, vars: SearchInvoiceTemplatesByOwnerAndNameVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateStaffCourse(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateStaffCourse(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateStaffCourse(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateStaffCourse(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteStaffCourse(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteStaffCourse(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useGetStaffDocumentByKey(vars: GetStaffDocumentByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetStaffDocumentByKey(dc: DataConnect, vars: GetStaffDocumentByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffDocumentsByStaffId(vars: ListStaffDocumentsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffDocumentsByStaffId(dc: DataConnect, vars: ListStaffDocumentsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffDocumentsByDocumentType(vars: ListStaffDocumentsByDocumentTypeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffDocumentsByDocumentType(dc: DataConnect, vars: ListStaffDocumentsByDocumentTypeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffDocumentsByStatus(vars: ListStaffDocumentsByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffDocumentsByStatus(dc: DataConnect, vars: ListStaffDocumentsByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateTask(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateTask(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateTask(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateTask(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteTask(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteTask(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListAccounts(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListAccounts(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetAccountById(vars: GetAccountByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetAccountById(dc: DataConnect, vars: GetAccountByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetAccountsByOwnerId(vars: GetAccountsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetAccountsByOwnerId(dc: DataConnect, vars: GetAccountsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterAccounts(vars?: FilterAccountsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterAccounts(dc: DataConnect, vars?: FilterAccountsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListApplications(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListApplications(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetApplicationById(vars: GetApplicationByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetApplicationById(dc: DataConnect, vars: GetApplicationByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetApplicationsByShiftId(vars: GetApplicationsByShiftIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetApplicationsByShiftId(dc: DataConnect, vars: GetApplicationsByShiftIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetApplicationsByShiftIdAndStatus(vars: GetApplicationsByShiftIdAndStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetApplicationsByShiftIdAndStatus(dc: DataConnect, vars: GetApplicationsByShiftIdAndStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetApplicationsByStaffId(vars: GetApplicationsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetApplicationsByStaffId(dc: DataConnect, vars: GetApplicationsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useVaidateDayStaffApplication(vars: VaidateDayStaffApplicationVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useVaidateDayStaffApplication(dc: DataConnect, vars: VaidateDayStaffApplicationVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetApplicationByStaffShiftAndRole(vars: GetApplicationByStaffShiftAndRoleVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetApplicationByStaffShiftAndRole(dc: DataConnect, vars: GetApplicationByStaffShiftAndRoleVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListAcceptedApplicationsByShiftRoleKey(vars: ListAcceptedApplicationsByShiftRoleKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListAcceptedApplicationsByShiftRoleKey(dc: DataConnect, vars: ListAcceptedApplicationsByShiftRoleKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListAcceptedApplicationsByBusinessForDay(vars: ListAcceptedApplicationsByBusinessForDayVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListAcceptedApplicationsByBusinessForDay(dc: DataConnect, vars: ListAcceptedApplicationsByBusinessForDayVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffsApplicationsByBusinessForDay(vars: ListStaffsApplicationsByBusinessForDayVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffsApplicationsByBusinessForDay(dc: DataConnect, vars: ListStaffsApplicationsByBusinessForDayVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListCompletedApplicationsByStaffId(vars: ListCompletedApplicationsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListCompletedApplicationsByStaffId(dc: DataConnect, vars: ListCompletedApplicationsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListAttireOptions(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListAttireOptions(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetAttireOptionById(vars: GetAttireOptionByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetAttireOptionById(dc: DataConnect, vars: GetAttireOptionByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterAttireOptions(vars?: FilterAttireOptionsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterAttireOptions(dc: DataConnect, vars?: FilterAttireOptionsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateCertificate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateCertificate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateCertificate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateCertificate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteCertificate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteCertificate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListCustomRateCards(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListCustomRateCards(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetCustomRateCardById(vars: GetCustomRateCardByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetCustomRateCardById(dc: DataConnect, vars: GetCustomRateCardByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListRoleCategories(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListRoleCategories(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetRoleCategoryById(vars: GetRoleCategoryByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetRoleCategoryById(dc: DataConnect, vars: GetRoleCategoryByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetRoleCategoriesByCategory(vars: GetRoleCategoriesByCategoryVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetRoleCategoriesByCategory(dc: DataConnect, vars: GetRoleCategoriesByCategoryVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffAvailabilities(vars?: ListStaffAvailabilitiesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffAvailabilities(dc: DataConnect, vars?: ListStaffAvailabilitiesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffAvailabilitiesByStaffId(vars: ListStaffAvailabilitiesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffAvailabilitiesByStaffId(dc: DataConnect, vars: ListStaffAvailabilitiesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetStaffAvailabilityByKey(vars: GetStaffAvailabilityByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetStaffAvailabilityByKey(dc: DataConnect, vars: GetStaffAvailabilityByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffAvailabilitiesByDay(vars: ListStaffAvailabilitiesByDayVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffAvailabilitiesByDay(dc: DataConnect, vars: ListStaffAvailabilitiesByDayVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListRecentPayments(vars?: ListRecentPaymentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListRecentPayments(dc: DataConnect, vars?: ListRecentPaymentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetRecentPaymentById(vars: GetRecentPaymentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetRecentPaymentById(dc: DataConnect, vars: GetRecentPaymentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListRecentPaymentsByStaffId(vars: ListRecentPaymentsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListRecentPaymentsByStaffId(dc: DataConnect, vars: ListRecentPaymentsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListRecentPaymentsByApplicationId(vars: ListRecentPaymentsByApplicationIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListRecentPaymentsByApplicationId(dc: DataConnect, vars: ListRecentPaymentsByApplicationIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListRecentPaymentsByInvoiceId(vars: ListRecentPaymentsByInvoiceIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListRecentPaymentsByInvoiceId(dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListRecentPaymentsByStatus(vars: ListRecentPaymentsByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListRecentPaymentsByStatus(dc: DataConnect, vars: ListRecentPaymentsByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListRecentPaymentsByInvoiceIds(vars: ListRecentPaymentsByInvoiceIdsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListRecentPaymentsByInvoiceIds(dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListRecentPaymentsByBusinessId(vars: ListRecentPaymentsByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListRecentPaymentsByBusinessId(dc: DataConnect, vars: ListRecentPaymentsByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListBusinesses(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListBusinesses(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetBusinessesByUserId(vars: GetBusinessesByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetBusinessesByUserId(dc: DataConnect, vars: GetBusinessesByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetBusinessById(vars: GetBusinessByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetBusinessById(dc: DataConnect, vars: GetBusinessByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateClientFeedback(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateClientFeedback(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateClientFeedback(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateClientFeedback(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteClientFeedback(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteClientFeedback(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListConversations(vars?: ListConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListConversations(dc: DataConnect, vars?: ListConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetConversationById(vars: GetConversationByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetConversationById(dc: DataConnect, vars: GetConversationByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListConversationsByType(vars: ListConversationsByTypeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListConversationsByType(dc: DataConnect, vars: ListConversationsByTypeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListConversationsByStatus(vars: ListConversationsByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListConversationsByStatus(dc: DataConnect, vars: ListConversationsByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterConversations(vars?: FilterConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterConversations(dc: DataConnect, vars?: FilterConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListOrders(vars?: ListOrdersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListOrders(dc: DataConnect, vars?: ListOrdersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetOrderById(vars: GetOrderByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetOrderById(dc: DataConnect, vars: GetOrderByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetOrdersByBusinessId(vars: GetOrdersByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetOrdersByBusinessId(dc: DataConnect, vars: GetOrdersByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetOrdersByVendorId(vars: GetOrdersByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetOrdersByVendorId(dc: DataConnect, vars: GetOrdersByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetOrdersByStatus(vars: GetOrdersByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetOrdersByStatus(dc: DataConnect, vars: GetOrdersByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetOrdersByDateRange(vars: GetOrdersByDateRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetOrdersByDateRange(dc: DataConnect, vars: GetOrdersByDateRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetRapidOrders(vars?: GetRapidOrdersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetRapidOrders(dc: DataConnect, vars?: GetRapidOrdersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListOrdersByBusinessAndTeamHub(vars: ListOrdersByBusinessAndTeamHubVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListOrdersByBusinessAndTeamHub(dc: DataConnect, vars: ListOrdersByBusinessAndTeamHubVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffRoles(vars?: ListStaffRolesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffRoles(dc: DataConnect, vars?: ListStaffRolesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetStaffRoleByKey(vars: GetStaffRoleByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetStaffRoleByKey(dc: DataConnect, vars: GetStaffRoleByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffRolesByStaffId(vars: ListStaffRolesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffRolesByStaffId(dc: DataConnect, vars: ListStaffRolesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffRolesByRoleId(vars: ListStaffRolesByRoleIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffRolesByRoleId(dc: DataConnect, vars: ListStaffRolesByRoleIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterStaffRoles(vars?: FilterStaffRolesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterStaffRoles(dc: DataConnect, vars?: FilterStaffRolesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListTaskComments(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListTaskComments(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetTaskCommentById(vars: GetTaskCommentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetTaskCommentById(dc: DataConnect, vars: GetTaskCommentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetTaskCommentsByTaskId(vars: GetTaskCommentsByTaskIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetTaskCommentsByTaskId(dc: DataConnect, vars: GetTaskCommentsByTaskIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateBusiness(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateBusiness(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateBusiness(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateBusiness(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteBusiness(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteBusiness(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateConversation(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateConversation(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateConversation(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateConversation(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateConversationLastMessage(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateConversationLastMessage(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteConversation(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteConversation(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateCustomRateCard(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateCustomRateCard(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateCustomRateCard(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateCustomRateCard(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteCustomRateCard(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteCustomRateCard(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListDocuments(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListDocuments(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetDocumentById(vars: GetDocumentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetDocumentById(dc: DataConnect, vars: GetDocumentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterDocuments(vars?: FilterDocumentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterDocuments(dc: DataConnect, vars?: FilterDocumentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateRecentPayment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateRecentPayment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateRecentPayment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateRecentPayment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteRecentPayment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteRecentPayment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListShiftsForCoverage(vars: ListShiftsForCoverageVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftsForCoverage(dc: DataConnect, vars: ListShiftsForCoverageVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListApplicationsForCoverage(vars: ListApplicationsForCoverageVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListApplicationsForCoverage(dc: DataConnect, vars: ListApplicationsForCoverageVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftsForDailyOpsByBusiness(vars: ListShiftsForDailyOpsByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftsForDailyOpsByBusiness(dc: DataConnect, vars: ListShiftsForDailyOpsByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftsForDailyOpsByVendor(vars: ListShiftsForDailyOpsByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftsForDailyOpsByVendor(dc: DataConnect, vars: ListShiftsForDailyOpsByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListApplicationsForDailyOps(vars: ListApplicationsForDailyOpsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListApplicationsForDailyOps(dc: DataConnect, vars: ListApplicationsForDailyOpsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftsForForecastByBusiness(vars: ListShiftsForForecastByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftsForForecastByBusiness(dc: DataConnect, vars: ListShiftsForForecastByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftsForForecastByVendor(vars: ListShiftsForForecastByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftsForForecastByVendor(dc: DataConnect, vars: ListShiftsForForecastByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftsForNoShowRangeByBusiness(vars: ListShiftsForNoShowRangeByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftsForNoShowRangeByBusiness(dc: DataConnect, vars: ListShiftsForNoShowRangeByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftsForNoShowRangeByVendor(vars: ListShiftsForNoShowRangeByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftsForNoShowRangeByVendor(dc: DataConnect, vars: ListShiftsForNoShowRangeByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListApplicationsForNoShowRange(vars: ListApplicationsForNoShowRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListApplicationsForNoShowRange(dc: DataConnect, vars: ListApplicationsForNoShowRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffForNoShowReport(vars: ListStaffForNoShowReportVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffForNoShowReport(dc: DataConnect, vars: ListStaffForNoShowReportVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListInvoicesForSpendByBusiness(vars: ListInvoicesForSpendByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListInvoicesForSpendByBusiness(dc: DataConnect, vars: ListInvoicesForSpendByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListInvoicesForSpendByVendor(vars: ListInvoicesForSpendByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListInvoicesForSpendByVendor(dc: DataConnect, vars: ListInvoicesForSpendByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListInvoicesForSpendByOrder(vars: ListInvoicesForSpendByOrderVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListInvoicesForSpendByOrder(dc: DataConnect, vars: ListInvoicesForSpendByOrderVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListTimesheetsForSpend(vars: ListTimesheetsForSpendVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListTimesheetsForSpend(dc: DataConnect, vars: ListTimesheetsForSpendVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftsForPerformanceByBusiness(vars: ListShiftsForPerformanceByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftsForPerformanceByBusiness(dc: DataConnect, vars: ListShiftsForPerformanceByBusinessVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftsForPerformanceByVendor(vars: ListShiftsForPerformanceByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftsForPerformanceByVendor(dc: DataConnect, vars: ListShiftsForPerformanceByVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListApplicationsForPerformance(vars: ListApplicationsForPerformanceVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListApplicationsForPerformance(dc: DataConnect, vars: ListApplicationsForPerformanceVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffForPerformance(vars: ListStaffForPerformanceVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffForPerformance(dc: DataConnect, vars: ListStaffForPerformanceVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateUser(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateUser(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateUser(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateUser(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteUser(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteUser(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateVendor(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateVendor(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateVendor(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateVendor(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteVendor(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteVendor(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateDocument(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateDocument(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateDocument(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateDocument(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteDocument(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteDocument(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListRoles(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListRoles(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetRoleById(vars: GetRoleByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetRoleById(dc: DataConnect, vars: GetRoleByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListRolesByVendorId(vars: ListRolesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListRolesByVendorId(dc: DataConnect, vars: ListRolesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListRolesByroleCategoryId(vars: ListRolesByroleCategoryIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListRolesByroleCategoryId(dc: DataConnect, vars: ListRolesByroleCategoryIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetShiftRoleById(vars: GetShiftRoleByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetShiftRoleById(dc: DataConnect, vars: GetShiftRoleByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftRolesByShiftId(vars: ListShiftRolesByShiftIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftRolesByShiftId(dc: DataConnect, vars: ListShiftRolesByShiftIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftRolesByRoleId(vars: ListShiftRolesByRoleIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftRolesByRoleId(dc: DataConnect, vars: ListShiftRolesByRoleIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftRolesByShiftIdAndTimeRange(vars: ListShiftRolesByShiftIdAndTimeRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftRolesByShiftIdAndTimeRange(dc: DataConnect, vars: ListShiftRolesByShiftIdAndTimeRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftRolesByVendorId(vars: ListShiftRolesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftRolesByVendorId(dc: DataConnect, vars: ListShiftRolesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftRolesByBusinessAndDateRange(vars: ListShiftRolesByBusinessAndDateRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftRolesByBusinessAndDateRange(dc: DataConnect, vars: ListShiftRolesByBusinessAndDateRangeVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftRolesByBusinessAndOrder(vars: ListShiftRolesByBusinessAndOrderVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftRolesByBusinessAndOrder(dc: DataConnect, vars: ListShiftRolesByBusinessAndOrderVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftRolesByBusinessDateRangeCompletedOrders(vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftRolesByBusinessDateRangeCompletedOrders(dc: DataConnect, vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListShiftRolesByBusinessAndDatesSummary(vars: ListShiftRolesByBusinessAndDatesSummaryVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListShiftRolesByBusinessAndDatesSummary(dc: DataConnect, vars: ListShiftRolesByBusinessAndDatesSummaryVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetCompletedShiftsByBusinessId(vars: GetCompletedShiftsByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetCompletedShiftsByBusinessId(dc: DataConnect, vars: GetCompletedShiftsByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateTaskComment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateTaskComment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateTaskComment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateTaskComment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteTaskComment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteTaskComment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListTaxForms(vars?: ListTaxFormsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListTaxForms(dc: DataConnect, vars?: ListTaxFormsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetTaxFormById(vars: GetTaxFormByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetTaxFormById(dc: DataConnect, vars: GetTaxFormByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetTaxFormsByStaffId(vars: GetTaxFormsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetTaxFormsByStaffId(dc: DataConnect, vars: GetTaxFormsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListTaxFormsWhere(vars?: ListTaxFormsWhereVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListTaxFormsWhere(dc: DataConnect, vars?: ListTaxFormsWhereVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateVendorBenefitPlan(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateVendorBenefitPlan(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateVendorBenefitPlan(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateVendorBenefitPlan(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteVendorBenefitPlan(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteVendorBenefitPlan(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListFaqDatas(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListFaqDatas(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetFaqDataById(vars: GetFaqDataByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetFaqDataById(dc: DataConnect, vars: GetFaqDataByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterFaqDatas(vars?: FilterFaqDatasVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterFaqDatas(dc: DataConnect, vars?: FilterFaqDatasVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateMessage(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateMessage(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateMessage(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateMessage(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteMessage(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteMessage(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useGetStaffCourseById(vars: GetStaffCourseByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetStaffCourseById(dc: DataConnect, vars: GetStaffCourseByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffCoursesByStaffId(vars: ListStaffCoursesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffCoursesByStaffId(dc: DataConnect, vars: ListStaffCoursesByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListStaffCoursesByCourseId(vars: ListStaffCoursesByCourseIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffCoursesByCourseId(dc: DataConnect, vars: ListStaffCoursesByCourseIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetStaffCourseByStaffAndCourse(vars: GetStaffCourseByStaffAndCourseVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetStaffCourseByStaffAndCourse(dc: DataConnect, vars: GetStaffCourseByStaffAndCourseVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateWorkforce(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateWorkforce(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateWorkforce(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateWorkforce(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeactivateWorkforce(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeactivateWorkforce(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListActivityLogs(vars?: ListActivityLogsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListActivityLogs(dc: DataConnect, vars?: ListActivityLogsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetActivityLogById(vars: GetActivityLogByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetActivityLogById(dc: DataConnect, vars: GetActivityLogByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListActivityLogsByUserId(vars: ListActivityLogsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListActivityLogsByUserId(dc: DataConnect, vars: ListActivityLogsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListUnreadActivityLogsByUserId(vars: ListUnreadActivityLogsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListUnreadActivityLogsByUserId(dc: DataConnect, vars: ListUnreadActivityLogsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterActivityLogs(vars?: FilterActivityLogsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterActivityLogs(dc: DataConnect, vars?: FilterActivityLogsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListBenefitsData(vars?: ListBenefitsDataVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListBenefitsData(dc: DataConnect, vars?: ListBenefitsDataVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetBenefitsDataByKey(vars: GetBenefitsDataByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetBenefitsDataByKey(dc: DataConnect, vars: GetBenefitsDataByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListBenefitsDataByStaffId(vars: ListBenefitsDataByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListBenefitsDataByStaffId(dc: DataConnect, vars: ListBenefitsDataByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListBenefitsDataByVendorBenefitPlanId(vars: ListBenefitsDataByVendorBenefitPlanIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListBenefitsDataByVendorBenefitPlanId(dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListBenefitsDataByVendorBenefitPlanIds(vars: ListBenefitsDataByVendorBenefitPlanIdsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListBenefitsDataByVendorBenefitPlanIds(dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateFaqData(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateFaqData(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateFaqData(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateFaqData(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteFaqData(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteFaqData(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateInvoice(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateInvoice(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateInvoice(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateInvoice(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteInvoice(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteInvoice(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListStaff(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaff(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetStaffById(vars: GetStaffByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetStaffById(dc: DataConnect, vars: GetStaffByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetStaffByUserId(vars: GetStaffByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetStaffByUserId(dc: DataConnect, vars: GetStaffByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterStaff(vars?: FilterStaffVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterStaff(dc: DataConnect, vars?: FilterStaffVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListTasks(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListTasks(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetTaskById(vars: GetTaskByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetTaskById(dc: DataConnect, vars: GetTaskByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetTasksByOwnerId(vars: GetTasksByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetTasksByOwnerId(dc: DataConnect, vars: GetTasksByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterTasks(vars?: FilterTasksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterTasks(dc: DataConnect, vars?: FilterTasksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateTeamHub(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateTeamHub(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateTeamHub(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateTeamHub(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteTeamHub(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteTeamHub(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListTeamHubs(vars?: ListTeamHubsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListTeamHubs(dc: DataConnect, vars?: ListTeamHubsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetTeamHubById(vars: GetTeamHubByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetTeamHubById(dc: DataConnect, vars: GetTeamHubByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetTeamHubsByTeamId(vars: GetTeamHubsByTeamIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetTeamHubsByTeamId(dc: DataConnect, vars: GetTeamHubsByTeamIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListTeamHubsByOwnerId(vars: ListTeamHubsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListTeamHubsByOwnerId(dc: DataConnect, vars: ListTeamHubsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListClientFeedbacks(vars?: ListClientFeedbacksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListClientFeedbacks(dc: DataConnect, vars?: ListClientFeedbacksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetClientFeedbackById(vars: GetClientFeedbackByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetClientFeedbackById(dc: DataConnect, vars: GetClientFeedbackByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListClientFeedbacksByBusinessId(vars: ListClientFeedbacksByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListClientFeedbacksByBusinessId(dc: DataConnect, vars: ListClientFeedbacksByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListClientFeedbacksByVendorId(vars: ListClientFeedbacksByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListClientFeedbacksByVendorId(dc: DataConnect, vars: ListClientFeedbacksByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListClientFeedbacksByBusinessAndVendor(vars: ListClientFeedbacksByBusinessAndVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListClientFeedbacksByBusinessAndVendor(dc: DataConnect, vars: ListClientFeedbacksByBusinessAndVendorVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterClientFeedbacks(vars?: FilterClientFeedbacksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterClientFeedbacks(dc: DataConnect, vars?: FilterClientFeedbacksVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListClientFeedbackRatingsByVendorId(vars: ListClientFeedbackRatingsByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListClientFeedbackRatingsByVendorId(dc: DataConnect, vars: ListClientFeedbackRatingsByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateHub(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateHub(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateHub(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateHub(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteHub(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteHub(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateRoleCategory(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateRoleCategory(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateRoleCategory(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateRoleCategory(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteRoleCategory(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteRoleCategory(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateStaffAvailabilityStats(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateStaffAvailabilityStats(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateStaffAvailabilityStats(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateStaffAvailabilityStats(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteStaffAvailabilityStats(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteStaffAvailabilityStats(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListUsers(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListUsers(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetUserById(vars: GetUserByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetUserById(dc: DataConnect, vars: GetUserByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterUsers(vars?: FilterUsersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterUsers(dc: DataConnect, vars?: FilterUsersVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetVendorById(vars: GetVendorByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetVendorById(dc: DataConnect, vars: GetVendorByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetVendorByUserId(vars: GetVendorByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetVendorByUserId(dc: DataConnect, vars: GetVendorByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListVendors(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListVendors(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListCategories(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListCategories(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetCategoryById(vars: GetCategoryByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetCategoryById(dc: DataConnect, vars: GetCategoryByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterCategories(vars?: FilterCategoriesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterCategories(dc: DataConnect, vars?: FilterCategoriesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListMessages(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListMessages(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetMessageById(vars: GetMessageByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetMessageById(dc: DataConnect, vars: GetMessageByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetMessagesByConversationId(vars: GetMessagesByConversationIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetMessagesByConversationId(dc: DataConnect, vars: GetMessagesByConversationIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateShiftRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateShiftRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateShiftRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateShiftRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteShiftRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteShiftRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateStaffRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateStaffRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteStaffRole(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteStaffRole(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListUserConversations(vars?: ListUserConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListUserConversations(dc: DataConnect, vars?: ListUserConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetUserConversationByKey(vars: GetUserConversationByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetUserConversationByKey(dc: DataConnect, vars: GetUserConversationByKeyVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListUserConversationsByUserId(vars: ListUserConversationsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListUserConversationsByUserId(dc: DataConnect, vars: ListUserConversationsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListUnreadUserConversationsByUserId(vars: ListUnreadUserConversationsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListUnreadUserConversationsByUserId(dc: DataConnect, vars: ListUnreadUserConversationsByUserIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListUserConversationsByConversationId(vars: ListUserConversationsByConversationIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListUserConversationsByConversationId(dc: DataConnect, vars: ListUserConversationsByConversationIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterUserConversations(vars?: FilterUserConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterUserConversations(dc: DataConnect, vars?: FilterUserConversationsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateAccount(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateAccount(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateAccount(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateAccount(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteAccount(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteAccount(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateApplication(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateApplication(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateApplicationStatus(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateApplicationStatus(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteApplication(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteApplication(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateAssignment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateAssignment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateAssignment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateAssignment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteAssignment(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteAssignment(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListHubs(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListHubs(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetHubById(vars: GetHubByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetHubById(dc: DataConnect, vars: GetHubByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetHubsByOwnerId(vars: GetHubsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetHubsByOwnerId(dc: DataConnect, vars: GetHubsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterHubs(vars?: FilterHubsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterHubs(dc: DataConnect, vars?: FilterHubsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListInvoices(vars?: ListInvoicesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListInvoices(dc: DataConnect, vars?: ListInvoicesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetInvoiceById(vars: GetInvoiceByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetInvoiceById(dc: DataConnect, vars: GetInvoiceByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListInvoicesByVendorId(vars: ListInvoicesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListInvoicesByVendorId(dc: DataConnect, vars: ListInvoicesByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListInvoicesByBusinessId(vars: ListInvoicesByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListInvoicesByBusinessId(dc: DataConnect, vars: ListInvoicesByBusinessIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListInvoicesByOrderId(vars: ListInvoicesByOrderIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListInvoicesByOrderId(dc: DataConnect, vars: ListInvoicesByOrderIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListInvoicesByStatus(vars: ListInvoicesByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListInvoicesByStatus(dc: DataConnect, vars: ListInvoicesByStatusVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterInvoices(vars?: FilterInvoicesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterInvoices(dc: DataConnect, vars?: FilterInvoicesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListOverdueInvoices(vars: ListOverdueInvoicesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListOverdueInvoices(dc: DataConnect, vars: ListOverdueInvoicesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateInvoiceTemplate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateInvoiceTemplate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateInvoiceTemplate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateInvoiceTemplate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteInvoiceTemplate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteInvoiceTemplate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateStaffAvailability(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateStaffAvailability(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateStaffAvailability(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateStaffAvailability(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteStaffAvailability(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteStaffAvailability(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateTeamMember(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateTeamMember(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateTeamMember(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateTeamMember(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateTeamMemberInviteStatus(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateTeamMemberInviteStatus(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useAcceptInviteByCode(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useAcceptInviteByCode(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCancelInviteByCode(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCancelInviteByCode(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteTeamMember(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteTeamMember(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListCourses(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListCourses(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetCourseById(vars: GetCourseByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetCourseById(dc: DataConnect, vars: GetCourseByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterCourses(vars?: FilterCoursesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterCourses(dc: DataConnect, vars?: FilterCoursesVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateLevel(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateLevel(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateLevel(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateLevel(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteLevel(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteLevel(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateOrder(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateOrder(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateOrder(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateOrder(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteOrder(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteOrder(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListVendorRates(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListVendorRates(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetVendorRateById(vars: GetVendorRateByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetVendorRateById(dc: DataConnect, vars: GetVendorRateByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetWorkforceById(vars: GetWorkforceByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetWorkforceById(dc: DataConnect, vars: GetWorkforceByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetWorkforceByVendorAndStaff(vars: GetWorkforceByVendorAndStaffVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetWorkforceByVendorAndStaff(dc: DataConnect, vars: GetWorkforceByVendorAndStaffVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListWorkforceByVendorId(vars: ListWorkforceByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListWorkforceByVendorId(dc: DataConnect, vars: ListWorkforceByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListWorkforceByStaffId(vars: ListWorkforceByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListWorkforceByStaffId(dc: DataConnect, vars: ListWorkforceByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetWorkforceByVendorAndNumber(vars: GetWorkforceByVendorAndNumberVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetWorkforceByVendorAndNumber(dc: DataConnect, vars: GetWorkforceByVendorAndNumberVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateCategory(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateCategory(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateCategory(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateCategory(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteCategory(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteCategory(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListStaffAvailabilityStats(vars?: ListStaffAvailabilityStatsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListStaffAvailabilityStats(dc: DataConnect, vars?: ListStaffAvailabilityStatsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetStaffAvailabilityStatsByStaffId(vars: GetStaffAvailabilityStatsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetStaffAvailabilityStatsByStaffId(dc: DataConnect, vars: GetStaffAvailabilityStatsByStaffIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterStaffAvailabilityStats(vars?: FilterStaffAvailabilityStatsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterStaffAvailabilityStats(dc: DataConnect, vars?: FilterStaffAvailabilityStatsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateTaxForm(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateTaxForm(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateTaxForm(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateTaxForm(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteTaxForm(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteTaxForm(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListTeamHudDepartments(vars?: ListTeamHudDepartmentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListTeamHudDepartments(dc: DataConnect, vars?: ListTeamHudDepartmentsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetTeamHudDepartmentById(vars: GetTeamHudDepartmentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetTeamHudDepartmentById(dc: DataConnect, vars: GetTeamHudDepartmentByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListTeamHudDepartmentsByTeamHubId(vars: ListTeamHudDepartmentsByTeamHubIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListTeamHudDepartmentsByTeamHubId(dc: DataConnect, vars: ListTeamHudDepartmentsByTeamHubIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateVendorRate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateVendorRate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateVendorRate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateVendorRate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteVendorRate(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteVendorRate(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateActivityLog(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateActivityLog(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateActivityLog(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateActivityLog(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useMarkActivityLogAsRead(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useMarkActivityLogAsRead(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useMarkActivityLogsAsRead(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useMarkActivityLogsAsRead(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteActivityLog(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteActivityLog(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListLevels(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListLevels(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetLevelById(vars: GetLevelByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetLevelById(dc: DataConnect, vars: GetLevelByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterLevels(vars?: FilterLevelsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterLevels(dc: DataConnect, vars?: FilterLevelsVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useCreateShift(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateShift(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateShift(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateShift(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteShift(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteShift(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useCreateStaff(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useCreateStaff(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useUpdateStaff(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useUpdateStaff(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useDeleteStaff(options?: useDataConnectMutationOptions): UseDataConnectMutationResult; +export function useDeleteStaff(dc: DataConnect, options?: useDataConnectMutationOptions): UseDataConnectMutationResult; + +export function useListTeams(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListTeams(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetTeamById(vars: GetTeamByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetTeamById(dc: DataConnect, vars: GetTeamByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetTeamsByOwnerId(vars: GetTeamsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetTeamsByOwnerId(dc: DataConnect, vars: GetTeamsByOwnerIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListTeamMembers(options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListTeamMembers(dc: DataConnect, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetTeamMemberById(vars: GetTeamMemberByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetTeamMemberById(dc: DataConnect, vars: GetTeamMemberByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetTeamMembersByTeamId(vars: GetTeamMembersByTeamIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetTeamMembersByTeamId(dc: DataConnect, vars: GetTeamMembersByTeamIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListVendorBenefitPlans(vars?: ListVendorBenefitPlansVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListVendorBenefitPlans(dc: DataConnect, vars?: ListVendorBenefitPlansVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useGetVendorBenefitPlanById(vars: GetVendorBenefitPlanByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useGetVendorBenefitPlanById(dc: DataConnect, vars: GetVendorBenefitPlanByIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListVendorBenefitPlansByVendorId(vars: ListVendorBenefitPlansByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListVendorBenefitPlansByVendorId(dc: DataConnect, vars: ListVendorBenefitPlansByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useListActiveVendorBenefitPlansByVendorId(vars: ListActiveVendorBenefitPlansByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useListActiveVendorBenefitPlansByVendorId(dc: DataConnect, vars: ListActiveVendorBenefitPlansByVendorIdVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; + +export function useFilterVendorBenefitPlans(vars?: FilterVendorBenefitPlansVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; +export function useFilterVendorBenefitPlans(dc: DataConnect, vars?: FilterVendorBenefitPlansVariables, options?: useDataConnectQueryOptions): UseDataConnectQueryResult; diff --git a/apps/web/src/dataconnect-generated/react/package.json b/apps/web/src/dataconnect-generated/react/package.json new file mode 100644 index 00000000..33f923ed --- /dev/null +++ b/apps/web/src/dataconnect-generated/react/package.json @@ -0,0 +1,17 @@ +{ + "name": "@dataconnect/generated-react", + "version": "1.0.0", + "author": "Firebase (https://firebase.google.com/)", + "description": "Generated SDK For example", + "license": "Apache-2.0", + "engines": { + "node": " >=18.0" + }, + "typings": "index.d.ts", + "main": "index.cjs.js", + "module": "esm/index.esm.js", + "browser": "esm/index.esm.js", + "peerDependencies": { + "@tanstack-query-firebase/react": "^2.0.0" + } +} \ No newline at end of file