# 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); }); ```