Files
Krow-workspace/apps/web/src/dataconnect-generated/README.md
2026-02-13 10:29:51 -05:00

1.9 MiB

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

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

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.

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.

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.

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 and 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.

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:

listShifts(vars?: ListShiftsVariables): QueryPromise<ListShiftsData, ListShiftsVariables>;

interface ListShiftsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListShiftsVariables): QueryRef<ListShiftsData, ListShiftsVariables>;
}
export const listShiftsRef: ListShiftsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShifts(dc: DataConnect, vars?: ListShiftsVariables): QueryPromise<ListShiftsData, ListShiftsVariables>;

interface ListShiftsRef {
  ...
  (dc: DataConnect, vars?: ListShiftsVariables): QueryRef<ListShiftsData, ListShiftsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getShiftById(vars: GetShiftByIdVariables): QueryPromise<GetShiftByIdData, GetShiftByIdVariables>;

interface GetShiftByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetShiftByIdVariables): QueryRef<GetShiftByIdData, GetShiftByIdVariables>;
}
export const getShiftByIdRef: GetShiftByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getShiftById(dc: DataConnect, vars: GetShiftByIdVariables): QueryPromise<GetShiftByIdData, GetShiftByIdVariables>;

interface GetShiftByIdRef {
  ...
  (dc: DataConnect, vars: GetShiftByIdVariables): QueryRef<GetShiftByIdData, GetShiftByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterShifts(vars?: FilterShiftsVariables): QueryPromise<FilterShiftsData, FilterShiftsVariables>;

interface FilterShiftsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterShiftsVariables): QueryRef<FilterShiftsData, FilterShiftsVariables>;
}
export const filterShiftsRef: FilterShiftsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterShifts(dc: DataConnect, vars?: FilterShiftsVariables): QueryPromise<FilterShiftsData, FilterShiftsVariables>;

interface FilterShiftsRef {
  ...
  (dc: DataConnect, vars?: FilterShiftsVariables): QueryRef<FilterShiftsData, FilterShiftsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getShiftsByBusinessId(vars: GetShiftsByBusinessIdVariables): QueryPromise<GetShiftsByBusinessIdData, GetShiftsByBusinessIdVariables>;

interface GetShiftsByBusinessIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetShiftsByBusinessIdVariables): QueryRef<GetShiftsByBusinessIdData, GetShiftsByBusinessIdVariables>;
}
export const getShiftsByBusinessIdRef: GetShiftsByBusinessIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getShiftsByBusinessId(dc: DataConnect, vars: GetShiftsByBusinessIdVariables): QueryPromise<GetShiftsByBusinessIdData, GetShiftsByBusinessIdVariables>;

interface GetShiftsByBusinessIdRef {
  ...
  (dc: DataConnect, vars: GetShiftsByBusinessIdVariables): QueryRef<GetShiftsByBusinessIdData, GetShiftsByBusinessIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getShiftsByVendorId(vars: GetShiftsByVendorIdVariables): QueryPromise<GetShiftsByVendorIdData, GetShiftsByVendorIdVariables>;

interface GetShiftsByVendorIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetShiftsByVendorIdVariables): QueryRef<GetShiftsByVendorIdData, GetShiftsByVendorIdVariables>;
}
export const getShiftsByVendorIdRef: GetShiftsByVendorIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getShiftsByVendorId(dc: DataConnect, vars: GetShiftsByVendorIdVariables): QueryPromise<GetShiftsByVendorIdData, GetShiftsByVendorIdVariables>;

interface GetShiftsByVendorIdRef {
  ...
  (dc: DataConnect, vars: GetShiftsByVendorIdVariables): QueryRef<GetShiftsByVendorIdData, GetShiftsByVendorIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listEmergencyContacts(): QueryPromise<ListEmergencyContactsData, undefined>;

interface ListEmergencyContactsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListEmergencyContactsData, undefined>;
}
export const listEmergencyContactsRef: ListEmergencyContactsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listEmergencyContacts(dc: DataConnect): QueryPromise<ListEmergencyContactsData, undefined>;

interface ListEmergencyContactsRef {
  ...
  (dc: DataConnect): QueryRef<ListEmergencyContactsData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getEmergencyContactById(vars: GetEmergencyContactByIdVariables): QueryPromise<GetEmergencyContactByIdData, GetEmergencyContactByIdVariables>;

interface GetEmergencyContactByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetEmergencyContactByIdVariables): QueryRef<GetEmergencyContactByIdData, GetEmergencyContactByIdVariables>;
}
export const getEmergencyContactByIdRef: GetEmergencyContactByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getEmergencyContactById(dc: DataConnect, vars: GetEmergencyContactByIdVariables): QueryPromise<GetEmergencyContactByIdData, GetEmergencyContactByIdVariables>;

interface GetEmergencyContactByIdRef {
  ...
  (dc: DataConnect, vars: GetEmergencyContactByIdVariables): QueryRef<GetEmergencyContactByIdData, GetEmergencyContactByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getEmergencyContactsByStaffId(vars: GetEmergencyContactsByStaffIdVariables): QueryPromise<GetEmergencyContactsByStaffIdData, GetEmergencyContactsByStaffIdVariables>;

interface GetEmergencyContactsByStaffIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetEmergencyContactsByStaffIdVariables): QueryRef<GetEmergencyContactsByStaffIdData, GetEmergencyContactsByStaffIdVariables>;
}
export const getEmergencyContactsByStaffIdRef: GetEmergencyContactsByStaffIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getEmergencyContactsByStaffId(dc: DataConnect, vars: GetEmergencyContactsByStaffIdVariables): QueryPromise<GetEmergencyContactsByStaffIdData, GetEmergencyContactsByStaffIdVariables>;

interface GetEmergencyContactsByStaffIdRef {
  ...
  (dc: DataConnect, vars: GetEmergencyContactsByStaffIdVariables): QueryRef<GetEmergencyContactsByStaffIdData, GetEmergencyContactsByStaffIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getMyTasks(vars: GetMyTasksVariables): QueryPromise<GetMyTasksData, GetMyTasksVariables>;

interface GetMyTasksRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetMyTasksVariables): QueryRef<GetMyTasksData, GetMyTasksVariables>;
}
export const getMyTasksRef: GetMyTasksRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getMyTasks(dc: DataConnect, vars: GetMyTasksVariables): QueryPromise<GetMyTasksData, GetMyTasksVariables>;

interface GetMyTasksRef {
  ...
  (dc: DataConnect, vars: GetMyTasksVariables): QueryRef<GetMyTasksData, GetMyTasksVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getMemberTaskByIdKey(vars: GetMemberTaskByIdKeyVariables): QueryPromise<GetMemberTaskByIdKeyData, GetMemberTaskByIdKeyVariables>;

interface GetMemberTaskByIdKeyRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetMemberTaskByIdKeyVariables): QueryRef<GetMemberTaskByIdKeyData, GetMemberTaskByIdKeyVariables>;
}
export const getMemberTaskByIdKeyRef: GetMemberTaskByIdKeyRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getMemberTaskByIdKey(dc: DataConnect, vars: GetMemberTaskByIdKeyVariables): QueryPromise<GetMemberTaskByIdKeyData, GetMemberTaskByIdKeyVariables>;

interface GetMemberTaskByIdKeyRef {
  ...
  (dc: DataConnect, vars: GetMemberTaskByIdKeyVariables): QueryRef<GetMemberTaskByIdKeyData, GetMemberTaskByIdKeyVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getMemberTasksByTaskId(vars: GetMemberTasksByTaskIdVariables): QueryPromise<GetMemberTasksByTaskIdData, GetMemberTasksByTaskIdVariables>;

interface GetMemberTasksByTaskIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetMemberTasksByTaskIdVariables): QueryRef<GetMemberTasksByTaskIdData, GetMemberTasksByTaskIdVariables>;
}
export const getMemberTasksByTaskIdRef: GetMemberTasksByTaskIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getMemberTasksByTaskId(dc: DataConnect, vars: GetMemberTasksByTaskIdVariables): QueryPromise<GetMemberTasksByTaskIdData, GetMemberTasksByTaskIdVariables>;

interface GetMemberTasksByTaskIdRef {
  ...
  (dc: DataConnect, vars: GetMemberTasksByTaskIdVariables): QueryRef<GetMemberTasksByTaskIdData, GetMemberTasksByTaskIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listCertificates(): QueryPromise<ListCertificatesData, undefined>;

interface ListCertificatesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListCertificatesData, undefined>;
}
export const listCertificatesRef: ListCertificatesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listCertificates(dc: DataConnect): QueryPromise<ListCertificatesData, undefined>;

interface ListCertificatesRef {
  ...
  (dc: DataConnect): QueryRef<ListCertificatesData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getCertificateById(vars: GetCertificateByIdVariables): QueryPromise<GetCertificateByIdData, GetCertificateByIdVariables>;

interface GetCertificateByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetCertificateByIdVariables): QueryRef<GetCertificateByIdData, GetCertificateByIdVariables>;
}
export const getCertificateByIdRef: GetCertificateByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getCertificateById(dc: DataConnect, vars: GetCertificateByIdVariables): QueryPromise<GetCertificateByIdData, GetCertificateByIdVariables>;

interface GetCertificateByIdRef {
  ...
  (dc: DataConnect, vars: GetCertificateByIdVariables): QueryRef<GetCertificateByIdData, GetCertificateByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listCertificatesByStaffId(vars: ListCertificatesByStaffIdVariables): QueryPromise<ListCertificatesByStaffIdData, ListCertificatesByStaffIdVariables>;

interface ListCertificatesByStaffIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListCertificatesByStaffIdVariables): QueryRef<ListCertificatesByStaffIdData, ListCertificatesByStaffIdVariables>;
}
export const listCertificatesByStaffIdRef: ListCertificatesByStaffIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listCertificatesByStaffId(dc: DataConnect, vars: ListCertificatesByStaffIdVariables): QueryPromise<ListCertificatesByStaffIdData, ListCertificatesByStaffIdVariables>;

interface ListCertificatesByStaffIdRef {
  ...
  (dc: DataConnect, vars: ListCertificatesByStaffIdVariables): QueryRef<ListCertificatesByStaffIdData, ListCertificatesByStaffIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listAssignments(vars?: ListAssignmentsVariables): QueryPromise<ListAssignmentsData, ListAssignmentsVariables>;

interface ListAssignmentsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListAssignmentsVariables): QueryRef<ListAssignmentsData, ListAssignmentsVariables>;
}
export const listAssignmentsRef: ListAssignmentsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listAssignments(dc: DataConnect, vars?: ListAssignmentsVariables): QueryPromise<ListAssignmentsData, ListAssignmentsVariables>;

interface ListAssignmentsRef {
  ...
  (dc: DataConnect, vars?: ListAssignmentsVariables): QueryRef<ListAssignmentsData, ListAssignmentsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getAssignmentById(vars: GetAssignmentByIdVariables): QueryPromise<GetAssignmentByIdData, GetAssignmentByIdVariables>;

interface GetAssignmentByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetAssignmentByIdVariables): QueryRef<GetAssignmentByIdData, GetAssignmentByIdVariables>;
}
export const getAssignmentByIdRef: GetAssignmentByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getAssignmentById(dc: DataConnect, vars: GetAssignmentByIdVariables): QueryPromise<GetAssignmentByIdData, GetAssignmentByIdVariables>;

interface GetAssignmentByIdRef {
  ...
  (dc: DataConnect, vars: GetAssignmentByIdVariables): QueryRef<GetAssignmentByIdData, GetAssignmentByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listAssignmentsByWorkforceId(vars: ListAssignmentsByWorkforceIdVariables): QueryPromise<ListAssignmentsByWorkforceIdData, ListAssignmentsByWorkforceIdVariables>;

interface ListAssignmentsByWorkforceIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListAssignmentsByWorkforceIdVariables): QueryRef<ListAssignmentsByWorkforceIdData, ListAssignmentsByWorkforceIdVariables>;
}
export const listAssignmentsByWorkforceIdRef: ListAssignmentsByWorkforceIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listAssignmentsByWorkforceId(dc: DataConnect, vars: ListAssignmentsByWorkforceIdVariables): QueryPromise<ListAssignmentsByWorkforceIdData, ListAssignmentsByWorkforceIdVariables>;

interface ListAssignmentsByWorkforceIdRef {
  ...
  (dc: DataConnect, vars: ListAssignmentsByWorkforceIdVariables): QueryRef<ListAssignmentsByWorkforceIdData, ListAssignmentsByWorkforceIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listAssignmentsByWorkforceIds(vars: ListAssignmentsByWorkforceIdsVariables): QueryPromise<ListAssignmentsByWorkforceIdsData, ListAssignmentsByWorkforceIdsVariables>;

interface ListAssignmentsByWorkforceIdsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListAssignmentsByWorkforceIdsVariables): QueryRef<ListAssignmentsByWorkforceIdsData, ListAssignmentsByWorkforceIdsVariables>;
}
export const listAssignmentsByWorkforceIdsRef: ListAssignmentsByWorkforceIdsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listAssignmentsByWorkforceIds(dc: DataConnect, vars: ListAssignmentsByWorkforceIdsVariables): QueryPromise<ListAssignmentsByWorkforceIdsData, ListAssignmentsByWorkforceIdsVariables>;

interface ListAssignmentsByWorkforceIdsRef {
  ...
  (dc: DataConnect, vars: ListAssignmentsByWorkforceIdsVariables): QueryRef<ListAssignmentsByWorkforceIdsData, ListAssignmentsByWorkforceIdsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listAssignmentsByShiftRole(vars: ListAssignmentsByShiftRoleVariables): QueryPromise<ListAssignmentsByShiftRoleData, ListAssignmentsByShiftRoleVariables>;

interface ListAssignmentsByShiftRoleRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListAssignmentsByShiftRoleVariables): QueryRef<ListAssignmentsByShiftRoleData, ListAssignmentsByShiftRoleVariables>;
}
export const listAssignmentsByShiftRoleRef: ListAssignmentsByShiftRoleRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listAssignmentsByShiftRole(dc: DataConnect, vars: ListAssignmentsByShiftRoleVariables): QueryPromise<ListAssignmentsByShiftRoleData, ListAssignmentsByShiftRoleVariables>;

interface ListAssignmentsByShiftRoleRef {
  ...
  (dc: DataConnect, vars: ListAssignmentsByShiftRoleVariables): QueryRef<ListAssignmentsByShiftRoleData, ListAssignmentsByShiftRoleVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterAssignments(vars: FilterAssignmentsVariables): QueryPromise<FilterAssignmentsData, FilterAssignmentsVariables>;

interface FilterAssignmentsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: FilterAssignmentsVariables): QueryRef<FilterAssignmentsData, FilterAssignmentsVariables>;
}
export const filterAssignmentsRef: FilterAssignmentsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterAssignments(dc: DataConnect, vars: FilterAssignmentsVariables): QueryPromise<FilterAssignmentsData, FilterAssignmentsVariables>;

interface FilterAssignmentsRef {
  ...
  (dc: DataConnect, vars: FilterAssignmentsVariables): QueryRef<FilterAssignmentsData, FilterAssignmentsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listInvoiceTemplates(vars?: ListInvoiceTemplatesVariables): QueryPromise<ListInvoiceTemplatesData, ListInvoiceTemplatesVariables>;

interface ListInvoiceTemplatesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListInvoiceTemplatesVariables): QueryRef<ListInvoiceTemplatesData, ListInvoiceTemplatesVariables>;
}
export const listInvoiceTemplatesRef: ListInvoiceTemplatesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listInvoiceTemplates(dc: DataConnect, vars?: ListInvoiceTemplatesVariables): QueryPromise<ListInvoiceTemplatesData, ListInvoiceTemplatesVariables>;

interface ListInvoiceTemplatesRef {
  ...
  (dc: DataConnect, vars?: ListInvoiceTemplatesVariables): QueryRef<ListInvoiceTemplatesData, ListInvoiceTemplatesVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getInvoiceTemplateById(vars: GetInvoiceTemplateByIdVariables): QueryPromise<GetInvoiceTemplateByIdData, GetInvoiceTemplateByIdVariables>;

interface GetInvoiceTemplateByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetInvoiceTemplateByIdVariables): QueryRef<GetInvoiceTemplateByIdData, GetInvoiceTemplateByIdVariables>;
}
export const getInvoiceTemplateByIdRef: GetInvoiceTemplateByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getInvoiceTemplateById(dc: DataConnect, vars: GetInvoiceTemplateByIdVariables): QueryPromise<GetInvoiceTemplateByIdData, GetInvoiceTemplateByIdVariables>;

interface GetInvoiceTemplateByIdRef {
  ...
  (dc: DataConnect, vars: GetInvoiceTemplateByIdVariables): QueryRef<GetInvoiceTemplateByIdData, GetInvoiceTemplateByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listInvoiceTemplatesByOwnerId(vars: ListInvoiceTemplatesByOwnerIdVariables): QueryPromise<ListInvoiceTemplatesByOwnerIdData, ListInvoiceTemplatesByOwnerIdVariables>;

interface ListInvoiceTemplatesByOwnerIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListInvoiceTemplatesByOwnerIdVariables): QueryRef<ListInvoiceTemplatesByOwnerIdData, ListInvoiceTemplatesByOwnerIdVariables>;
}
export const listInvoiceTemplatesByOwnerIdRef: ListInvoiceTemplatesByOwnerIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listInvoiceTemplatesByOwnerId(dc: DataConnect, vars: ListInvoiceTemplatesByOwnerIdVariables): QueryPromise<ListInvoiceTemplatesByOwnerIdData, ListInvoiceTemplatesByOwnerIdVariables>;

interface ListInvoiceTemplatesByOwnerIdRef {
  ...
  (dc: DataConnect, vars: ListInvoiceTemplatesByOwnerIdVariables): QueryRef<ListInvoiceTemplatesByOwnerIdData, ListInvoiceTemplatesByOwnerIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listInvoiceTemplatesByVendorId(vars: ListInvoiceTemplatesByVendorIdVariables): QueryPromise<ListInvoiceTemplatesByVendorIdData, ListInvoiceTemplatesByVendorIdVariables>;

interface ListInvoiceTemplatesByVendorIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListInvoiceTemplatesByVendorIdVariables): QueryRef<ListInvoiceTemplatesByVendorIdData, ListInvoiceTemplatesByVendorIdVariables>;
}
export const listInvoiceTemplatesByVendorIdRef: ListInvoiceTemplatesByVendorIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listInvoiceTemplatesByVendorId(dc: DataConnect, vars: ListInvoiceTemplatesByVendorIdVariables): QueryPromise<ListInvoiceTemplatesByVendorIdData, ListInvoiceTemplatesByVendorIdVariables>;

interface ListInvoiceTemplatesByVendorIdRef {
  ...
  (dc: DataConnect, vars: ListInvoiceTemplatesByVendorIdVariables): QueryRef<ListInvoiceTemplatesByVendorIdData, ListInvoiceTemplatesByVendorIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listInvoiceTemplatesByBusinessId(vars: ListInvoiceTemplatesByBusinessIdVariables): QueryPromise<ListInvoiceTemplatesByBusinessIdData, ListInvoiceTemplatesByBusinessIdVariables>;

interface ListInvoiceTemplatesByBusinessIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListInvoiceTemplatesByBusinessIdVariables): QueryRef<ListInvoiceTemplatesByBusinessIdData, ListInvoiceTemplatesByBusinessIdVariables>;
}
export const listInvoiceTemplatesByBusinessIdRef: ListInvoiceTemplatesByBusinessIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listInvoiceTemplatesByBusinessId(dc: DataConnect, vars: ListInvoiceTemplatesByBusinessIdVariables): QueryPromise<ListInvoiceTemplatesByBusinessIdData, ListInvoiceTemplatesByBusinessIdVariables>;

interface ListInvoiceTemplatesByBusinessIdRef {
  ...
  (dc: DataConnect, vars: ListInvoiceTemplatesByBusinessIdVariables): QueryRef<ListInvoiceTemplatesByBusinessIdData, ListInvoiceTemplatesByBusinessIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listInvoiceTemplatesByOrderId(vars: ListInvoiceTemplatesByOrderIdVariables): QueryPromise<ListInvoiceTemplatesByOrderIdData, ListInvoiceTemplatesByOrderIdVariables>;

interface ListInvoiceTemplatesByOrderIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListInvoiceTemplatesByOrderIdVariables): QueryRef<ListInvoiceTemplatesByOrderIdData, ListInvoiceTemplatesByOrderIdVariables>;
}
export const listInvoiceTemplatesByOrderIdRef: ListInvoiceTemplatesByOrderIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listInvoiceTemplatesByOrderId(dc: DataConnect, vars: ListInvoiceTemplatesByOrderIdVariables): QueryPromise<ListInvoiceTemplatesByOrderIdData, ListInvoiceTemplatesByOrderIdVariables>;

interface ListInvoiceTemplatesByOrderIdRef {
  ...
  (dc: DataConnect, vars: ListInvoiceTemplatesByOrderIdVariables): QueryRef<ListInvoiceTemplatesByOrderIdData, ListInvoiceTemplatesByOrderIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

searchInvoiceTemplatesByOwnerAndName(vars: SearchInvoiceTemplatesByOwnerAndNameVariables): QueryPromise<SearchInvoiceTemplatesByOwnerAndNameData, SearchInvoiceTemplatesByOwnerAndNameVariables>;

interface SearchInvoiceTemplatesByOwnerAndNameRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: SearchInvoiceTemplatesByOwnerAndNameVariables): QueryRef<SearchInvoiceTemplatesByOwnerAndNameData, SearchInvoiceTemplatesByOwnerAndNameVariables>;
}
export const searchInvoiceTemplatesByOwnerAndNameRef: SearchInvoiceTemplatesByOwnerAndNameRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

searchInvoiceTemplatesByOwnerAndName(dc: DataConnect, vars: SearchInvoiceTemplatesByOwnerAndNameVariables): QueryPromise<SearchInvoiceTemplatesByOwnerAndNameData, SearchInvoiceTemplatesByOwnerAndNameVariables>;

interface SearchInvoiceTemplatesByOwnerAndNameRef {
  ...
  (dc: DataConnect, vars: SearchInvoiceTemplatesByOwnerAndNameVariables): QueryRef<SearchInvoiceTemplatesByOwnerAndNameData, SearchInvoiceTemplatesByOwnerAndNameVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getStaffDocumentByKey(vars: GetStaffDocumentByKeyVariables): QueryPromise<GetStaffDocumentByKeyData, GetStaffDocumentByKeyVariables>;

interface GetStaffDocumentByKeyRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetStaffDocumentByKeyVariables): QueryRef<GetStaffDocumentByKeyData, GetStaffDocumentByKeyVariables>;
}
export const getStaffDocumentByKeyRef: GetStaffDocumentByKeyRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getStaffDocumentByKey(dc: DataConnect, vars: GetStaffDocumentByKeyVariables): QueryPromise<GetStaffDocumentByKeyData, GetStaffDocumentByKeyVariables>;

interface GetStaffDocumentByKeyRef {
  ...
  (dc: DataConnect, vars: GetStaffDocumentByKeyVariables): QueryRef<GetStaffDocumentByKeyData, GetStaffDocumentByKeyVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listStaffDocumentsByStaffId(vars: ListStaffDocumentsByStaffIdVariables): QueryPromise<ListStaffDocumentsByStaffIdData, ListStaffDocumentsByStaffIdVariables>;

interface ListStaffDocumentsByStaffIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListStaffDocumentsByStaffIdVariables): QueryRef<ListStaffDocumentsByStaffIdData, ListStaffDocumentsByStaffIdVariables>;
}
export const listStaffDocumentsByStaffIdRef: ListStaffDocumentsByStaffIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffDocumentsByStaffId(dc: DataConnect, vars: ListStaffDocumentsByStaffIdVariables): QueryPromise<ListStaffDocumentsByStaffIdData, ListStaffDocumentsByStaffIdVariables>;

interface ListStaffDocumentsByStaffIdRef {
  ...
  (dc: DataConnect, vars: ListStaffDocumentsByStaffIdVariables): QueryRef<ListStaffDocumentsByStaffIdData, ListStaffDocumentsByStaffIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listStaffDocumentsByDocumentType(vars: ListStaffDocumentsByDocumentTypeVariables): QueryPromise<ListStaffDocumentsByDocumentTypeData, ListStaffDocumentsByDocumentTypeVariables>;

interface ListStaffDocumentsByDocumentTypeRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListStaffDocumentsByDocumentTypeVariables): QueryRef<ListStaffDocumentsByDocumentTypeData, ListStaffDocumentsByDocumentTypeVariables>;
}
export const listStaffDocumentsByDocumentTypeRef: ListStaffDocumentsByDocumentTypeRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffDocumentsByDocumentType(dc: DataConnect, vars: ListStaffDocumentsByDocumentTypeVariables): QueryPromise<ListStaffDocumentsByDocumentTypeData, ListStaffDocumentsByDocumentTypeVariables>;

interface ListStaffDocumentsByDocumentTypeRef {
  ...
  (dc: DataConnect, vars: ListStaffDocumentsByDocumentTypeVariables): QueryRef<ListStaffDocumentsByDocumentTypeData, ListStaffDocumentsByDocumentTypeVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listStaffDocumentsByStatus(vars: ListStaffDocumentsByStatusVariables): QueryPromise<ListStaffDocumentsByStatusData, ListStaffDocumentsByStatusVariables>;

interface ListStaffDocumentsByStatusRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListStaffDocumentsByStatusVariables): QueryRef<ListStaffDocumentsByStatusData, ListStaffDocumentsByStatusVariables>;
}
export const listStaffDocumentsByStatusRef: ListStaffDocumentsByStatusRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffDocumentsByStatus(dc: DataConnect, vars: ListStaffDocumentsByStatusVariables): QueryPromise<ListStaffDocumentsByStatusData, ListStaffDocumentsByStatusVariables>;

interface ListStaffDocumentsByStatusRef {
  ...
  (dc: DataConnect, vars: ListStaffDocumentsByStatusVariables): QueryRef<ListStaffDocumentsByStatusData, ListStaffDocumentsByStatusVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listAccounts(): QueryPromise<ListAccountsData, undefined>;

interface ListAccountsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListAccountsData, undefined>;
}
export const listAccountsRef: ListAccountsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listAccounts(dc: DataConnect): QueryPromise<ListAccountsData, undefined>;

interface ListAccountsRef {
  ...
  (dc: DataConnect): QueryRef<ListAccountsData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getAccountById(vars: GetAccountByIdVariables): QueryPromise<GetAccountByIdData, GetAccountByIdVariables>;

interface GetAccountByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetAccountByIdVariables): QueryRef<GetAccountByIdData, GetAccountByIdVariables>;
}
export const getAccountByIdRef: GetAccountByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getAccountById(dc: DataConnect, vars: GetAccountByIdVariables): QueryPromise<GetAccountByIdData, GetAccountByIdVariables>;

interface GetAccountByIdRef {
  ...
  (dc: DataConnect, vars: GetAccountByIdVariables): QueryRef<GetAccountByIdData, GetAccountByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getAccountsByOwnerId(vars: GetAccountsByOwnerIdVariables): QueryPromise<GetAccountsByOwnerIdData, GetAccountsByOwnerIdVariables>;

interface GetAccountsByOwnerIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetAccountsByOwnerIdVariables): QueryRef<GetAccountsByOwnerIdData, GetAccountsByOwnerIdVariables>;
}
export const getAccountsByOwnerIdRef: GetAccountsByOwnerIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getAccountsByOwnerId(dc: DataConnect, vars: GetAccountsByOwnerIdVariables): QueryPromise<GetAccountsByOwnerIdData, GetAccountsByOwnerIdVariables>;

interface GetAccountsByOwnerIdRef {
  ...
  (dc: DataConnect, vars: GetAccountsByOwnerIdVariables): QueryRef<GetAccountsByOwnerIdData, GetAccountsByOwnerIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterAccounts(vars?: FilterAccountsVariables): QueryPromise<FilterAccountsData, FilterAccountsVariables>;

interface FilterAccountsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterAccountsVariables): QueryRef<FilterAccountsData, FilterAccountsVariables>;
}
export const filterAccountsRef: FilterAccountsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterAccounts(dc: DataConnect, vars?: FilterAccountsVariables): QueryPromise<FilterAccountsData, FilterAccountsVariables>;

interface FilterAccountsRef {
  ...
  (dc: DataConnect, vars?: FilterAccountsVariables): QueryRef<FilterAccountsData, FilterAccountsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listApplications(): QueryPromise<ListApplicationsData, undefined>;

interface ListApplicationsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListApplicationsData, undefined>;
}
export const listApplicationsRef: ListApplicationsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listApplications(dc: DataConnect): QueryPromise<ListApplicationsData, undefined>;

interface ListApplicationsRef {
  ...
  (dc: DataConnect): QueryRef<ListApplicationsData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getApplicationById(vars: GetApplicationByIdVariables): QueryPromise<GetApplicationByIdData, GetApplicationByIdVariables>;

interface GetApplicationByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetApplicationByIdVariables): QueryRef<GetApplicationByIdData, GetApplicationByIdVariables>;
}
export const getApplicationByIdRef: GetApplicationByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getApplicationById(dc: DataConnect, vars: GetApplicationByIdVariables): QueryPromise<GetApplicationByIdData, GetApplicationByIdVariables>;

interface GetApplicationByIdRef {
  ...
  (dc: DataConnect, vars: GetApplicationByIdVariables): QueryRef<GetApplicationByIdData, GetApplicationByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getApplicationsByShiftId(vars: GetApplicationsByShiftIdVariables): QueryPromise<GetApplicationsByShiftIdData, GetApplicationsByShiftIdVariables>;

interface GetApplicationsByShiftIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetApplicationsByShiftIdVariables): QueryRef<GetApplicationsByShiftIdData, GetApplicationsByShiftIdVariables>;
}
export const getApplicationsByShiftIdRef: GetApplicationsByShiftIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getApplicationsByShiftId(dc: DataConnect, vars: GetApplicationsByShiftIdVariables): QueryPromise<GetApplicationsByShiftIdData, GetApplicationsByShiftIdVariables>;

interface GetApplicationsByShiftIdRef {
  ...
  (dc: DataConnect, vars: GetApplicationsByShiftIdVariables): QueryRef<GetApplicationsByShiftIdData, GetApplicationsByShiftIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getApplicationsByShiftIdAndStatus(vars: GetApplicationsByShiftIdAndStatusVariables): QueryPromise<GetApplicationsByShiftIdAndStatusData, GetApplicationsByShiftIdAndStatusVariables>;

interface GetApplicationsByShiftIdAndStatusRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetApplicationsByShiftIdAndStatusVariables): QueryRef<GetApplicationsByShiftIdAndStatusData, GetApplicationsByShiftIdAndStatusVariables>;
}
export const getApplicationsByShiftIdAndStatusRef: GetApplicationsByShiftIdAndStatusRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getApplicationsByShiftIdAndStatus(dc: DataConnect, vars: GetApplicationsByShiftIdAndStatusVariables): QueryPromise<GetApplicationsByShiftIdAndStatusData, GetApplicationsByShiftIdAndStatusVariables>;

interface GetApplicationsByShiftIdAndStatusRef {
  ...
  (dc: DataConnect, vars: GetApplicationsByShiftIdAndStatusVariables): QueryRef<GetApplicationsByShiftIdAndStatusData, GetApplicationsByShiftIdAndStatusVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getApplicationsByStaffId(vars: GetApplicationsByStaffIdVariables): QueryPromise<GetApplicationsByStaffIdData, GetApplicationsByStaffIdVariables>;

interface GetApplicationsByStaffIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetApplicationsByStaffIdVariables): QueryRef<GetApplicationsByStaffIdData, GetApplicationsByStaffIdVariables>;
}
export const getApplicationsByStaffIdRef: GetApplicationsByStaffIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getApplicationsByStaffId(dc: DataConnect, vars: GetApplicationsByStaffIdVariables): QueryPromise<GetApplicationsByStaffIdData, GetApplicationsByStaffIdVariables>;

interface GetApplicationsByStaffIdRef {
  ...
  (dc: DataConnect, vars: GetApplicationsByStaffIdVariables): QueryRef<GetApplicationsByStaffIdData, GetApplicationsByStaffIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

vaidateDayStaffApplication(vars: VaidateDayStaffApplicationVariables): QueryPromise<VaidateDayStaffApplicationData, VaidateDayStaffApplicationVariables>;

interface VaidateDayStaffApplicationRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: VaidateDayStaffApplicationVariables): QueryRef<VaidateDayStaffApplicationData, VaidateDayStaffApplicationVariables>;
}
export const vaidateDayStaffApplicationRef: VaidateDayStaffApplicationRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

vaidateDayStaffApplication(dc: DataConnect, vars: VaidateDayStaffApplicationVariables): QueryPromise<VaidateDayStaffApplicationData, VaidateDayStaffApplicationVariables>;

interface VaidateDayStaffApplicationRef {
  ...
  (dc: DataConnect, vars: VaidateDayStaffApplicationVariables): QueryRef<VaidateDayStaffApplicationData, VaidateDayStaffApplicationVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getApplicationByStaffShiftAndRole(vars: GetApplicationByStaffShiftAndRoleVariables): QueryPromise<GetApplicationByStaffShiftAndRoleData, GetApplicationByStaffShiftAndRoleVariables>;

interface GetApplicationByStaffShiftAndRoleRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetApplicationByStaffShiftAndRoleVariables): QueryRef<GetApplicationByStaffShiftAndRoleData, GetApplicationByStaffShiftAndRoleVariables>;
}
export const getApplicationByStaffShiftAndRoleRef: GetApplicationByStaffShiftAndRoleRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getApplicationByStaffShiftAndRole(dc: DataConnect, vars: GetApplicationByStaffShiftAndRoleVariables): QueryPromise<GetApplicationByStaffShiftAndRoleData, GetApplicationByStaffShiftAndRoleVariables>;

interface GetApplicationByStaffShiftAndRoleRef {
  ...
  (dc: DataConnect, vars: GetApplicationByStaffShiftAndRoleVariables): QueryRef<GetApplicationByStaffShiftAndRoleData, GetApplicationByStaffShiftAndRoleVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listAcceptedApplicationsByShiftRoleKey(vars: ListAcceptedApplicationsByShiftRoleKeyVariables): QueryPromise<ListAcceptedApplicationsByShiftRoleKeyData, ListAcceptedApplicationsByShiftRoleKeyVariables>;

interface ListAcceptedApplicationsByShiftRoleKeyRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListAcceptedApplicationsByShiftRoleKeyVariables): QueryRef<ListAcceptedApplicationsByShiftRoleKeyData, ListAcceptedApplicationsByShiftRoleKeyVariables>;
}
export const listAcceptedApplicationsByShiftRoleKeyRef: ListAcceptedApplicationsByShiftRoleKeyRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listAcceptedApplicationsByShiftRoleKey(dc: DataConnect, vars: ListAcceptedApplicationsByShiftRoleKeyVariables): QueryPromise<ListAcceptedApplicationsByShiftRoleKeyData, ListAcceptedApplicationsByShiftRoleKeyVariables>;

interface ListAcceptedApplicationsByShiftRoleKeyRef {
  ...
  (dc: DataConnect, vars: ListAcceptedApplicationsByShiftRoleKeyVariables): QueryRef<ListAcceptedApplicationsByShiftRoleKeyData, ListAcceptedApplicationsByShiftRoleKeyVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listAcceptedApplicationsByBusinessForDay(vars: ListAcceptedApplicationsByBusinessForDayVariables): QueryPromise<ListAcceptedApplicationsByBusinessForDayData, ListAcceptedApplicationsByBusinessForDayVariables>;

interface ListAcceptedApplicationsByBusinessForDayRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListAcceptedApplicationsByBusinessForDayVariables): QueryRef<ListAcceptedApplicationsByBusinessForDayData, ListAcceptedApplicationsByBusinessForDayVariables>;
}
export const listAcceptedApplicationsByBusinessForDayRef: ListAcceptedApplicationsByBusinessForDayRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listAcceptedApplicationsByBusinessForDay(dc: DataConnect, vars: ListAcceptedApplicationsByBusinessForDayVariables): QueryPromise<ListAcceptedApplicationsByBusinessForDayData, ListAcceptedApplicationsByBusinessForDayVariables>;

interface ListAcceptedApplicationsByBusinessForDayRef {
  ...
  (dc: DataConnect, vars: ListAcceptedApplicationsByBusinessForDayVariables): QueryRef<ListAcceptedApplicationsByBusinessForDayData, ListAcceptedApplicationsByBusinessForDayVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listStaffsApplicationsByBusinessForDay(vars: ListStaffsApplicationsByBusinessForDayVariables): QueryPromise<ListStaffsApplicationsByBusinessForDayData, ListStaffsApplicationsByBusinessForDayVariables>;

interface ListStaffsApplicationsByBusinessForDayRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListStaffsApplicationsByBusinessForDayVariables): QueryRef<ListStaffsApplicationsByBusinessForDayData, ListStaffsApplicationsByBusinessForDayVariables>;
}
export const listStaffsApplicationsByBusinessForDayRef: ListStaffsApplicationsByBusinessForDayRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffsApplicationsByBusinessForDay(dc: DataConnect, vars: ListStaffsApplicationsByBusinessForDayVariables): QueryPromise<ListStaffsApplicationsByBusinessForDayData, ListStaffsApplicationsByBusinessForDayVariables>;

interface ListStaffsApplicationsByBusinessForDayRef {
  ...
  (dc: DataConnect, vars: ListStaffsApplicationsByBusinessForDayVariables): QueryRef<ListStaffsApplicationsByBusinessForDayData, ListStaffsApplicationsByBusinessForDayVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listCompletedApplicationsByStaffId(vars: ListCompletedApplicationsByStaffIdVariables): QueryPromise<ListCompletedApplicationsByStaffIdData, ListCompletedApplicationsByStaffIdVariables>;

interface ListCompletedApplicationsByStaffIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListCompletedApplicationsByStaffIdVariables): QueryRef<ListCompletedApplicationsByStaffIdData, ListCompletedApplicationsByStaffIdVariables>;
}
export const listCompletedApplicationsByStaffIdRef: ListCompletedApplicationsByStaffIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listCompletedApplicationsByStaffId(dc: DataConnect, vars: ListCompletedApplicationsByStaffIdVariables): QueryPromise<ListCompletedApplicationsByStaffIdData, ListCompletedApplicationsByStaffIdVariables>;

interface ListCompletedApplicationsByStaffIdRef {
  ...
  (dc: DataConnect, vars: ListCompletedApplicationsByStaffIdVariables): QueryRef<ListCompletedApplicationsByStaffIdData, ListCompletedApplicationsByStaffIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listAttireOptions(): QueryPromise<ListAttireOptionsData, undefined>;

interface ListAttireOptionsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListAttireOptionsData, undefined>;
}
export const listAttireOptionsRef: ListAttireOptionsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listAttireOptions(dc: DataConnect): QueryPromise<ListAttireOptionsData, undefined>;

interface ListAttireOptionsRef {
  ...
  (dc: DataConnect): QueryRef<ListAttireOptionsData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getAttireOptionById(vars: GetAttireOptionByIdVariables): QueryPromise<GetAttireOptionByIdData, GetAttireOptionByIdVariables>;

interface GetAttireOptionByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetAttireOptionByIdVariables): QueryRef<GetAttireOptionByIdData, GetAttireOptionByIdVariables>;
}
export const getAttireOptionByIdRef: GetAttireOptionByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getAttireOptionById(dc: DataConnect, vars: GetAttireOptionByIdVariables): QueryPromise<GetAttireOptionByIdData, GetAttireOptionByIdVariables>;

interface GetAttireOptionByIdRef {
  ...
  (dc: DataConnect, vars: GetAttireOptionByIdVariables): QueryRef<GetAttireOptionByIdData, GetAttireOptionByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterAttireOptions(vars?: FilterAttireOptionsVariables): QueryPromise<FilterAttireOptionsData, FilterAttireOptionsVariables>;

interface FilterAttireOptionsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterAttireOptionsVariables): QueryRef<FilterAttireOptionsData, FilterAttireOptionsVariables>;
}
export const filterAttireOptionsRef: FilterAttireOptionsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterAttireOptions(dc: DataConnect, vars?: FilterAttireOptionsVariables): QueryPromise<FilterAttireOptionsData, FilterAttireOptionsVariables>;

interface FilterAttireOptionsRef {
  ...
  (dc: DataConnect, vars?: FilterAttireOptionsVariables): QueryRef<FilterAttireOptionsData, FilterAttireOptionsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listCustomRateCards(): QueryPromise<ListCustomRateCardsData, undefined>;

interface ListCustomRateCardsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListCustomRateCardsData, undefined>;
}
export const listCustomRateCardsRef: ListCustomRateCardsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listCustomRateCards(dc: DataConnect): QueryPromise<ListCustomRateCardsData, undefined>;

interface ListCustomRateCardsRef {
  ...
  (dc: DataConnect): QueryRef<ListCustomRateCardsData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getCustomRateCardById(vars: GetCustomRateCardByIdVariables): QueryPromise<GetCustomRateCardByIdData, GetCustomRateCardByIdVariables>;

interface GetCustomRateCardByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetCustomRateCardByIdVariables): QueryRef<GetCustomRateCardByIdData, GetCustomRateCardByIdVariables>;
}
export const getCustomRateCardByIdRef: GetCustomRateCardByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getCustomRateCardById(dc: DataConnect, vars: GetCustomRateCardByIdVariables): QueryPromise<GetCustomRateCardByIdData, GetCustomRateCardByIdVariables>;

interface GetCustomRateCardByIdRef {
  ...
  (dc: DataConnect, vars: GetCustomRateCardByIdVariables): QueryRef<GetCustomRateCardByIdData, GetCustomRateCardByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listRoleCategories(): QueryPromise<ListRoleCategoriesData, undefined>;

interface ListRoleCategoriesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListRoleCategoriesData, undefined>;
}
export const listRoleCategoriesRef: ListRoleCategoriesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listRoleCategories(dc: DataConnect): QueryPromise<ListRoleCategoriesData, undefined>;

interface ListRoleCategoriesRef {
  ...
  (dc: DataConnect): QueryRef<ListRoleCategoriesData, undefined>;
}
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:

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. It has the following fields:

export interface ListRoleCategoriesData {
  roleCategories: ({
    id: UUIDString;
    roleName: string;
    category: RoleCategoryType;
    createdAt?: TimestampString | null;
    updatedAt?: TimestampString | null;
  } & RoleCategory_Key)[];
}

Using listRoleCategories's action shortcut function

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

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:

getRoleCategoryById(vars: GetRoleCategoryByIdVariables): QueryPromise<GetRoleCategoryByIdData, GetRoleCategoryByIdVariables>;

interface GetRoleCategoryByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetRoleCategoryByIdVariables): QueryRef<GetRoleCategoryByIdData, GetRoleCategoryByIdVariables>;
}
export const getRoleCategoryByIdRef: GetRoleCategoryByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getRoleCategoryById(dc: DataConnect, vars: GetRoleCategoryByIdVariables): QueryPromise<GetRoleCategoryByIdData, GetRoleCategoryByIdVariables>;

interface GetRoleCategoryByIdRef {
  ...
  (dc: DataConnect, vars: GetRoleCategoryByIdVariables): QueryRef<GetRoleCategoryByIdData, GetRoleCategoryByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface GetRoleCategoryByIdData {
  roleCategory?: {
    id: UUIDString;
    roleName: string;
    category: RoleCategoryType;
    createdAt?: TimestampString | null;
    updatedAt?: TimestampString | null;
  } & RoleCategory_Key;
}

Using getRoleCategoryById's action shortcut function

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

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:

getRoleCategoriesByCategory(vars: GetRoleCategoriesByCategoryVariables): QueryPromise<GetRoleCategoriesByCategoryData, GetRoleCategoriesByCategoryVariables>;

interface GetRoleCategoriesByCategoryRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetRoleCategoriesByCategoryVariables): QueryRef<GetRoleCategoriesByCategoryData, GetRoleCategoriesByCategoryVariables>;
}
export const getRoleCategoriesByCategoryRef: GetRoleCategoriesByCategoryRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getRoleCategoriesByCategory(dc: DataConnect, vars: GetRoleCategoriesByCategoryVariables): QueryPromise<GetRoleCategoriesByCategoryData, GetRoleCategoriesByCategoryVariables>;

interface GetRoleCategoriesByCategoryRef {
  ...
  (dc: DataConnect, vars: GetRoleCategoriesByCategoryVariables): QueryRef<GetRoleCategoriesByCategoryData, GetRoleCategoriesByCategoryVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface GetRoleCategoriesByCategoryData {
  roleCategories: ({
    id: UUIDString;
    roleName: string;
    category: RoleCategoryType;
  } & RoleCategory_Key)[];
}

Using getRoleCategoriesByCategory's action shortcut function

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

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:

listStaffAvailabilities(vars?: ListStaffAvailabilitiesVariables): QueryPromise<ListStaffAvailabilitiesData, ListStaffAvailabilitiesVariables>;

interface ListStaffAvailabilitiesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListStaffAvailabilitiesVariables): QueryRef<ListStaffAvailabilitiesData, ListStaffAvailabilitiesVariables>;
}
export const listStaffAvailabilitiesRef: ListStaffAvailabilitiesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffAvailabilities(dc: DataConnect, vars?: ListStaffAvailabilitiesVariables): QueryPromise<ListStaffAvailabilitiesData, ListStaffAvailabilitiesVariables>;

interface ListStaffAvailabilitiesRef {
  ...
  (dc: DataConnect, vars?: ListStaffAvailabilitiesVariables): QueryRef<ListStaffAvailabilitiesData, ListStaffAvailabilitiesVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listStaffAvailabilitiesByStaffId(vars: ListStaffAvailabilitiesByStaffIdVariables): QueryPromise<ListStaffAvailabilitiesByStaffIdData, ListStaffAvailabilitiesByStaffIdVariables>;

interface ListStaffAvailabilitiesByStaffIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListStaffAvailabilitiesByStaffIdVariables): QueryRef<ListStaffAvailabilitiesByStaffIdData, ListStaffAvailabilitiesByStaffIdVariables>;
}
export const listStaffAvailabilitiesByStaffIdRef: ListStaffAvailabilitiesByStaffIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffAvailabilitiesByStaffId(dc: DataConnect, vars: ListStaffAvailabilitiesByStaffIdVariables): QueryPromise<ListStaffAvailabilitiesByStaffIdData, ListStaffAvailabilitiesByStaffIdVariables>;

interface ListStaffAvailabilitiesByStaffIdRef {
  ...
  (dc: DataConnect, vars: ListStaffAvailabilitiesByStaffIdVariables): QueryRef<ListStaffAvailabilitiesByStaffIdData, ListStaffAvailabilitiesByStaffIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getStaffAvailabilityByKey(vars: GetStaffAvailabilityByKeyVariables): QueryPromise<GetStaffAvailabilityByKeyData, GetStaffAvailabilityByKeyVariables>;

interface GetStaffAvailabilityByKeyRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetStaffAvailabilityByKeyVariables): QueryRef<GetStaffAvailabilityByKeyData, GetStaffAvailabilityByKeyVariables>;
}
export const getStaffAvailabilityByKeyRef: GetStaffAvailabilityByKeyRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getStaffAvailabilityByKey(dc: DataConnect, vars: GetStaffAvailabilityByKeyVariables): QueryPromise<GetStaffAvailabilityByKeyData, GetStaffAvailabilityByKeyVariables>;

interface GetStaffAvailabilityByKeyRef {
  ...
  (dc: DataConnect, vars: GetStaffAvailabilityByKeyVariables): QueryRef<GetStaffAvailabilityByKeyData, GetStaffAvailabilityByKeyVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listStaffAvailabilitiesByDay(vars: ListStaffAvailabilitiesByDayVariables): QueryPromise<ListStaffAvailabilitiesByDayData, ListStaffAvailabilitiesByDayVariables>;

interface ListStaffAvailabilitiesByDayRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListStaffAvailabilitiesByDayVariables): QueryRef<ListStaffAvailabilitiesByDayData, ListStaffAvailabilitiesByDayVariables>;
}
export const listStaffAvailabilitiesByDayRef: ListStaffAvailabilitiesByDayRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffAvailabilitiesByDay(dc: DataConnect, vars: ListStaffAvailabilitiesByDayVariables): QueryPromise<ListStaffAvailabilitiesByDayData, ListStaffAvailabilitiesByDayVariables>;

interface ListStaffAvailabilitiesByDayRef {
  ...
  (dc: DataConnect, vars: ListStaffAvailabilitiesByDayVariables): QueryRef<ListStaffAvailabilitiesByDayData, ListStaffAvailabilitiesByDayVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listRecentPayments(vars?: ListRecentPaymentsVariables): QueryPromise<ListRecentPaymentsData, ListRecentPaymentsVariables>;

interface ListRecentPaymentsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListRecentPaymentsVariables): QueryRef<ListRecentPaymentsData, ListRecentPaymentsVariables>;
}
export const listRecentPaymentsRef: ListRecentPaymentsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listRecentPayments(dc: DataConnect, vars?: ListRecentPaymentsVariables): QueryPromise<ListRecentPaymentsData, ListRecentPaymentsVariables>;

interface ListRecentPaymentsRef {
  ...
  (dc: DataConnect, vars?: ListRecentPaymentsVariables): QueryRef<ListRecentPaymentsData, ListRecentPaymentsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getRecentPaymentById(vars: GetRecentPaymentByIdVariables): QueryPromise<GetRecentPaymentByIdData, GetRecentPaymentByIdVariables>;

interface GetRecentPaymentByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetRecentPaymentByIdVariables): QueryRef<GetRecentPaymentByIdData, GetRecentPaymentByIdVariables>;
}
export const getRecentPaymentByIdRef: GetRecentPaymentByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getRecentPaymentById(dc: DataConnect, vars: GetRecentPaymentByIdVariables): QueryPromise<GetRecentPaymentByIdData, GetRecentPaymentByIdVariables>;

interface GetRecentPaymentByIdRef {
  ...
  (dc: DataConnect, vars: GetRecentPaymentByIdVariables): QueryRef<GetRecentPaymentByIdData, GetRecentPaymentByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listRecentPaymentsByStaffId(vars: ListRecentPaymentsByStaffIdVariables): QueryPromise<ListRecentPaymentsByStaffIdData, ListRecentPaymentsByStaffIdVariables>;

interface ListRecentPaymentsByStaffIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListRecentPaymentsByStaffIdVariables): QueryRef<ListRecentPaymentsByStaffIdData, ListRecentPaymentsByStaffIdVariables>;
}
export const listRecentPaymentsByStaffIdRef: ListRecentPaymentsByStaffIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listRecentPaymentsByStaffId(dc: DataConnect, vars: ListRecentPaymentsByStaffIdVariables): QueryPromise<ListRecentPaymentsByStaffIdData, ListRecentPaymentsByStaffIdVariables>;

interface ListRecentPaymentsByStaffIdRef {
  ...
  (dc: DataConnect, vars: ListRecentPaymentsByStaffIdVariables): QueryRef<ListRecentPaymentsByStaffIdData, ListRecentPaymentsByStaffIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listRecentPaymentsByApplicationId(vars: ListRecentPaymentsByApplicationIdVariables): QueryPromise<ListRecentPaymentsByApplicationIdData, ListRecentPaymentsByApplicationIdVariables>;

interface ListRecentPaymentsByApplicationIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListRecentPaymentsByApplicationIdVariables): QueryRef<ListRecentPaymentsByApplicationIdData, ListRecentPaymentsByApplicationIdVariables>;
}
export const listRecentPaymentsByApplicationIdRef: ListRecentPaymentsByApplicationIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listRecentPaymentsByApplicationId(dc: DataConnect, vars: ListRecentPaymentsByApplicationIdVariables): QueryPromise<ListRecentPaymentsByApplicationIdData, ListRecentPaymentsByApplicationIdVariables>;

interface ListRecentPaymentsByApplicationIdRef {
  ...
  (dc: DataConnect, vars: ListRecentPaymentsByApplicationIdVariables): QueryRef<ListRecentPaymentsByApplicationIdData, ListRecentPaymentsByApplicationIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listRecentPaymentsByInvoiceId(vars: ListRecentPaymentsByInvoiceIdVariables): QueryPromise<ListRecentPaymentsByInvoiceIdData, ListRecentPaymentsByInvoiceIdVariables>;

interface ListRecentPaymentsByInvoiceIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListRecentPaymentsByInvoiceIdVariables): QueryRef<ListRecentPaymentsByInvoiceIdData, ListRecentPaymentsByInvoiceIdVariables>;
}
export const listRecentPaymentsByInvoiceIdRef: ListRecentPaymentsByInvoiceIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listRecentPaymentsByInvoiceId(dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdVariables): QueryPromise<ListRecentPaymentsByInvoiceIdData, ListRecentPaymentsByInvoiceIdVariables>;

interface ListRecentPaymentsByInvoiceIdRef {
  ...
  (dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdVariables): QueryRef<ListRecentPaymentsByInvoiceIdData, ListRecentPaymentsByInvoiceIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listRecentPaymentsByStatus(vars: ListRecentPaymentsByStatusVariables): QueryPromise<ListRecentPaymentsByStatusData, ListRecentPaymentsByStatusVariables>;

interface ListRecentPaymentsByStatusRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListRecentPaymentsByStatusVariables): QueryRef<ListRecentPaymentsByStatusData, ListRecentPaymentsByStatusVariables>;
}
export const listRecentPaymentsByStatusRef: ListRecentPaymentsByStatusRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listRecentPaymentsByStatus(dc: DataConnect, vars: ListRecentPaymentsByStatusVariables): QueryPromise<ListRecentPaymentsByStatusData, ListRecentPaymentsByStatusVariables>;

interface ListRecentPaymentsByStatusRef {
  ...
  (dc: DataConnect, vars: ListRecentPaymentsByStatusVariables): QueryRef<ListRecentPaymentsByStatusData, ListRecentPaymentsByStatusVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listRecentPaymentsByInvoiceIds(vars: ListRecentPaymentsByInvoiceIdsVariables): QueryPromise<ListRecentPaymentsByInvoiceIdsData, ListRecentPaymentsByInvoiceIdsVariables>;

interface ListRecentPaymentsByInvoiceIdsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListRecentPaymentsByInvoiceIdsVariables): QueryRef<ListRecentPaymentsByInvoiceIdsData, ListRecentPaymentsByInvoiceIdsVariables>;
}
export const listRecentPaymentsByInvoiceIdsRef: ListRecentPaymentsByInvoiceIdsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listRecentPaymentsByInvoiceIds(dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdsVariables): QueryPromise<ListRecentPaymentsByInvoiceIdsData, ListRecentPaymentsByInvoiceIdsVariables>;

interface ListRecentPaymentsByInvoiceIdsRef {
  ...
  (dc: DataConnect, vars: ListRecentPaymentsByInvoiceIdsVariables): QueryRef<ListRecentPaymentsByInvoiceIdsData, ListRecentPaymentsByInvoiceIdsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listRecentPaymentsByBusinessId(vars: ListRecentPaymentsByBusinessIdVariables): QueryPromise<ListRecentPaymentsByBusinessIdData, ListRecentPaymentsByBusinessIdVariables>;

interface ListRecentPaymentsByBusinessIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListRecentPaymentsByBusinessIdVariables): QueryRef<ListRecentPaymentsByBusinessIdData, ListRecentPaymentsByBusinessIdVariables>;
}
export const listRecentPaymentsByBusinessIdRef: ListRecentPaymentsByBusinessIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listRecentPaymentsByBusinessId(dc: DataConnect, vars: ListRecentPaymentsByBusinessIdVariables): QueryPromise<ListRecentPaymentsByBusinessIdData, ListRecentPaymentsByBusinessIdVariables>;

interface ListRecentPaymentsByBusinessIdRef {
  ...
  (dc: DataConnect, vars: ListRecentPaymentsByBusinessIdVariables): QueryRef<ListRecentPaymentsByBusinessIdData, ListRecentPaymentsByBusinessIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listBusinesses(): QueryPromise<ListBusinessesData, undefined>;

interface ListBusinessesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListBusinessesData, undefined>;
}
export const listBusinessesRef: ListBusinessesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listBusinesses(dc: DataConnect): QueryPromise<ListBusinessesData, undefined>;

interface ListBusinessesRef {
  ...
  (dc: DataConnect): QueryRef<ListBusinessesData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getBusinessesByUserId(vars: GetBusinessesByUserIdVariables): QueryPromise<GetBusinessesByUserIdData, GetBusinessesByUserIdVariables>;

interface GetBusinessesByUserIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetBusinessesByUserIdVariables): QueryRef<GetBusinessesByUserIdData, GetBusinessesByUserIdVariables>;
}
export const getBusinessesByUserIdRef: GetBusinessesByUserIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getBusinessesByUserId(dc: DataConnect, vars: GetBusinessesByUserIdVariables): QueryPromise<GetBusinessesByUserIdData, GetBusinessesByUserIdVariables>;

interface GetBusinessesByUserIdRef {
  ...
  (dc: DataConnect, vars: GetBusinessesByUserIdVariables): QueryRef<GetBusinessesByUserIdData, GetBusinessesByUserIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getBusinessById(vars: GetBusinessByIdVariables): QueryPromise<GetBusinessByIdData, GetBusinessByIdVariables>;

interface GetBusinessByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetBusinessByIdVariables): QueryRef<GetBusinessByIdData, GetBusinessByIdVariables>;
}
export const getBusinessByIdRef: GetBusinessByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getBusinessById(dc: DataConnect, vars: GetBusinessByIdVariables): QueryPromise<GetBusinessByIdData, GetBusinessByIdVariables>;

interface GetBusinessByIdRef {
  ...
  (dc: DataConnect, vars: GetBusinessByIdVariables): QueryRef<GetBusinessByIdData, GetBusinessByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listConversations(vars?: ListConversationsVariables): QueryPromise<ListConversationsData, ListConversationsVariables>;

interface ListConversationsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListConversationsVariables): QueryRef<ListConversationsData, ListConversationsVariables>;
}
export const listConversationsRef: ListConversationsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listConversations(dc: DataConnect, vars?: ListConversationsVariables): QueryPromise<ListConversationsData, ListConversationsVariables>;

interface ListConversationsRef {
  ...
  (dc: DataConnect, vars?: ListConversationsVariables): QueryRef<ListConversationsData, ListConversationsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getConversationById(vars: GetConversationByIdVariables): QueryPromise<GetConversationByIdData, GetConversationByIdVariables>;

interface GetConversationByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetConversationByIdVariables): QueryRef<GetConversationByIdData, GetConversationByIdVariables>;
}
export const getConversationByIdRef: GetConversationByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getConversationById(dc: DataConnect, vars: GetConversationByIdVariables): QueryPromise<GetConversationByIdData, GetConversationByIdVariables>;

interface GetConversationByIdRef {
  ...
  (dc: DataConnect, vars: GetConversationByIdVariables): QueryRef<GetConversationByIdData, GetConversationByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listConversationsByType(vars: ListConversationsByTypeVariables): QueryPromise<ListConversationsByTypeData, ListConversationsByTypeVariables>;

interface ListConversationsByTypeRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListConversationsByTypeVariables): QueryRef<ListConversationsByTypeData, ListConversationsByTypeVariables>;
}
export const listConversationsByTypeRef: ListConversationsByTypeRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listConversationsByType(dc: DataConnect, vars: ListConversationsByTypeVariables): QueryPromise<ListConversationsByTypeData, ListConversationsByTypeVariables>;

interface ListConversationsByTypeRef {
  ...
  (dc: DataConnect, vars: ListConversationsByTypeVariables): QueryRef<ListConversationsByTypeData, ListConversationsByTypeVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listConversationsByStatus(vars: ListConversationsByStatusVariables): QueryPromise<ListConversationsByStatusData, ListConversationsByStatusVariables>;

interface ListConversationsByStatusRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListConversationsByStatusVariables): QueryRef<ListConversationsByStatusData, ListConversationsByStatusVariables>;
}
export const listConversationsByStatusRef: ListConversationsByStatusRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listConversationsByStatus(dc: DataConnect, vars: ListConversationsByStatusVariables): QueryPromise<ListConversationsByStatusData, ListConversationsByStatusVariables>;

interface ListConversationsByStatusRef {
  ...
  (dc: DataConnect, vars: ListConversationsByStatusVariables): QueryRef<ListConversationsByStatusData, ListConversationsByStatusVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterConversations(vars?: FilterConversationsVariables): QueryPromise<FilterConversationsData, FilterConversationsVariables>;

interface FilterConversationsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterConversationsVariables): QueryRef<FilterConversationsData, FilterConversationsVariables>;
}
export const filterConversationsRef: FilterConversationsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterConversations(dc: DataConnect, vars?: FilterConversationsVariables): QueryPromise<FilterConversationsData, FilterConversationsVariables>;

interface FilterConversationsRef {
  ...
  (dc: DataConnect, vars?: FilterConversationsVariables): QueryRef<FilterConversationsData, FilterConversationsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listOrders(vars?: ListOrdersVariables): QueryPromise<ListOrdersData, ListOrdersVariables>;

interface ListOrdersRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListOrdersVariables): QueryRef<ListOrdersData, ListOrdersVariables>;
}
export const listOrdersRef: ListOrdersRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listOrders(dc: DataConnect, vars?: ListOrdersVariables): QueryPromise<ListOrdersData, ListOrdersVariables>;

interface ListOrdersRef {
  ...
  (dc: DataConnect, vars?: ListOrdersVariables): QueryRef<ListOrdersData, ListOrdersVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getOrderById(vars: GetOrderByIdVariables): QueryPromise<GetOrderByIdData, GetOrderByIdVariables>;

interface GetOrderByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetOrderByIdVariables): QueryRef<GetOrderByIdData, GetOrderByIdVariables>;
}
export const getOrderByIdRef: GetOrderByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getOrderById(dc: DataConnect, vars: GetOrderByIdVariables): QueryPromise<GetOrderByIdData, GetOrderByIdVariables>;

interface GetOrderByIdRef {
  ...
  (dc: DataConnect, vars: GetOrderByIdVariables): QueryRef<GetOrderByIdData, GetOrderByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getOrdersByBusinessId(vars: GetOrdersByBusinessIdVariables): QueryPromise<GetOrdersByBusinessIdData, GetOrdersByBusinessIdVariables>;

interface GetOrdersByBusinessIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetOrdersByBusinessIdVariables): QueryRef<GetOrdersByBusinessIdData, GetOrdersByBusinessIdVariables>;
}
export const getOrdersByBusinessIdRef: GetOrdersByBusinessIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getOrdersByBusinessId(dc: DataConnect, vars: GetOrdersByBusinessIdVariables): QueryPromise<GetOrdersByBusinessIdData, GetOrdersByBusinessIdVariables>;

interface GetOrdersByBusinessIdRef {
  ...
  (dc: DataConnect, vars: GetOrdersByBusinessIdVariables): QueryRef<GetOrdersByBusinessIdData, GetOrdersByBusinessIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getOrdersByVendorId(vars: GetOrdersByVendorIdVariables): QueryPromise<GetOrdersByVendorIdData, GetOrdersByVendorIdVariables>;

interface GetOrdersByVendorIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetOrdersByVendorIdVariables): QueryRef<GetOrdersByVendorIdData, GetOrdersByVendorIdVariables>;
}
export const getOrdersByVendorIdRef: GetOrdersByVendorIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getOrdersByVendorId(dc: DataConnect, vars: GetOrdersByVendorIdVariables): QueryPromise<GetOrdersByVendorIdData, GetOrdersByVendorIdVariables>;

interface GetOrdersByVendorIdRef {
  ...
  (dc: DataConnect, vars: GetOrdersByVendorIdVariables): QueryRef<GetOrdersByVendorIdData, GetOrdersByVendorIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getOrdersByStatus(vars: GetOrdersByStatusVariables): QueryPromise<GetOrdersByStatusData, GetOrdersByStatusVariables>;

interface GetOrdersByStatusRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetOrdersByStatusVariables): QueryRef<GetOrdersByStatusData, GetOrdersByStatusVariables>;
}
export const getOrdersByStatusRef: GetOrdersByStatusRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getOrdersByStatus(dc: DataConnect, vars: GetOrdersByStatusVariables): QueryPromise<GetOrdersByStatusData, GetOrdersByStatusVariables>;

interface GetOrdersByStatusRef {
  ...
  (dc: DataConnect, vars: GetOrdersByStatusVariables): QueryRef<GetOrdersByStatusData, GetOrdersByStatusVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getOrdersByDateRange(vars: GetOrdersByDateRangeVariables): QueryPromise<GetOrdersByDateRangeData, GetOrdersByDateRangeVariables>;

interface GetOrdersByDateRangeRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetOrdersByDateRangeVariables): QueryRef<GetOrdersByDateRangeData, GetOrdersByDateRangeVariables>;
}
export const getOrdersByDateRangeRef: GetOrdersByDateRangeRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getOrdersByDateRange(dc: DataConnect, vars: GetOrdersByDateRangeVariables): QueryPromise<GetOrdersByDateRangeData, GetOrdersByDateRangeVariables>;

interface GetOrdersByDateRangeRef {
  ...
  (dc: DataConnect, vars: GetOrdersByDateRangeVariables): QueryRef<GetOrdersByDateRangeData, GetOrdersByDateRangeVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getRapidOrders(vars?: GetRapidOrdersVariables): QueryPromise<GetRapidOrdersData, GetRapidOrdersVariables>;

interface GetRapidOrdersRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: GetRapidOrdersVariables): QueryRef<GetRapidOrdersData, GetRapidOrdersVariables>;
}
export const getRapidOrdersRef: GetRapidOrdersRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getRapidOrders(dc: DataConnect, vars?: GetRapidOrdersVariables): QueryPromise<GetRapidOrdersData, GetRapidOrdersVariables>;

interface GetRapidOrdersRef {
  ...
  (dc: DataConnect, vars?: GetRapidOrdersVariables): QueryRef<GetRapidOrdersData, GetRapidOrdersVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listOrdersByBusinessAndTeamHub(vars: ListOrdersByBusinessAndTeamHubVariables): QueryPromise<ListOrdersByBusinessAndTeamHubData, ListOrdersByBusinessAndTeamHubVariables>;

interface ListOrdersByBusinessAndTeamHubRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListOrdersByBusinessAndTeamHubVariables): QueryRef<ListOrdersByBusinessAndTeamHubData, ListOrdersByBusinessAndTeamHubVariables>;
}
export const listOrdersByBusinessAndTeamHubRef: ListOrdersByBusinessAndTeamHubRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listOrdersByBusinessAndTeamHub(dc: DataConnect, vars: ListOrdersByBusinessAndTeamHubVariables): QueryPromise<ListOrdersByBusinessAndTeamHubData, ListOrdersByBusinessAndTeamHubVariables>;

interface ListOrdersByBusinessAndTeamHubRef {
  ...
  (dc: DataConnect, vars: ListOrdersByBusinessAndTeamHubVariables): QueryRef<ListOrdersByBusinessAndTeamHubData, ListOrdersByBusinessAndTeamHubVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listStaffRoles(vars?: ListStaffRolesVariables): QueryPromise<ListStaffRolesData, ListStaffRolesVariables>;

interface ListStaffRolesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListStaffRolesVariables): QueryRef<ListStaffRolesData, ListStaffRolesVariables>;
}
export const listStaffRolesRef: ListStaffRolesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffRoles(dc: DataConnect, vars?: ListStaffRolesVariables): QueryPromise<ListStaffRolesData, ListStaffRolesVariables>;

interface ListStaffRolesRef {
  ...
  (dc: DataConnect, vars?: ListStaffRolesVariables): QueryRef<ListStaffRolesData, ListStaffRolesVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getStaffRoleByKey(vars: GetStaffRoleByKeyVariables): QueryPromise<GetStaffRoleByKeyData, GetStaffRoleByKeyVariables>;

interface GetStaffRoleByKeyRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetStaffRoleByKeyVariables): QueryRef<GetStaffRoleByKeyData, GetStaffRoleByKeyVariables>;
}
export const getStaffRoleByKeyRef: GetStaffRoleByKeyRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getStaffRoleByKey(dc: DataConnect, vars: GetStaffRoleByKeyVariables): QueryPromise<GetStaffRoleByKeyData, GetStaffRoleByKeyVariables>;

interface GetStaffRoleByKeyRef {
  ...
  (dc: DataConnect, vars: GetStaffRoleByKeyVariables): QueryRef<GetStaffRoleByKeyData, GetStaffRoleByKeyVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listStaffRolesByStaffId(vars: ListStaffRolesByStaffIdVariables): QueryPromise<ListStaffRolesByStaffIdData, ListStaffRolesByStaffIdVariables>;

interface ListStaffRolesByStaffIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListStaffRolesByStaffIdVariables): QueryRef<ListStaffRolesByStaffIdData, ListStaffRolesByStaffIdVariables>;
}
export const listStaffRolesByStaffIdRef: ListStaffRolesByStaffIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffRolesByStaffId(dc: DataConnect, vars: ListStaffRolesByStaffIdVariables): QueryPromise<ListStaffRolesByStaffIdData, ListStaffRolesByStaffIdVariables>;

interface ListStaffRolesByStaffIdRef {
  ...
  (dc: DataConnect, vars: ListStaffRolesByStaffIdVariables): QueryRef<ListStaffRolesByStaffIdData, ListStaffRolesByStaffIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listStaffRolesByRoleId(vars: ListStaffRolesByRoleIdVariables): QueryPromise<ListStaffRolesByRoleIdData, ListStaffRolesByRoleIdVariables>;

interface ListStaffRolesByRoleIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListStaffRolesByRoleIdVariables): QueryRef<ListStaffRolesByRoleIdData, ListStaffRolesByRoleIdVariables>;
}
export const listStaffRolesByRoleIdRef: ListStaffRolesByRoleIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffRolesByRoleId(dc: DataConnect, vars: ListStaffRolesByRoleIdVariables): QueryPromise<ListStaffRolesByRoleIdData, ListStaffRolesByRoleIdVariables>;

interface ListStaffRolesByRoleIdRef {
  ...
  (dc: DataConnect, vars: ListStaffRolesByRoleIdVariables): QueryRef<ListStaffRolesByRoleIdData, ListStaffRolesByRoleIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterStaffRoles(vars?: FilterStaffRolesVariables): QueryPromise<FilterStaffRolesData, FilterStaffRolesVariables>;

interface FilterStaffRolesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterStaffRolesVariables): QueryRef<FilterStaffRolesData, FilterStaffRolesVariables>;
}
export const filterStaffRolesRef: FilterStaffRolesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterStaffRoles(dc: DataConnect, vars?: FilterStaffRolesVariables): QueryPromise<FilterStaffRolesData, FilterStaffRolesVariables>;

interface FilterStaffRolesRef {
  ...
  (dc: DataConnect, vars?: FilterStaffRolesVariables): QueryRef<FilterStaffRolesData, FilterStaffRolesVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface FilterStaffRolesData {
  staffRoles: ({
    id: UUIDString;
    staffId: UUIDString;
    roleId: UUIDString;
    createdAt?: TimestampString | null;
    roleType?: RoleType | null;
  } & StaffRole_Key)[];
}

Using filterStaffRoles's action shortcut function

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

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:

listTaskComments(): QueryPromise<ListTaskCommentsData, undefined>;

interface ListTaskCommentsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListTaskCommentsData, undefined>;
}
export const listTaskCommentsRef: ListTaskCommentsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listTaskComments(dc: DataConnect): QueryPromise<ListTaskCommentsData, undefined>;

interface ListTaskCommentsRef {
  ...
  (dc: DataConnect): QueryRef<ListTaskCommentsData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getTaskCommentById(vars: GetTaskCommentByIdVariables): QueryPromise<GetTaskCommentByIdData, GetTaskCommentByIdVariables>;

interface GetTaskCommentByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetTaskCommentByIdVariables): QueryRef<GetTaskCommentByIdData, GetTaskCommentByIdVariables>;
}
export const getTaskCommentByIdRef: GetTaskCommentByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getTaskCommentById(dc: DataConnect, vars: GetTaskCommentByIdVariables): QueryPromise<GetTaskCommentByIdData, GetTaskCommentByIdVariables>;

interface GetTaskCommentByIdRef {
  ...
  (dc: DataConnect, vars: GetTaskCommentByIdVariables): QueryRef<GetTaskCommentByIdData, GetTaskCommentByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getTaskCommentsByTaskId(vars: GetTaskCommentsByTaskIdVariables): QueryPromise<GetTaskCommentsByTaskIdData, GetTaskCommentsByTaskIdVariables>;

interface GetTaskCommentsByTaskIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetTaskCommentsByTaskIdVariables): QueryRef<GetTaskCommentsByTaskIdData, GetTaskCommentsByTaskIdVariables>;
}
export const getTaskCommentsByTaskIdRef: GetTaskCommentsByTaskIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getTaskCommentsByTaskId(dc: DataConnect, vars: GetTaskCommentsByTaskIdVariables): QueryPromise<GetTaskCommentsByTaskIdData, GetTaskCommentsByTaskIdVariables>;

interface GetTaskCommentsByTaskIdRef {
  ...
  (dc: DataConnect, vars: GetTaskCommentsByTaskIdVariables): QueryRef<GetTaskCommentsByTaskIdData, GetTaskCommentsByTaskIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listDocuments(): QueryPromise<ListDocumentsData, undefined>;

interface ListDocumentsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListDocumentsData, undefined>;
}
export const listDocumentsRef: ListDocumentsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listDocuments(dc: DataConnect): QueryPromise<ListDocumentsData, undefined>;

interface ListDocumentsRef {
  ...
  (dc: DataConnect): QueryRef<ListDocumentsData, undefined>;
}
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:

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. It has the following fields:

export interface ListDocumentsData {
  documents: ({
    id: UUIDString;
    documentType: DocumentType;
    name: string;
    description?: string | null;
    createdAt?: TimestampString | null;
  } & Document_Key)[];
}

Using listDocuments's action shortcut function

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

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:

getDocumentById(vars: GetDocumentByIdVariables): QueryPromise<GetDocumentByIdData, GetDocumentByIdVariables>;

interface GetDocumentByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetDocumentByIdVariables): QueryRef<GetDocumentByIdData, GetDocumentByIdVariables>;
}
export const getDocumentByIdRef: GetDocumentByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getDocumentById(dc: DataConnect, vars: GetDocumentByIdVariables): QueryPromise<GetDocumentByIdData, GetDocumentByIdVariables>;

interface GetDocumentByIdRef {
  ...
  (dc: DataConnect, vars: GetDocumentByIdVariables): QueryRef<GetDocumentByIdData, GetDocumentByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface GetDocumentByIdData {
  document?: {
    id: UUIDString;
    documentType: DocumentType;
    name: string;
    description?: string | null;
    createdAt?: TimestampString | null;
  } & Document_Key;
}

Using getDocumentById's action shortcut function

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

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:

filterDocuments(vars?: FilterDocumentsVariables): QueryPromise<FilterDocumentsData, FilterDocumentsVariables>;

interface FilterDocumentsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterDocumentsVariables): QueryRef<FilterDocumentsData, FilterDocumentsVariables>;
}
export const filterDocumentsRef: FilterDocumentsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterDocuments(dc: DataConnect, vars?: FilterDocumentsVariables): QueryPromise<FilterDocumentsData, FilterDocumentsVariables>;

interface FilterDocumentsRef {
  ...
  (dc: DataConnect, vars?: FilterDocumentsVariables): QueryRef<FilterDocumentsData, FilterDocumentsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface FilterDocumentsData {
  documents: ({
    id: UUIDString;
    documentType: DocumentType;
    name: string;
    description?: string | null;
    createdAt?: TimestampString | null;
  } & Document_Key)[];
}

Using filterDocuments's action shortcut function

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

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:

listShiftsForCoverage(vars: ListShiftsForCoverageVariables): QueryPromise<ListShiftsForCoverageData, ListShiftsForCoverageVariables>;

interface ListShiftsForCoverageRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftsForCoverageVariables): QueryRef<ListShiftsForCoverageData, ListShiftsForCoverageVariables>;
}
export const listShiftsForCoverageRef: ListShiftsForCoverageRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftsForCoverage(dc: DataConnect, vars: ListShiftsForCoverageVariables): QueryPromise<ListShiftsForCoverageData, ListShiftsForCoverageVariables>;

interface ListShiftsForCoverageRef {
  ...
  (dc: DataConnect, vars: ListShiftsForCoverageVariables): QueryRef<ListShiftsForCoverageData, ListShiftsForCoverageVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listApplicationsForCoverage(vars: ListApplicationsForCoverageVariables): QueryPromise<ListApplicationsForCoverageData, ListApplicationsForCoverageVariables>;

interface ListApplicationsForCoverageRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListApplicationsForCoverageVariables): QueryRef<ListApplicationsForCoverageData, ListApplicationsForCoverageVariables>;
}
export const listApplicationsForCoverageRef: ListApplicationsForCoverageRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listApplicationsForCoverage(dc: DataConnect, vars: ListApplicationsForCoverageVariables): QueryPromise<ListApplicationsForCoverageData, ListApplicationsForCoverageVariables>;

interface ListApplicationsForCoverageRef {
  ...
  (dc: DataConnect, vars: ListApplicationsForCoverageVariables): QueryRef<ListApplicationsForCoverageData, ListApplicationsForCoverageVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface ListApplicationsForCoverageData {
  applications: ({
    id: UUIDString;
    shiftId: UUIDString;
    staffId: UUIDString;
    status: ApplicationStatus;
  } & Application_Key)[];
}

Using listApplicationsForCoverage's action shortcut function

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

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:

listShiftsForDailyOpsByBusiness(vars: ListShiftsForDailyOpsByBusinessVariables): QueryPromise<ListShiftsForDailyOpsByBusinessData, ListShiftsForDailyOpsByBusinessVariables>;

interface ListShiftsForDailyOpsByBusinessRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftsForDailyOpsByBusinessVariables): QueryRef<ListShiftsForDailyOpsByBusinessData, ListShiftsForDailyOpsByBusinessVariables>;
}
export const listShiftsForDailyOpsByBusinessRef: ListShiftsForDailyOpsByBusinessRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftsForDailyOpsByBusiness(dc: DataConnect, vars: ListShiftsForDailyOpsByBusinessVariables): QueryPromise<ListShiftsForDailyOpsByBusinessData, ListShiftsForDailyOpsByBusinessVariables>;

interface ListShiftsForDailyOpsByBusinessRef {
  ...
  (dc: DataConnect, vars: ListShiftsForDailyOpsByBusinessVariables): QueryRef<ListShiftsForDailyOpsByBusinessData, ListShiftsForDailyOpsByBusinessVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftsForDailyOpsByVendor(vars: ListShiftsForDailyOpsByVendorVariables): QueryPromise<ListShiftsForDailyOpsByVendorData, ListShiftsForDailyOpsByVendorVariables>;

interface ListShiftsForDailyOpsByVendorRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftsForDailyOpsByVendorVariables): QueryRef<ListShiftsForDailyOpsByVendorData, ListShiftsForDailyOpsByVendorVariables>;
}
export const listShiftsForDailyOpsByVendorRef: ListShiftsForDailyOpsByVendorRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftsForDailyOpsByVendor(dc: DataConnect, vars: ListShiftsForDailyOpsByVendorVariables): QueryPromise<ListShiftsForDailyOpsByVendorData, ListShiftsForDailyOpsByVendorVariables>;

interface ListShiftsForDailyOpsByVendorRef {
  ...
  (dc: DataConnect, vars: ListShiftsForDailyOpsByVendorVariables): QueryRef<ListShiftsForDailyOpsByVendorData, ListShiftsForDailyOpsByVendorVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listApplicationsForDailyOps(vars: ListApplicationsForDailyOpsVariables): QueryPromise<ListApplicationsForDailyOpsData, ListApplicationsForDailyOpsVariables>;

interface ListApplicationsForDailyOpsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListApplicationsForDailyOpsVariables): QueryRef<ListApplicationsForDailyOpsData, ListApplicationsForDailyOpsVariables>;
}
export const listApplicationsForDailyOpsRef: ListApplicationsForDailyOpsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listApplicationsForDailyOps(dc: DataConnect, vars: ListApplicationsForDailyOpsVariables): QueryPromise<ListApplicationsForDailyOpsData, ListApplicationsForDailyOpsVariables>;

interface ListApplicationsForDailyOpsRef {
  ...
  (dc: DataConnect, vars: ListApplicationsForDailyOpsVariables): QueryRef<ListApplicationsForDailyOpsData, ListApplicationsForDailyOpsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftsForForecastByBusiness(vars: ListShiftsForForecastByBusinessVariables): QueryPromise<ListShiftsForForecastByBusinessData, ListShiftsForForecastByBusinessVariables>;

interface ListShiftsForForecastByBusinessRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftsForForecastByBusinessVariables): QueryRef<ListShiftsForForecastByBusinessData, ListShiftsForForecastByBusinessVariables>;
}
export const listShiftsForForecastByBusinessRef: ListShiftsForForecastByBusinessRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftsForForecastByBusiness(dc: DataConnect, vars: ListShiftsForForecastByBusinessVariables): QueryPromise<ListShiftsForForecastByBusinessData, ListShiftsForForecastByBusinessVariables>;

interface ListShiftsForForecastByBusinessRef {
  ...
  (dc: DataConnect, vars: ListShiftsForForecastByBusinessVariables): QueryRef<ListShiftsForForecastByBusinessData, ListShiftsForForecastByBusinessVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftsForForecastByVendor(vars: ListShiftsForForecastByVendorVariables): QueryPromise<ListShiftsForForecastByVendorData, ListShiftsForForecastByVendorVariables>;

interface ListShiftsForForecastByVendorRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftsForForecastByVendorVariables): QueryRef<ListShiftsForForecastByVendorData, ListShiftsForForecastByVendorVariables>;
}
export const listShiftsForForecastByVendorRef: ListShiftsForForecastByVendorRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftsForForecastByVendor(dc: DataConnect, vars: ListShiftsForForecastByVendorVariables): QueryPromise<ListShiftsForForecastByVendorData, ListShiftsForForecastByVendorVariables>;

interface ListShiftsForForecastByVendorRef {
  ...
  (dc: DataConnect, vars: ListShiftsForForecastByVendorVariables): QueryRef<ListShiftsForForecastByVendorData, ListShiftsForForecastByVendorVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftsForNoShowRangeByBusiness(vars: ListShiftsForNoShowRangeByBusinessVariables): QueryPromise<ListShiftsForNoShowRangeByBusinessData, ListShiftsForNoShowRangeByBusinessVariables>;

interface ListShiftsForNoShowRangeByBusinessRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftsForNoShowRangeByBusinessVariables): QueryRef<ListShiftsForNoShowRangeByBusinessData, ListShiftsForNoShowRangeByBusinessVariables>;
}
export const listShiftsForNoShowRangeByBusinessRef: ListShiftsForNoShowRangeByBusinessRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftsForNoShowRangeByBusiness(dc: DataConnect, vars: ListShiftsForNoShowRangeByBusinessVariables): QueryPromise<ListShiftsForNoShowRangeByBusinessData, ListShiftsForNoShowRangeByBusinessVariables>;

interface ListShiftsForNoShowRangeByBusinessRef {
  ...
  (dc: DataConnect, vars: ListShiftsForNoShowRangeByBusinessVariables): QueryRef<ListShiftsForNoShowRangeByBusinessData, ListShiftsForNoShowRangeByBusinessVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface ListShiftsForNoShowRangeByBusinessData {
  shifts: ({
    id: UUIDString;
    date?: TimestampString | null;
  } & Shift_Key)[];
}

Using listShiftsForNoShowRangeByBusiness's action shortcut function

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

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:

listShiftsForNoShowRangeByVendor(vars: ListShiftsForNoShowRangeByVendorVariables): QueryPromise<ListShiftsForNoShowRangeByVendorData, ListShiftsForNoShowRangeByVendorVariables>;

interface ListShiftsForNoShowRangeByVendorRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftsForNoShowRangeByVendorVariables): QueryRef<ListShiftsForNoShowRangeByVendorData, ListShiftsForNoShowRangeByVendorVariables>;
}
export const listShiftsForNoShowRangeByVendorRef: ListShiftsForNoShowRangeByVendorRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftsForNoShowRangeByVendor(dc: DataConnect, vars: ListShiftsForNoShowRangeByVendorVariables): QueryPromise<ListShiftsForNoShowRangeByVendorData, ListShiftsForNoShowRangeByVendorVariables>;

interface ListShiftsForNoShowRangeByVendorRef {
  ...
  (dc: DataConnect, vars: ListShiftsForNoShowRangeByVendorVariables): QueryRef<ListShiftsForNoShowRangeByVendorData, ListShiftsForNoShowRangeByVendorVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface ListShiftsForNoShowRangeByVendorData {
  shifts: ({
    id: UUIDString;
    date?: TimestampString | null;
  } & Shift_Key)[];
}

Using listShiftsForNoShowRangeByVendor's action shortcut function

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

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:

listApplicationsForNoShowRange(vars: ListApplicationsForNoShowRangeVariables): QueryPromise<ListApplicationsForNoShowRangeData, ListApplicationsForNoShowRangeVariables>;

interface ListApplicationsForNoShowRangeRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListApplicationsForNoShowRangeVariables): QueryRef<ListApplicationsForNoShowRangeData, ListApplicationsForNoShowRangeVariables>;
}
export const listApplicationsForNoShowRangeRef: ListApplicationsForNoShowRangeRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listApplicationsForNoShowRange(dc: DataConnect, vars: ListApplicationsForNoShowRangeVariables): QueryPromise<ListApplicationsForNoShowRangeData, ListApplicationsForNoShowRangeVariables>;

interface ListApplicationsForNoShowRangeRef {
  ...
  (dc: DataConnect, vars: ListApplicationsForNoShowRangeVariables): QueryRef<ListApplicationsForNoShowRangeData, ListApplicationsForNoShowRangeVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface ListApplicationsForNoShowRangeData {
  applications: ({
    id: UUIDString;
    shiftId: UUIDString;
    staffId: UUIDString;
    status: ApplicationStatus;
  } & Application_Key)[];
}

Using listApplicationsForNoShowRange's action shortcut function

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

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:

listStaffForNoShowReport(vars: ListStaffForNoShowReportVariables): QueryPromise<ListStaffForNoShowReportData, ListStaffForNoShowReportVariables>;

interface ListStaffForNoShowReportRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListStaffForNoShowReportVariables): QueryRef<ListStaffForNoShowReportData, ListStaffForNoShowReportVariables>;
}
export const listStaffForNoShowReportRef: ListStaffForNoShowReportRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffForNoShowReport(dc: DataConnect, vars: ListStaffForNoShowReportVariables): QueryPromise<ListStaffForNoShowReportData, ListStaffForNoShowReportVariables>;

interface ListStaffForNoShowReportRef {
  ...
  (dc: DataConnect, vars: ListStaffForNoShowReportVariables): QueryRef<ListStaffForNoShowReportData, ListStaffForNoShowReportVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface ListStaffForNoShowReportData {
  staffs: ({
    id: UUIDString;
    fullName: string;
    noShowCount?: number | null;
    reliabilityScore?: number | null;
  } & Staff_Key)[];
}

Using listStaffForNoShowReport's action shortcut function

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

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:

listInvoicesForSpendByBusiness(vars: ListInvoicesForSpendByBusinessVariables): QueryPromise<ListInvoicesForSpendByBusinessData, ListInvoicesForSpendByBusinessVariables>;

interface ListInvoicesForSpendByBusinessRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListInvoicesForSpendByBusinessVariables): QueryRef<ListInvoicesForSpendByBusinessData, ListInvoicesForSpendByBusinessVariables>;
}
export const listInvoicesForSpendByBusinessRef: ListInvoicesForSpendByBusinessRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listInvoicesForSpendByBusiness(dc: DataConnect, vars: ListInvoicesForSpendByBusinessVariables): QueryPromise<ListInvoicesForSpendByBusinessData, ListInvoicesForSpendByBusinessVariables>;

interface ListInvoicesForSpendByBusinessRef {
  ...
  (dc: DataConnect, vars: ListInvoicesForSpendByBusinessVariables): QueryRef<ListInvoicesForSpendByBusinessData, ListInvoicesForSpendByBusinessVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listInvoicesForSpendByVendor(vars: ListInvoicesForSpendByVendorVariables): QueryPromise<ListInvoicesForSpendByVendorData, ListInvoicesForSpendByVendorVariables>;

interface ListInvoicesForSpendByVendorRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListInvoicesForSpendByVendorVariables): QueryRef<ListInvoicesForSpendByVendorData, ListInvoicesForSpendByVendorVariables>;
}
export const listInvoicesForSpendByVendorRef: ListInvoicesForSpendByVendorRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listInvoicesForSpendByVendor(dc: DataConnect, vars: ListInvoicesForSpendByVendorVariables): QueryPromise<ListInvoicesForSpendByVendorData, ListInvoicesForSpendByVendorVariables>;

interface ListInvoicesForSpendByVendorRef {
  ...
  (dc: DataConnect, vars: ListInvoicesForSpendByVendorVariables): QueryRef<ListInvoicesForSpendByVendorData, ListInvoicesForSpendByVendorVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listInvoicesForSpendByOrder(vars: ListInvoicesForSpendByOrderVariables): QueryPromise<ListInvoicesForSpendByOrderData, ListInvoicesForSpendByOrderVariables>;

interface ListInvoicesForSpendByOrderRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListInvoicesForSpendByOrderVariables): QueryRef<ListInvoicesForSpendByOrderData, ListInvoicesForSpendByOrderVariables>;
}
export const listInvoicesForSpendByOrderRef: ListInvoicesForSpendByOrderRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listInvoicesForSpendByOrder(dc: DataConnect, vars: ListInvoicesForSpendByOrderVariables): QueryPromise<ListInvoicesForSpendByOrderData, ListInvoicesForSpendByOrderVariables>;

interface ListInvoicesForSpendByOrderRef {
  ...
  (dc: DataConnect, vars: ListInvoicesForSpendByOrderVariables): QueryRef<ListInvoicesForSpendByOrderData, ListInvoicesForSpendByOrderVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listTimesheetsForSpend(vars: ListTimesheetsForSpendVariables): QueryPromise<ListTimesheetsForSpendData, ListTimesheetsForSpendVariables>;

interface ListTimesheetsForSpendRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListTimesheetsForSpendVariables): QueryRef<ListTimesheetsForSpendData, ListTimesheetsForSpendVariables>;
}
export const listTimesheetsForSpendRef: ListTimesheetsForSpendRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listTimesheetsForSpend(dc: DataConnect, vars: ListTimesheetsForSpendVariables): QueryPromise<ListTimesheetsForSpendData, ListTimesheetsForSpendVariables>;

interface ListTimesheetsForSpendRef {
  ...
  (dc: DataConnect, vars: ListTimesheetsForSpendVariables): QueryRef<ListTimesheetsForSpendData, ListTimesheetsForSpendVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftsForPerformanceByBusiness(vars: ListShiftsForPerformanceByBusinessVariables): QueryPromise<ListShiftsForPerformanceByBusinessData, ListShiftsForPerformanceByBusinessVariables>;

interface ListShiftsForPerformanceByBusinessRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftsForPerformanceByBusinessVariables): QueryRef<ListShiftsForPerformanceByBusinessData, ListShiftsForPerformanceByBusinessVariables>;
}
export const listShiftsForPerformanceByBusinessRef: ListShiftsForPerformanceByBusinessRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftsForPerformanceByBusiness(dc: DataConnect, vars: ListShiftsForPerformanceByBusinessVariables): QueryPromise<ListShiftsForPerformanceByBusinessData, ListShiftsForPerformanceByBusinessVariables>;

interface ListShiftsForPerformanceByBusinessRef {
  ...
  (dc: DataConnect, vars: ListShiftsForPerformanceByBusinessVariables): QueryRef<ListShiftsForPerformanceByBusinessData, ListShiftsForPerformanceByBusinessVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftsForPerformanceByVendor(vars: ListShiftsForPerformanceByVendorVariables): QueryPromise<ListShiftsForPerformanceByVendorData, ListShiftsForPerformanceByVendorVariables>;

interface ListShiftsForPerformanceByVendorRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftsForPerformanceByVendorVariables): QueryRef<ListShiftsForPerformanceByVendorData, ListShiftsForPerformanceByVendorVariables>;
}
export const listShiftsForPerformanceByVendorRef: ListShiftsForPerformanceByVendorRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftsForPerformanceByVendor(dc: DataConnect, vars: ListShiftsForPerformanceByVendorVariables): QueryPromise<ListShiftsForPerformanceByVendorData, ListShiftsForPerformanceByVendorVariables>;

interface ListShiftsForPerformanceByVendorRef {
  ...
  (dc: DataConnect, vars: ListShiftsForPerformanceByVendorVariables): QueryRef<ListShiftsForPerformanceByVendorData, ListShiftsForPerformanceByVendorVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listApplicationsForPerformance(vars: ListApplicationsForPerformanceVariables): QueryPromise<ListApplicationsForPerformanceData, ListApplicationsForPerformanceVariables>;

interface ListApplicationsForPerformanceRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListApplicationsForPerformanceVariables): QueryRef<ListApplicationsForPerformanceData, ListApplicationsForPerformanceVariables>;
}
export const listApplicationsForPerformanceRef: ListApplicationsForPerformanceRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listApplicationsForPerformance(dc: DataConnect, vars: ListApplicationsForPerformanceVariables): QueryPromise<ListApplicationsForPerformanceData, ListApplicationsForPerformanceVariables>;

interface ListApplicationsForPerformanceRef {
  ...
  (dc: DataConnect, vars: ListApplicationsForPerformanceVariables): QueryRef<ListApplicationsForPerformanceData, ListApplicationsForPerformanceVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listStaffForPerformance(vars: ListStaffForPerformanceVariables): QueryPromise<ListStaffForPerformanceData, ListStaffForPerformanceVariables>;

interface ListStaffForPerformanceRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListStaffForPerformanceVariables): QueryRef<ListStaffForPerformanceData, ListStaffForPerformanceVariables>;
}
export const listStaffForPerformanceRef: ListStaffForPerformanceRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffForPerformance(dc: DataConnect, vars: ListStaffForPerformanceVariables): QueryPromise<ListStaffForPerformanceData, ListStaffForPerformanceVariables>;

interface ListStaffForPerformanceRef {
  ...
  (dc: DataConnect, vars: ListStaffForPerformanceVariables): QueryRef<ListStaffForPerformanceData, ListStaffForPerformanceVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listRoles(): QueryPromise<ListRolesData, undefined>;

interface ListRolesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListRolesData, undefined>;
}
export const listRolesRef: ListRolesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listRoles(dc: DataConnect): QueryPromise<ListRolesData, undefined>;

interface ListRolesRef {
  ...
  (dc: DataConnect): QueryRef<ListRolesData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getRoleById(vars: GetRoleByIdVariables): QueryPromise<GetRoleByIdData, GetRoleByIdVariables>;

interface GetRoleByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetRoleByIdVariables): QueryRef<GetRoleByIdData, GetRoleByIdVariables>;
}
export const getRoleByIdRef: GetRoleByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getRoleById(dc: DataConnect, vars: GetRoleByIdVariables): QueryPromise<GetRoleByIdData, GetRoleByIdVariables>;

interface GetRoleByIdRef {
  ...
  (dc: DataConnect, vars: GetRoleByIdVariables): QueryRef<GetRoleByIdData, GetRoleByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listRolesByVendorId(vars: ListRolesByVendorIdVariables): QueryPromise<ListRolesByVendorIdData, ListRolesByVendorIdVariables>;

interface ListRolesByVendorIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListRolesByVendorIdVariables): QueryRef<ListRolesByVendorIdData, ListRolesByVendorIdVariables>;
}
export const listRolesByVendorIdRef: ListRolesByVendorIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listRolesByVendorId(dc: DataConnect, vars: ListRolesByVendorIdVariables): QueryPromise<ListRolesByVendorIdData, ListRolesByVendorIdVariables>;

interface ListRolesByVendorIdRef {
  ...
  (dc: DataConnect, vars: ListRolesByVendorIdVariables): QueryRef<ListRolesByVendorIdData, ListRolesByVendorIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listRolesByroleCategoryId(vars: ListRolesByroleCategoryIdVariables): QueryPromise<ListRolesByroleCategoryIdData, ListRolesByroleCategoryIdVariables>;

interface ListRolesByroleCategoryIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListRolesByroleCategoryIdVariables): QueryRef<ListRolesByroleCategoryIdData, ListRolesByroleCategoryIdVariables>;
}
export const listRolesByroleCategoryIdRef: ListRolesByroleCategoryIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listRolesByroleCategoryId(dc: DataConnect, vars: ListRolesByroleCategoryIdVariables): QueryPromise<ListRolesByroleCategoryIdData, ListRolesByroleCategoryIdVariables>;

interface ListRolesByroleCategoryIdRef {
  ...
  (dc: DataConnect, vars: ListRolesByroleCategoryIdVariables): QueryRef<ListRolesByroleCategoryIdData, ListRolesByroleCategoryIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getShiftRoleById(vars: GetShiftRoleByIdVariables): QueryPromise<GetShiftRoleByIdData, GetShiftRoleByIdVariables>;

interface GetShiftRoleByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetShiftRoleByIdVariables): QueryRef<GetShiftRoleByIdData, GetShiftRoleByIdVariables>;
}
export const getShiftRoleByIdRef: GetShiftRoleByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getShiftRoleById(dc: DataConnect, vars: GetShiftRoleByIdVariables): QueryPromise<GetShiftRoleByIdData, GetShiftRoleByIdVariables>;

interface GetShiftRoleByIdRef {
  ...
  (dc: DataConnect, vars: GetShiftRoleByIdVariables): QueryRef<GetShiftRoleByIdData, GetShiftRoleByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftRolesByShiftId(vars: ListShiftRolesByShiftIdVariables): QueryPromise<ListShiftRolesByShiftIdData, ListShiftRolesByShiftIdVariables>;

interface ListShiftRolesByShiftIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftRolesByShiftIdVariables): QueryRef<ListShiftRolesByShiftIdData, ListShiftRolesByShiftIdVariables>;
}
export const listShiftRolesByShiftIdRef: ListShiftRolesByShiftIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftRolesByShiftId(dc: DataConnect, vars: ListShiftRolesByShiftIdVariables): QueryPromise<ListShiftRolesByShiftIdData, ListShiftRolesByShiftIdVariables>;

interface ListShiftRolesByShiftIdRef {
  ...
  (dc: DataConnect, vars: ListShiftRolesByShiftIdVariables): QueryRef<ListShiftRolesByShiftIdData, ListShiftRolesByShiftIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftRolesByRoleId(vars: ListShiftRolesByRoleIdVariables): QueryPromise<ListShiftRolesByRoleIdData, ListShiftRolesByRoleIdVariables>;

interface ListShiftRolesByRoleIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftRolesByRoleIdVariables): QueryRef<ListShiftRolesByRoleIdData, ListShiftRolesByRoleIdVariables>;
}
export const listShiftRolesByRoleIdRef: ListShiftRolesByRoleIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftRolesByRoleId(dc: DataConnect, vars: ListShiftRolesByRoleIdVariables): QueryPromise<ListShiftRolesByRoleIdData, ListShiftRolesByRoleIdVariables>;

interface ListShiftRolesByRoleIdRef {
  ...
  (dc: DataConnect, vars: ListShiftRolesByRoleIdVariables): QueryRef<ListShiftRolesByRoleIdData, ListShiftRolesByRoleIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftRolesByShiftIdAndTimeRange(vars: ListShiftRolesByShiftIdAndTimeRangeVariables): QueryPromise<ListShiftRolesByShiftIdAndTimeRangeData, ListShiftRolesByShiftIdAndTimeRangeVariables>;

interface ListShiftRolesByShiftIdAndTimeRangeRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftRolesByShiftIdAndTimeRangeVariables): QueryRef<ListShiftRolesByShiftIdAndTimeRangeData, ListShiftRolesByShiftIdAndTimeRangeVariables>;
}
export const listShiftRolesByShiftIdAndTimeRangeRef: ListShiftRolesByShiftIdAndTimeRangeRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftRolesByShiftIdAndTimeRange(dc: DataConnect, vars: ListShiftRolesByShiftIdAndTimeRangeVariables): QueryPromise<ListShiftRolesByShiftIdAndTimeRangeData, ListShiftRolesByShiftIdAndTimeRangeVariables>;

interface ListShiftRolesByShiftIdAndTimeRangeRef {
  ...
  (dc: DataConnect, vars: ListShiftRolesByShiftIdAndTimeRangeVariables): QueryRef<ListShiftRolesByShiftIdAndTimeRangeData, ListShiftRolesByShiftIdAndTimeRangeVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftRolesByVendorId(vars: ListShiftRolesByVendorIdVariables): QueryPromise<ListShiftRolesByVendorIdData, ListShiftRolesByVendorIdVariables>;

interface ListShiftRolesByVendorIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftRolesByVendorIdVariables): QueryRef<ListShiftRolesByVendorIdData, ListShiftRolesByVendorIdVariables>;
}
export const listShiftRolesByVendorIdRef: ListShiftRolesByVendorIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftRolesByVendorId(dc: DataConnect, vars: ListShiftRolesByVendorIdVariables): QueryPromise<ListShiftRolesByVendorIdData, ListShiftRolesByVendorIdVariables>;

interface ListShiftRolesByVendorIdRef {
  ...
  (dc: DataConnect, vars: ListShiftRolesByVendorIdVariables): QueryRef<ListShiftRolesByVendorIdData, ListShiftRolesByVendorIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftRolesByBusinessAndDateRange(vars: ListShiftRolesByBusinessAndDateRangeVariables): QueryPromise<ListShiftRolesByBusinessAndDateRangeData, ListShiftRolesByBusinessAndDateRangeVariables>;

interface ListShiftRolesByBusinessAndDateRangeRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftRolesByBusinessAndDateRangeVariables): QueryRef<ListShiftRolesByBusinessAndDateRangeData, ListShiftRolesByBusinessAndDateRangeVariables>;
}
export const listShiftRolesByBusinessAndDateRangeRef: ListShiftRolesByBusinessAndDateRangeRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftRolesByBusinessAndDateRange(dc: DataConnect, vars: ListShiftRolesByBusinessAndDateRangeVariables): QueryPromise<ListShiftRolesByBusinessAndDateRangeData, ListShiftRolesByBusinessAndDateRangeVariables>;

interface ListShiftRolesByBusinessAndDateRangeRef {
  ...
  (dc: DataConnect, vars: ListShiftRolesByBusinessAndDateRangeVariables): QueryRef<ListShiftRolesByBusinessAndDateRangeData, ListShiftRolesByBusinessAndDateRangeVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftRolesByBusinessAndOrder(vars: ListShiftRolesByBusinessAndOrderVariables): QueryPromise<ListShiftRolesByBusinessAndOrderData, ListShiftRolesByBusinessAndOrderVariables>;

interface ListShiftRolesByBusinessAndOrderRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftRolesByBusinessAndOrderVariables): QueryRef<ListShiftRolesByBusinessAndOrderData, ListShiftRolesByBusinessAndOrderVariables>;
}
export const listShiftRolesByBusinessAndOrderRef: ListShiftRolesByBusinessAndOrderRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftRolesByBusinessAndOrder(dc: DataConnect, vars: ListShiftRolesByBusinessAndOrderVariables): QueryPromise<ListShiftRolesByBusinessAndOrderData, ListShiftRolesByBusinessAndOrderVariables>;

interface ListShiftRolesByBusinessAndOrderRef {
  ...
  (dc: DataConnect, vars: ListShiftRolesByBusinessAndOrderVariables): QueryRef<ListShiftRolesByBusinessAndOrderData, ListShiftRolesByBusinessAndOrderVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftRolesByBusinessDateRangeCompletedOrders(vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables): QueryPromise<ListShiftRolesByBusinessDateRangeCompletedOrdersData, ListShiftRolesByBusinessDateRangeCompletedOrdersVariables>;

interface ListShiftRolesByBusinessDateRangeCompletedOrdersRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables): QueryRef<ListShiftRolesByBusinessDateRangeCompletedOrdersData, ListShiftRolesByBusinessDateRangeCompletedOrdersVariables>;
}
export const listShiftRolesByBusinessDateRangeCompletedOrdersRef: ListShiftRolesByBusinessDateRangeCompletedOrdersRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftRolesByBusinessDateRangeCompletedOrders(dc: DataConnect, vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables): QueryPromise<ListShiftRolesByBusinessDateRangeCompletedOrdersData, ListShiftRolesByBusinessDateRangeCompletedOrdersVariables>;

interface ListShiftRolesByBusinessDateRangeCompletedOrdersRef {
  ...
  (dc: DataConnect, vars: ListShiftRolesByBusinessDateRangeCompletedOrdersVariables): QueryRef<ListShiftRolesByBusinessDateRangeCompletedOrdersData, ListShiftRolesByBusinessDateRangeCompletedOrdersVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listShiftRolesByBusinessAndDatesSummary(vars: ListShiftRolesByBusinessAndDatesSummaryVariables): QueryPromise<ListShiftRolesByBusinessAndDatesSummaryData, ListShiftRolesByBusinessAndDatesSummaryVariables>;

interface ListShiftRolesByBusinessAndDatesSummaryRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListShiftRolesByBusinessAndDatesSummaryVariables): QueryRef<ListShiftRolesByBusinessAndDatesSummaryData, ListShiftRolesByBusinessAndDatesSummaryVariables>;
}
export const listShiftRolesByBusinessAndDatesSummaryRef: ListShiftRolesByBusinessAndDatesSummaryRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listShiftRolesByBusinessAndDatesSummary(dc: DataConnect, vars: ListShiftRolesByBusinessAndDatesSummaryVariables): QueryPromise<ListShiftRolesByBusinessAndDatesSummaryData, ListShiftRolesByBusinessAndDatesSummaryVariables>;

interface ListShiftRolesByBusinessAndDatesSummaryRef {
  ...
  (dc: DataConnect, vars: ListShiftRolesByBusinessAndDatesSummaryVariables): QueryRef<ListShiftRolesByBusinessAndDatesSummaryData, ListShiftRolesByBusinessAndDatesSummaryVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getCompletedShiftsByBusinessId(vars: GetCompletedShiftsByBusinessIdVariables): QueryPromise<GetCompletedShiftsByBusinessIdData, GetCompletedShiftsByBusinessIdVariables>;

interface GetCompletedShiftsByBusinessIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetCompletedShiftsByBusinessIdVariables): QueryRef<GetCompletedShiftsByBusinessIdData, GetCompletedShiftsByBusinessIdVariables>;
}
export const getCompletedShiftsByBusinessIdRef: GetCompletedShiftsByBusinessIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getCompletedShiftsByBusinessId(dc: DataConnect, vars: GetCompletedShiftsByBusinessIdVariables): QueryPromise<GetCompletedShiftsByBusinessIdData, GetCompletedShiftsByBusinessIdVariables>;

interface GetCompletedShiftsByBusinessIdRef {
  ...
  (dc: DataConnect, vars: GetCompletedShiftsByBusinessIdVariables): QueryRef<GetCompletedShiftsByBusinessIdData, GetCompletedShiftsByBusinessIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listTaxForms(vars?: ListTaxFormsVariables): QueryPromise<ListTaxFormsData, ListTaxFormsVariables>;

interface ListTaxFormsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListTaxFormsVariables): QueryRef<ListTaxFormsData, ListTaxFormsVariables>;
}
export const listTaxFormsRef: ListTaxFormsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listTaxForms(dc: DataConnect, vars?: ListTaxFormsVariables): QueryPromise<ListTaxFormsData, ListTaxFormsVariables>;

interface ListTaxFormsRef {
  ...
  (dc: DataConnect, vars?: ListTaxFormsVariables): QueryRef<ListTaxFormsData, ListTaxFormsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getTaxFormById(vars: GetTaxFormByIdVariables): QueryPromise<GetTaxFormByIdData, GetTaxFormByIdVariables>;

interface GetTaxFormByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetTaxFormByIdVariables): QueryRef<GetTaxFormByIdData, GetTaxFormByIdVariables>;
}
export const getTaxFormByIdRef: GetTaxFormByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getTaxFormById(dc: DataConnect, vars: GetTaxFormByIdVariables): QueryPromise<GetTaxFormByIdData, GetTaxFormByIdVariables>;

interface GetTaxFormByIdRef {
  ...
  (dc: DataConnect, vars: GetTaxFormByIdVariables): QueryRef<GetTaxFormByIdData, GetTaxFormByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getTaxFormsByStaffId(vars: GetTaxFormsByStaffIdVariables): QueryPromise<GetTaxFormsByStaffIdData, GetTaxFormsByStaffIdVariables>;

interface GetTaxFormsByStaffIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetTaxFormsByStaffIdVariables): QueryRef<GetTaxFormsByStaffIdData, GetTaxFormsByStaffIdVariables>;
}
export const getTaxFormsByStaffIdRef: GetTaxFormsByStaffIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getTaxFormsByStaffId(dc: DataConnect, vars: GetTaxFormsByStaffIdVariables): QueryPromise<GetTaxFormsByStaffIdData, GetTaxFormsByStaffIdVariables>;

interface GetTaxFormsByStaffIdRef {
  ...
  (dc: DataConnect, vars: GetTaxFormsByStaffIdVariables): QueryRef<GetTaxFormsByStaffIdData, GetTaxFormsByStaffIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listTaxFormsWhere(vars?: ListTaxFormsWhereVariables): QueryPromise<ListTaxFormsWhereData, ListTaxFormsWhereVariables>;

interface ListTaxFormsWhereRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListTaxFormsWhereVariables): QueryRef<ListTaxFormsWhereData, ListTaxFormsWhereVariables>;
}
export const listTaxFormsWhereRef: ListTaxFormsWhereRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listTaxFormsWhere(dc: DataConnect, vars?: ListTaxFormsWhereVariables): QueryPromise<ListTaxFormsWhereData, ListTaxFormsWhereVariables>;

interface ListTaxFormsWhereRef {
  ...
  (dc: DataConnect, vars?: ListTaxFormsWhereVariables): QueryRef<ListTaxFormsWhereData, ListTaxFormsWhereVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listFaqDatas(): QueryPromise<ListFaqDatasData, undefined>;

interface ListFaqDatasRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListFaqDatasData, undefined>;
}
export const listFaqDatasRef: ListFaqDatasRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listFaqDatas(dc: DataConnect): QueryPromise<ListFaqDatasData, undefined>;

interface ListFaqDatasRef {
  ...
  (dc: DataConnect): QueryRef<ListFaqDatasData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getFaqDataById(vars: GetFaqDataByIdVariables): QueryPromise<GetFaqDataByIdData, GetFaqDataByIdVariables>;

interface GetFaqDataByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetFaqDataByIdVariables): QueryRef<GetFaqDataByIdData, GetFaqDataByIdVariables>;
}
export const getFaqDataByIdRef: GetFaqDataByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getFaqDataById(dc: DataConnect, vars: GetFaqDataByIdVariables): QueryPromise<GetFaqDataByIdData, GetFaqDataByIdVariables>;

interface GetFaqDataByIdRef {
  ...
  (dc: DataConnect, vars: GetFaqDataByIdVariables): QueryRef<GetFaqDataByIdData, GetFaqDataByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterFaqDatas(vars?: FilterFaqDatasVariables): QueryPromise<FilterFaqDatasData, FilterFaqDatasVariables>;

interface FilterFaqDatasRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterFaqDatasVariables): QueryRef<FilterFaqDatasData, FilterFaqDatasVariables>;
}
export const filterFaqDatasRef: FilterFaqDatasRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterFaqDatas(dc: DataConnect, vars?: FilterFaqDatasVariables): QueryPromise<FilterFaqDatasData, FilterFaqDatasVariables>;

interface FilterFaqDatasRef {
  ...
  (dc: DataConnect, vars?: FilterFaqDatasVariables): QueryRef<FilterFaqDatasData, FilterFaqDatasVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface FilterFaqDatasData {
  faqDatas: ({
    id: UUIDString;
    category: string;
    questions?: unknown[] | null;
  } & FaqData_Key)[];
}

Using filterFaqDatas's action shortcut function

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

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:

getStaffCourseById(vars: GetStaffCourseByIdVariables): QueryPromise<GetStaffCourseByIdData, GetStaffCourseByIdVariables>;

interface GetStaffCourseByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetStaffCourseByIdVariables): QueryRef<GetStaffCourseByIdData, GetStaffCourseByIdVariables>;
}
export const getStaffCourseByIdRef: GetStaffCourseByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getStaffCourseById(dc: DataConnect, vars: GetStaffCourseByIdVariables): QueryPromise<GetStaffCourseByIdData, GetStaffCourseByIdVariables>;

interface GetStaffCourseByIdRef {
  ...
  (dc: DataConnect, vars: GetStaffCourseByIdVariables): QueryRef<GetStaffCourseByIdData, GetStaffCourseByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listStaffCoursesByStaffId(vars: ListStaffCoursesByStaffIdVariables): QueryPromise<ListStaffCoursesByStaffIdData, ListStaffCoursesByStaffIdVariables>;

interface ListStaffCoursesByStaffIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListStaffCoursesByStaffIdVariables): QueryRef<ListStaffCoursesByStaffIdData, ListStaffCoursesByStaffIdVariables>;
}
export const listStaffCoursesByStaffIdRef: ListStaffCoursesByStaffIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffCoursesByStaffId(dc: DataConnect, vars: ListStaffCoursesByStaffIdVariables): QueryPromise<ListStaffCoursesByStaffIdData, ListStaffCoursesByStaffIdVariables>;

interface ListStaffCoursesByStaffIdRef {
  ...
  (dc: DataConnect, vars: ListStaffCoursesByStaffIdVariables): QueryRef<ListStaffCoursesByStaffIdData, ListStaffCoursesByStaffIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listStaffCoursesByCourseId(vars: ListStaffCoursesByCourseIdVariables): QueryPromise<ListStaffCoursesByCourseIdData, ListStaffCoursesByCourseIdVariables>;

interface ListStaffCoursesByCourseIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListStaffCoursesByCourseIdVariables): QueryRef<ListStaffCoursesByCourseIdData, ListStaffCoursesByCourseIdVariables>;
}
export const listStaffCoursesByCourseIdRef: ListStaffCoursesByCourseIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffCoursesByCourseId(dc: DataConnect, vars: ListStaffCoursesByCourseIdVariables): QueryPromise<ListStaffCoursesByCourseIdData, ListStaffCoursesByCourseIdVariables>;

interface ListStaffCoursesByCourseIdRef {
  ...
  (dc: DataConnect, vars: ListStaffCoursesByCourseIdVariables): QueryRef<ListStaffCoursesByCourseIdData, ListStaffCoursesByCourseIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getStaffCourseByStaffAndCourse(vars: GetStaffCourseByStaffAndCourseVariables): QueryPromise<GetStaffCourseByStaffAndCourseData, GetStaffCourseByStaffAndCourseVariables>;

interface GetStaffCourseByStaffAndCourseRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetStaffCourseByStaffAndCourseVariables): QueryRef<GetStaffCourseByStaffAndCourseData, GetStaffCourseByStaffAndCourseVariables>;
}
export const getStaffCourseByStaffAndCourseRef: GetStaffCourseByStaffAndCourseRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getStaffCourseByStaffAndCourse(dc: DataConnect, vars: GetStaffCourseByStaffAndCourseVariables): QueryPromise<GetStaffCourseByStaffAndCourseData, GetStaffCourseByStaffAndCourseVariables>;

interface GetStaffCourseByStaffAndCourseRef {
  ...
  (dc: DataConnect, vars: GetStaffCourseByStaffAndCourseVariables): QueryRef<GetStaffCourseByStaffAndCourseData, GetStaffCourseByStaffAndCourseVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listActivityLogs(vars?: ListActivityLogsVariables): QueryPromise<ListActivityLogsData, ListActivityLogsVariables>;

interface ListActivityLogsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListActivityLogsVariables): QueryRef<ListActivityLogsData, ListActivityLogsVariables>;
}
export const listActivityLogsRef: ListActivityLogsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listActivityLogs(dc: DataConnect, vars?: ListActivityLogsVariables): QueryPromise<ListActivityLogsData, ListActivityLogsVariables>;

interface ListActivityLogsRef {
  ...
  (dc: DataConnect, vars?: ListActivityLogsVariables): QueryRef<ListActivityLogsData, ListActivityLogsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getActivityLogById(vars: GetActivityLogByIdVariables): QueryPromise<GetActivityLogByIdData, GetActivityLogByIdVariables>;

interface GetActivityLogByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetActivityLogByIdVariables): QueryRef<GetActivityLogByIdData, GetActivityLogByIdVariables>;
}
export const getActivityLogByIdRef: GetActivityLogByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getActivityLogById(dc: DataConnect, vars: GetActivityLogByIdVariables): QueryPromise<GetActivityLogByIdData, GetActivityLogByIdVariables>;

interface GetActivityLogByIdRef {
  ...
  (dc: DataConnect, vars: GetActivityLogByIdVariables): QueryRef<GetActivityLogByIdData, GetActivityLogByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listActivityLogsByUserId(vars: ListActivityLogsByUserIdVariables): QueryPromise<ListActivityLogsByUserIdData, ListActivityLogsByUserIdVariables>;

interface ListActivityLogsByUserIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListActivityLogsByUserIdVariables): QueryRef<ListActivityLogsByUserIdData, ListActivityLogsByUserIdVariables>;
}
export const listActivityLogsByUserIdRef: ListActivityLogsByUserIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listActivityLogsByUserId(dc: DataConnect, vars: ListActivityLogsByUserIdVariables): QueryPromise<ListActivityLogsByUserIdData, ListActivityLogsByUserIdVariables>;

interface ListActivityLogsByUserIdRef {
  ...
  (dc: DataConnect, vars: ListActivityLogsByUserIdVariables): QueryRef<ListActivityLogsByUserIdData, ListActivityLogsByUserIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listUnreadActivityLogsByUserId(vars: ListUnreadActivityLogsByUserIdVariables): QueryPromise<ListUnreadActivityLogsByUserIdData, ListUnreadActivityLogsByUserIdVariables>;

interface ListUnreadActivityLogsByUserIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListUnreadActivityLogsByUserIdVariables): QueryRef<ListUnreadActivityLogsByUserIdData, ListUnreadActivityLogsByUserIdVariables>;
}
export const listUnreadActivityLogsByUserIdRef: ListUnreadActivityLogsByUserIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listUnreadActivityLogsByUserId(dc: DataConnect, vars: ListUnreadActivityLogsByUserIdVariables): QueryPromise<ListUnreadActivityLogsByUserIdData, ListUnreadActivityLogsByUserIdVariables>;

interface ListUnreadActivityLogsByUserIdRef {
  ...
  (dc: DataConnect, vars: ListUnreadActivityLogsByUserIdVariables): QueryRef<ListUnreadActivityLogsByUserIdData, ListUnreadActivityLogsByUserIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterActivityLogs(vars?: FilterActivityLogsVariables): QueryPromise<FilterActivityLogsData, FilterActivityLogsVariables>;

interface FilterActivityLogsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterActivityLogsVariables): QueryRef<FilterActivityLogsData, FilterActivityLogsVariables>;
}
export const filterActivityLogsRef: FilterActivityLogsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterActivityLogs(dc: DataConnect, vars?: FilterActivityLogsVariables): QueryPromise<FilterActivityLogsData, FilterActivityLogsVariables>;

interface FilterActivityLogsRef {
  ...
  (dc: DataConnect, vars?: FilterActivityLogsVariables): QueryRef<FilterActivityLogsData, FilterActivityLogsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listBenefitsData(vars?: ListBenefitsDataVariables): QueryPromise<ListBenefitsDataData, ListBenefitsDataVariables>;

interface ListBenefitsDataRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListBenefitsDataVariables): QueryRef<ListBenefitsDataData, ListBenefitsDataVariables>;
}
export const listBenefitsDataRef: ListBenefitsDataRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listBenefitsData(dc: DataConnect, vars?: ListBenefitsDataVariables): QueryPromise<ListBenefitsDataData, ListBenefitsDataVariables>;

interface ListBenefitsDataRef {
  ...
  (dc: DataConnect, vars?: ListBenefitsDataVariables): QueryRef<ListBenefitsDataData, ListBenefitsDataVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getBenefitsDataByKey(vars: GetBenefitsDataByKeyVariables): QueryPromise<GetBenefitsDataByKeyData, GetBenefitsDataByKeyVariables>;

interface GetBenefitsDataByKeyRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetBenefitsDataByKeyVariables): QueryRef<GetBenefitsDataByKeyData, GetBenefitsDataByKeyVariables>;
}
export const getBenefitsDataByKeyRef: GetBenefitsDataByKeyRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getBenefitsDataByKey(dc: DataConnect, vars: GetBenefitsDataByKeyVariables): QueryPromise<GetBenefitsDataByKeyData, GetBenefitsDataByKeyVariables>;

interface GetBenefitsDataByKeyRef {
  ...
  (dc: DataConnect, vars: GetBenefitsDataByKeyVariables): QueryRef<GetBenefitsDataByKeyData, GetBenefitsDataByKeyVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listBenefitsDataByStaffId(vars: ListBenefitsDataByStaffIdVariables): QueryPromise<ListBenefitsDataByStaffIdData, ListBenefitsDataByStaffIdVariables>;

interface ListBenefitsDataByStaffIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListBenefitsDataByStaffIdVariables): QueryRef<ListBenefitsDataByStaffIdData, ListBenefitsDataByStaffIdVariables>;
}
export const listBenefitsDataByStaffIdRef: ListBenefitsDataByStaffIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listBenefitsDataByStaffId(dc: DataConnect, vars: ListBenefitsDataByStaffIdVariables): QueryPromise<ListBenefitsDataByStaffIdData, ListBenefitsDataByStaffIdVariables>;

interface ListBenefitsDataByStaffIdRef {
  ...
  (dc: DataConnect, vars: ListBenefitsDataByStaffIdVariables): QueryRef<ListBenefitsDataByStaffIdData, ListBenefitsDataByStaffIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listBenefitsDataByVendorBenefitPlanId(vars: ListBenefitsDataByVendorBenefitPlanIdVariables): QueryPromise<ListBenefitsDataByVendorBenefitPlanIdData, ListBenefitsDataByVendorBenefitPlanIdVariables>;

interface ListBenefitsDataByVendorBenefitPlanIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListBenefitsDataByVendorBenefitPlanIdVariables): QueryRef<ListBenefitsDataByVendorBenefitPlanIdData, ListBenefitsDataByVendorBenefitPlanIdVariables>;
}
export const listBenefitsDataByVendorBenefitPlanIdRef: ListBenefitsDataByVendorBenefitPlanIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listBenefitsDataByVendorBenefitPlanId(dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdVariables): QueryPromise<ListBenefitsDataByVendorBenefitPlanIdData, ListBenefitsDataByVendorBenefitPlanIdVariables>;

interface ListBenefitsDataByVendorBenefitPlanIdRef {
  ...
  (dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdVariables): QueryRef<ListBenefitsDataByVendorBenefitPlanIdData, ListBenefitsDataByVendorBenefitPlanIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listBenefitsDataByVendorBenefitPlanIds(vars: ListBenefitsDataByVendorBenefitPlanIdsVariables): QueryPromise<ListBenefitsDataByVendorBenefitPlanIdsData, ListBenefitsDataByVendorBenefitPlanIdsVariables>;

interface ListBenefitsDataByVendorBenefitPlanIdsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListBenefitsDataByVendorBenefitPlanIdsVariables): QueryRef<ListBenefitsDataByVendorBenefitPlanIdsData, ListBenefitsDataByVendorBenefitPlanIdsVariables>;
}
export const listBenefitsDataByVendorBenefitPlanIdsRef: ListBenefitsDataByVendorBenefitPlanIdsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listBenefitsDataByVendorBenefitPlanIds(dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdsVariables): QueryPromise<ListBenefitsDataByVendorBenefitPlanIdsData, ListBenefitsDataByVendorBenefitPlanIdsVariables>;

interface ListBenefitsDataByVendorBenefitPlanIdsRef {
  ...
  (dc: DataConnect, vars: ListBenefitsDataByVendorBenefitPlanIdsVariables): QueryRef<ListBenefitsDataByVendorBenefitPlanIdsData, ListBenefitsDataByVendorBenefitPlanIdsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listStaff(): QueryPromise<ListStaffData, undefined>;

interface ListStaffRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListStaffData, undefined>;
}
export const listStaffRef: ListStaffRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaff(dc: DataConnect): QueryPromise<ListStaffData, undefined>;

interface ListStaffRef {
  ...
  (dc: DataConnect): QueryRef<ListStaffData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getStaffById(vars: GetStaffByIdVariables): QueryPromise<GetStaffByIdData, GetStaffByIdVariables>;

interface GetStaffByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetStaffByIdVariables): QueryRef<GetStaffByIdData, GetStaffByIdVariables>;
}
export const getStaffByIdRef: GetStaffByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getStaffById(dc: DataConnect, vars: GetStaffByIdVariables): QueryPromise<GetStaffByIdData, GetStaffByIdVariables>;

interface GetStaffByIdRef {
  ...
  (dc: DataConnect, vars: GetStaffByIdVariables): QueryRef<GetStaffByIdData, GetStaffByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getStaffByUserId(vars: GetStaffByUserIdVariables): QueryPromise<GetStaffByUserIdData, GetStaffByUserIdVariables>;

interface GetStaffByUserIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetStaffByUserIdVariables): QueryRef<GetStaffByUserIdData, GetStaffByUserIdVariables>;
}
export const getStaffByUserIdRef: GetStaffByUserIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getStaffByUserId(dc: DataConnect, vars: GetStaffByUserIdVariables): QueryPromise<GetStaffByUserIdData, GetStaffByUserIdVariables>;

interface GetStaffByUserIdRef {
  ...
  (dc: DataConnect, vars: GetStaffByUserIdVariables): QueryRef<GetStaffByUserIdData, GetStaffByUserIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterStaff(vars?: FilterStaffVariables): QueryPromise<FilterStaffData, FilterStaffVariables>;

interface FilterStaffRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterStaffVariables): QueryRef<FilterStaffData, FilterStaffVariables>;
}
export const filterStaffRef: FilterStaffRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterStaff(dc: DataConnect, vars?: FilterStaffVariables): QueryPromise<FilterStaffData, FilterStaffVariables>;

interface FilterStaffRef {
  ...
  (dc: DataConnect, vars?: FilterStaffVariables): QueryRef<FilterStaffData, FilterStaffVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listTasks(): QueryPromise<ListTasksData, undefined>;

interface ListTasksRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListTasksData, undefined>;
}
export const listTasksRef: ListTasksRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listTasks(dc: DataConnect): QueryPromise<ListTasksData, undefined>;

interface ListTasksRef {
  ...
  (dc: DataConnect): QueryRef<ListTasksData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getTaskById(vars: GetTaskByIdVariables): QueryPromise<GetTaskByIdData, GetTaskByIdVariables>;

interface GetTaskByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetTaskByIdVariables): QueryRef<GetTaskByIdData, GetTaskByIdVariables>;
}
export const getTaskByIdRef: GetTaskByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getTaskById(dc: DataConnect, vars: GetTaskByIdVariables): QueryPromise<GetTaskByIdData, GetTaskByIdVariables>;

interface GetTaskByIdRef {
  ...
  (dc: DataConnect, vars: GetTaskByIdVariables): QueryRef<GetTaskByIdData, GetTaskByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getTasksByOwnerId(vars: GetTasksByOwnerIdVariables): QueryPromise<GetTasksByOwnerIdData, GetTasksByOwnerIdVariables>;

interface GetTasksByOwnerIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetTasksByOwnerIdVariables): QueryRef<GetTasksByOwnerIdData, GetTasksByOwnerIdVariables>;
}
export const getTasksByOwnerIdRef: GetTasksByOwnerIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getTasksByOwnerId(dc: DataConnect, vars: GetTasksByOwnerIdVariables): QueryPromise<GetTasksByOwnerIdData, GetTasksByOwnerIdVariables>;

interface GetTasksByOwnerIdRef {
  ...
  (dc: DataConnect, vars: GetTasksByOwnerIdVariables): QueryRef<GetTasksByOwnerIdData, GetTasksByOwnerIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterTasks(vars?: FilterTasksVariables): QueryPromise<FilterTasksData, FilterTasksVariables>;

interface FilterTasksRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterTasksVariables): QueryRef<FilterTasksData, FilterTasksVariables>;
}
export const filterTasksRef: FilterTasksRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterTasks(dc: DataConnect, vars?: FilterTasksVariables): QueryPromise<FilterTasksData, FilterTasksVariables>;

interface FilterTasksRef {
  ...
  (dc: DataConnect, vars?: FilterTasksVariables): QueryRef<FilterTasksData, FilterTasksVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listTeamHubs(vars?: ListTeamHubsVariables): QueryPromise<ListTeamHubsData, ListTeamHubsVariables>;

interface ListTeamHubsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListTeamHubsVariables): QueryRef<ListTeamHubsData, ListTeamHubsVariables>;
}
export const listTeamHubsRef: ListTeamHubsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listTeamHubs(dc: DataConnect, vars?: ListTeamHubsVariables): QueryPromise<ListTeamHubsData, ListTeamHubsVariables>;

interface ListTeamHubsRef {
  ...
  (dc: DataConnect, vars?: ListTeamHubsVariables): QueryRef<ListTeamHubsData, ListTeamHubsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getTeamHubById(vars: GetTeamHubByIdVariables): QueryPromise<GetTeamHubByIdData, GetTeamHubByIdVariables>;

interface GetTeamHubByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetTeamHubByIdVariables): QueryRef<GetTeamHubByIdData, GetTeamHubByIdVariables>;
}
export const getTeamHubByIdRef: GetTeamHubByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getTeamHubById(dc: DataConnect, vars: GetTeamHubByIdVariables): QueryPromise<GetTeamHubByIdData, GetTeamHubByIdVariables>;

interface GetTeamHubByIdRef {
  ...
  (dc: DataConnect, vars: GetTeamHubByIdVariables): QueryRef<GetTeamHubByIdData, GetTeamHubByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getTeamHubsByTeamId(vars: GetTeamHubsByTeamIdVariables): QueryPromise<GetTeamHubsByTeamIdData, GetTeamHubsByTeamIdVariables>;

interface GetTeamHubsByTeamIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetTeamHubsByTeamIdVariables): QueryRef<GetTeamHubsByTeamIdData, GetTeamHubsByTeamIdVariables>;
}
export const getTeamHubsByTeamIdRef: GetTeamHubsByTeamIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getTeamHubsByTeamId(dc: DataConnect, vars: GetTeamHubsByTeamIdVariables): QueryPromise<GetTeamHubsByTeamIdData, GetTeamHubsByTeamIdVariables>;

interface GetTeamHubsByTeamIdRef {
  ...
  (dc: DataConnect, vars: GetTeamHubsByTeamIdVariables): QueryRef<GetTeamHubsByTeamIdData, GetTeamHubsByTeamIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listTeamHubsByOwnerId(vars: ListTeamHubsByOwnerIdVariables): QueryPromise<ListTeamHubsByOwnerIdData, ListTeamHubsByOwnerIdVariables>;

interface ListTeamHubsByOwnerIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListTeamHubsByOwnerIdVariables): QueryRef<ListTeamHubsByOwnerIdData, ListTeamHubsByOwnerIdVariables>;
}
export const listTeamHubsByOwnerIdRef: ListTeamHubsByOwnerIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listTeamHubsByOwnerId(dc: DataConnect, vars: ListTeamHubsByOwnerIdVariables): QueryPromise<ListTeamHubsByOwnerIdData, ListTeamHubsByOwnerIdVariables>;

interface ListTeamHubsByOwnerIdRef {
  ...
  (dc: DataConnect, vars: ListTeamHubsByOwnerIdVariables): QueryRef<ListTeamHubsByOwnerIdData, ListTeamHubsByOwnerIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listClientFeedbacks(vars?: ListClientFeedbacksVariables): QueryPromise<ListClientFeedbacksData, ListClientFeedbacksVariables>;

interface ListClientFeedbacksRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListClientFeedbacksVariables): QueryRef<ListClientFeedbacksData, ListClientFeedbacksVariables>;
}
export const listClientFeedbacksRef: ListClientFeedbacksRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listClientFeedbacks(dc: DataConnect, vars?: ListClientFeedbacksVariables): QueryPromise<ListClientFeedbacksData, ListClientFeedbacksVariables>;

interface ListClientFeedbacksRef {
  ...
  (dc: DataConnect, vars?: ListClientFeedbacksVariables): QueryRef<ListClientFeedbacksData, ListClientFeedbacksVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getClientFeedbackById(vars: GetClientFeedbackByIdVariables): QueryPromise<GetClientFeedbackByIdData, GetClientFeedbackByIdVariables>;

interface GetClientFeedbackByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetClientFeedbackByIdVariables): QueryRef<GetClientFeedbackByIdData, GetClientFeedbackByIdVariables>;
}
export const getClientFeedbackByIdRef: GetClientFeedbackByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getClientFeedbackById(dc: DataConnect, vars: GetClientFeedbackByIdVariables): QueryPromise<GetClientFeedbackByIdData, GetClientFeedbackByIdVariables>;

interface GetClientFeedbackByIdRef {
  ...
  (dc: DataConnect, vars: GetClientFeedbackByIdVariables): QueryRef<GetClientFeedbackByIdData, GetClientFeedbackByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listClientFeedbacksByBusinessId(vars: ListClientFeedbacksByBusinessIdVariables): QueryPromise<ListClientFeedbacksByBusinessIdData, ListClientFeedbacksByBusinessIdVariables>;

interface ListClientFeedbacksByBusinessIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListClientFeedbacksByBusinessIdVariables): QueryRef<ListClientFeedbacksByBusinessIdData, ListClientFeedbacksByBusinessIdVariables>;
}
export const listClientFeedbacksByBusinessIdRef: ListClientFeedbacksByBusinessIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listClientFeedbacksByBusinessId(dc: DataConnect, vars: ListClientFeedbacksByBusinessIdVariables): QueryPromise<ListClientFeedbacksByBusinessIdData, ListClientFeedbacksByBusinessIdVariables>;

interface ListClientFeedbacksByBusinessIdRef {
  ...
  (dc: DataConnect, vars: ListClientFeedbacksByBusinessIdVariables): QueryRef<ListClientFeedbacksByBusinessIdData, ListClientFeedbacksByBusinessIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listClientFeedbacksByVendorId(vars: ListClientFeedbacksByVendorIdVariables): QueryPromise<ListClientFeedbacksByVendorIdData, ListClientFeedbacksByVendorIdVariables>;

interface ListClientFeedbacksByVendorIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListClientFeedbacksByVendorIdVariables): QueryRef<ListClientFeedbacksByVendorIdData, ListClientFeedbacksByVendorIdVariables>;
}
export const listClientFeedbacksByVendorIdRef: ListClientFeedbacksByVendorIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listClientFeedbacksByVendorId(dc: DataConnect, vars: ListClientFeedbacksByVendorIdVariables): QueryPromise<ListClientFeedbacksByVendorIdData, ListClientFeedbacksByVendorIdVariables>;

interface ListClientFeedbacksByVendorIdRef {
  ...
  (dc: DataConnect, vars: ListClientFeedbacksByVendorIdVariables): QueryRef<ListClientFeedbacksByVendorIdData, ListClientFeedbacksByVendorIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listClientFeedbacksByBusinessAndVendor(vars: ListClientFeedbacksByBusinessAndVendorVariables): QueryPromise<ListClientFeedbacksByBusinessAndVendorData, ListClientFeedbacksByBusinessAndVendorVariables>;

interface ListClientFeedbacksByBusinessAndVendorRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListClientFeedbacksByBusinessAndVendorVariables): QueryRef<ListClientFeedbacksByBusinessAndVendorData, ListClientFeedbacksByBusinessAndVendorVariables>;
}
export const listClientFeedbacksByBusinessAndVendorRef: ListClientFeedbacksByBusinessAndVendorRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listClientFeedbacksByBusinessAndVendor(dc: DataConnect, vars: ListClientFeedbacksByBusinessAndVendorVariables): QueryPromise<ListClientFeedbacksByBusinessAndVendorData, ListClientFeedbacksByBusinessAndVendorVariables>;

interface ListClientFeedbacksByBusinessAndVendorRef {
  ...
  (dc: DataConnect, vars: ListClientFeedbacksByBusinessAndVendorVariables): QueryRef<ListClientFeedbacksByBusinessAndVendorData, ListClientFeedbacksByBusinessAndVendorVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterClientFeedbacks(vars?: FilterClientFeedbacksVariables): QueryPromise<FilterClientFeedbacksData, FilterClientFeedbacksVariables>;

interface FilterClientFeedbacksRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterClientFeedbacksVariables): QueryRef<FilterClientFeedbacksData, FilterClientFeedbacksVariables>;
}
export const filterClientFeedbacksRef: FilterClientFeedbacksRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterClientFeedbacks(dc: DataConnect, vars?: FilterClientFeedbacksVariables): QueryPromise<FilterClientFeedbacksData, FilterClientFeedbacksVariables>;

interface FilterClientFeedbacksRef {
  ...
  (dc: DataConnect, vars?: FilterClientFeedbacksVariables): QueryRef<FilterClientFeedbacksData, FilterClientFeedbacksVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listClientFeedbackRatingsByVendorId(vars: ListClientFeedbackRatingsByVendorIdVariables): QueryPromise<ListClientFeedbackRatingsByVendorIdData, ListClientFeedbackRatingsByVendorIdVariables>;

interface ListClientFeedbackRatingsByVendorIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListClientFeedbackRatingsByVendorIdVariables): QueryRef<ListClientFeedbackRatingsByVendorIdData, ListClientFeedbackRatingsByVendorIdVariables>;
}
export const listClientFeedbackRatingsByVendorIdRef: ListClientFeedbackRatingsByVendorIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listClientFeedbackRatingsByVendorId(dc: DataConnect, vars: ListClientFeedbackRatingsByVendorIdVariables): QueryPromise<ListClientFeedbackRatingsByVendorIdData, ListClientFeedbackRatingsByVendorIdVariables>;

interface ListClientFeedbackRatingsByVendorIdRef {
  ...
  (dc: DataConnect, vars: ListClientFeedbackRatingsByVendorIdVariables): QueryRef<ListClientFeedbackRatingsByVendorIdData, ListClientFeedbackRatingsByVendorIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listUsers(): QueryPromise<ListUsersData, undefined>;

interface ListUsersRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListUsersData, undefined>;
}
export const listUsersRef: ListUsersRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listUsers(dc: DataConnect): QueryPromise<ListUsersData, undefined>;

interface ListUsersRef {
  ...
  (dc: DataConnect): QueryRef<ListUsersData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getUserById(vars: GetUserByIdVariables): QueryPromise<GetUserByIdData, GetUserByIdVariables>;

interface GetUserByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetUserByIdVariables): QueryRef<GetUserByIdData, GetUserByIdVariables>;
}
export const getUserByIdRef: GetUserByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getUserById(dc: DataConnect, vars: GetUserByIdVariables): QueryPromise<GetUserByIdData, GetUserByIdVariables>;

interface GetUserByIdRef {
  ...
  (dc: DataConnect, vars: GetUserByIdVariables): QueryRef<GetUserByIdData, GetUserByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterUsers(vars?: FilterUsersVariables): QueryPromise<FilterUsersData, FilterUsersVariables>;

interface FilterUsersRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterUsersVariables): QueryRef<FilterUsersData, FilterUsersVariables>;
}
export const filterUsersRef: FilterUsersRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterUsers(dc: DataConnect, vars?: FilterUsersVariables): QueryPromise<FilterUsersData, FilterUsersVariables>;

interface FilterUsersRef {
  ...
  (dc: DataConnect, vars?: FilterUsersVariables): QueryRef<FilterUsersData, FilterUsersVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getVendorById(vars: GetVendorByIdVariables): QueryPromise<GetVendorByIdData, GetVendorByIdVariables>;

interface GetVendorByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetVendorByIdVariables): QueryRef<GetVendorByIdData, GetVendorByIdVariables>;
}
export const getVendorByIdRef: GetVendorByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getVendorById(dc: DataConnect, vars: GetVendorByIdVariables): QueryPromise<GetVendorByIdData, GetVendorByIdVariables>;

interface GetVendorByIdRef {
  ...
  (dc: DataConnect, vars: GetVendorByIdVariables): QueryRef<GetVendorByIdData, GetVendorByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getVendorByUserId(vars: GetVendorByUserIdVariables): QueryPromise<GetVendorByUserIdData, GetVendorByUserIdVariables>;

interface GetVendorByUserIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetVendorByUserIdVariables): QueryRef<GetVendorByUserIdData, GetVendorByUserIdVariables>;
}
export const getVendorByUserIdRef: GetVendorByUserIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getVendorByUserId(dc: DataConnect, vars: GetVendorByUserIdVariables): QueryPromise<GetVendorByUserIdData, GetVendorByUserIdVariables>;

interface GetVendorByUserIdRef {
  ...
  (dc: DataConnect, vars: GetVendorByUserIdVariables): QueryRef<GetVendorByUserIdData, GetVendorByUserIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listVendors(): QueryPromise<ListVendorsData, undefined>;

interface ListVendorsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListVendorsData, undefined>;
}
export const listVendorsRef: ListVendorsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listVendors(dc: DataConnect): QueryPromise<ListVendorsData, undefined>;

interface ListVendorsRef {
  ...
  (dc: DataConnect): QueryRef<ListVendorsData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

listCategories(): QueryPromise<ListCategoriesData, undefined>;

interface ListCategoriesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListCategoriesData, undefined>;
}
export const listCategoriesRef: ListCategoriesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listCategories(dc: DataConnect): QueryPromise<ListCategoriesData, undefined>;

interface ListCategoriesRef {
  ...
  (dc: DataConnect): QueryRef<ListCategoriesData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getCategoryById(vars: GetCategoryByIdVariables): QueryPromise<GetCategoryByIdData, GetCategoryByIdVariables>;

interface GetCategoryByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetCategoryByIdVariables): QueryRef<GetCategoryByIdData, GetCategoryByIdVariables>;
}
export const getCategoryByIdRef: GetCategoryByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getCategoryById(dc: DataConnect, vars: GetCategoryByIdVariables): QueryPromise<GetCategoryByIdData, GetCategoryByIdVariables>;

interface GetCategoryByIdRef {
  ...
  (dc: DataConnect, vars: GetCategoryByIdVariables): QueryRef<GetCategoryByIdData, GetCategoryByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterCategories(vars?: FilterCategoriesVariables): QueryPromise<FilterCategoriesData, FilterCategoriesVariables>;

interface FilterCategoriesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterCategoriesVariables): QueryRef<FilterCategoriesData, FilterCategoriesVariables>;
}
export const filterCategoriesRef: FilterCategoriesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterCategories(dc: DataConnect, vars?: FilterCategoriesVariables): QueryPromise<FilterCategoriesData, FilterCategoriesVariables>;

interface FilterCategoriesRef {
  ...
  (dc: DataConnect, vars?: FilterCategoriesVariables): QueryRef<FilterCategoriesData, FilterCategoriesVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listMessages(): QueryPromise<ListMessagesData, undefined>;

interface ListMessagesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListMessagesData, undefined>;
}
export const listMessagesRef: ListMessagesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listMessages(dc: DataConnect): QueryPromise<ListMessagesData, undefined>;

interface ListMessagesRef {
  ...
  (dc: DataConnect): QueryRef<ListMessagesData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getMessageById(vars: GetMessageByIdVariables): QueryPromise<GetMessageByIdData, GetMessageByIdVariables>;

interface GetMessageByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetMessageByIdVariables): QueryRef<GetMessageByIdData, GetMessageByIdVariables>;
}
export const getMessageByIdRef: GetMessageByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getMessageById(dc: DataConnect, vars: GetMessageByIdVariables): QueryPromise<GetMessageByIdData, GetMessageByIdVariables>;

interface GetMessageByIdRef {
  ...
  (dc: DataConnect, vars: GetMessageByIdVariables): QueryRef<GetMessageByIdData, GetMessageByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getMessagesByConversationId(vars: GetMessagesByConversationIdVariables): QueryPromise<GetMessagesByConversationIdData, GetMessagesByConversationIdVariables>;

interface GetMessagesByConversationIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetMessagesByConversationIdVariables): QueryRef<GetMessagesByConversationIdData, GetMessagesByConversationIdVariables>;
}
export const getMessagesByConversationIdRef: GetMessagesByConversationIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getMessagesByConversationId(dc: DataConnect, vars: GetMessagesByConversationIdVariables): QueryPromise<GetMessagesByConversationIdData, GetMessagesByConversationIdVariables>;

interface GetMessagesByConversationIdRef {
  ...
  (dc: DataConnect, vars: GetMessagesByConversationIdVariables): QueryRef<GetMessagesByConversationIdData, GetMessagesByConversationIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listUserConversations(vars?: ListUserConversationsVariables): QueryPromise<ListUserConversationsData, ListUserConversationsVariables>;

interface ListUserConversationsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListUserConversationsVariables): QueryRef<ListUserConversationsData, ListUserConversationsVariables>;
}
export const listUserConversationsRef: ListUserConversationsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listUserConversations(dc: DataConnect, vars?: ListUserConversationsVariables): QueryPromise<ListUserConversationsData, ListUserConversationsVariables>;

interface ListUserConversationsRef {
  ...
  (dc: DataConnect, vars?: ListUserConversationsVariables): QueryRef<ListUserConversationsData, ListUserConversationsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getUserConversationByKey(vars: GetUserConversationByKeyVariables): QueryPromise<GetUserConversationByKeyData, GetUserConversationByKeyVariables>;

interface GetUserConversationByKeyRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetUserConversationByKeyVariables): QueryRef<GetUserConversationByKeyData, GetUserConversationByKeyVariables>;
}
export const getUserConversationByKeyRef: GetUserConversationByKeyRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getUserConversationByKey(dc: DataConnect, vars: GetUserConversationByKeyVariables): QueryPromise<GetUserConversationByKeyData, GetUserConversationByKeyVariables>;

interface GetUserConversationByKeyRef {
  ...
  (dc: DataConnect, vars: GetUserConversationByKeyVariables): QueryRef<GetUserConversationByKeyData, GetUserConversationByKeyVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listUserConversationsByUserId(vars: ListUserConversationsByUserIdVariables): QueryPromise<ListUserConversationsByUserIdData, ListUserConversationsByUserIdVariables>;

interface ListUserConversationsByUserIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListUserConversationsByUserIdVariables): QueryRef<ListUserConversationsByUserIdData, ListUserConversationsByUserIdVariables>;
}
export const listUserConversationsByUserIdRef: ListUserConversationsByUserIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listUserConversationsByUserId(dc: DataConnect, vars: ListUserConversationsByUserIdVariables): QueryPromise<ListUserConversationsByUserIdData, ListUserConversationsByUserIdVariables>;

interface ListUserConversationsByUserIdRef {
  ...
  (dc: DataConnect, vars: ListUserConversationsByUserIdVariables): QueryRef<ListUserConversationsByUserIdData, ListUserConversationsByUserIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listUnreadUserConversationsByUserId(vars: ListUnreadUserConversationsByUserIdVariables): QueryPromise<ListUnreadUserConversationsByUserIdData, ListUnreadUserConversationsByUserIdVariables>;

interface ListUnreadUserConversationsByUserIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListUnreadUserConversationsByUserIdVariables): QueryRef<ListUnreadUserConversationsByUserIdData, ListUnreadUserConversationsByUserIdVariables>;
}
export const listUnreadUserConversationsByUserIdRef: ListUnreadUserConversationsByUserIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listUnreadUserConversationsByUserId(dc: DataConnect, vars: ListUnreadUserConversationsByUserIdVariables): QueryPromise<ListUnreadUserConversationsByUserIdData, ListUnreadUserConversationsByUserIdVariables>;

interface ListUnreadUserConversationsByUserIdRef {
  ...
  (dc: DataConnect, vars: ListUnreadUserConversationsByUserIdVariables): QueryRef<ListUnreadUserConversationsByUserIdData, ListUnreadUserConversationsByUserIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listUserConversationsByConversationId(vars: ListUserConversationsByConversationIdVariables): QueryPromise<ListUserConversationsByConversationIdData, ListUserConversationsByConversationIdVariables>;

interface ListUserConversationsByConversationIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListUserConversationsByConversationIdVariables): QueryRef<ListUserConversationsByConversationIdData, ListUserConversationsByConversationIdVariables>;
}
export const listUserConversationsByConversationIdRef: ListUserConversationsByConversationIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listUserConversationsByConversationId(dc: DataConnect, vars: ListUserConversationsByConversationIdVariables): QueryPromise<ListUserConversationsByConversationIdData, ListUserConversationsByConversationIdVariables>;

interface ListUserConversationsByConversationIdRef {
  ...
  (dc: DataConnect, vars: ListUserConversationsByConversationIdVariables): QueryRef<ListUserConversationsByConversationIdData, ListUserConversationsByConversationIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterUserConversations(vars?: FilterUserConversationsVariables): QueryPromise<FilterUserConversationsData, FilterUserConversationsVariables>;

interface FilterUserConversationsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterUserConversationsVariables): QueryRef<FilterUserConversationsData, FilterUserConversationsVariables>;
}
export const filterUserConversationsRef: FilterUserConversationsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterUserConversations(dc: DataConnect, vars?: FilterUserConversationsVariables): QueryPromise<FilterUserConversationsData, FilterUserConversationsVariables>;

interface FilterUserConversationsRef {
  ...
  (dc: DataConnect, vars?: FilterUserConversationsVariables): QueryRef<FilterUserConversationsData, FilterUserConversationsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listHubs(): QueryPromise<ListHubsData, undefined>;

interface ListHubsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListHubsData, undefined>;
}
export const listHubsRef: ListHubsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listHubs(dc: DataConnect): QueryPromise<ListHubsData, undefined>;

interface ListHubsRef {
  ...
  (dc: DataConnect): QueryRef<ListHubsData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getHubById(vars: GetHubByIdVariables): QueryPromise<GetHubByIdData, GetHubByIdVariables>;

interface GetHubByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetHubByIdVariables): QueryRef<GetHubByIdData, GetHubByIdVariables>;
}
export const getHubByIdRef: GetHubByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getHubById(dc: DataConnect, vars: GetHubByIdVariables): QueryPromise<GetHubByIdData, GetHubByIdVariables>;

interface GetHubByIdRef {
  ...
  (dc: DataConnect, vars: GetHubByIdVariables): QueryRef<GetHubByIdData, GetHubByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getHubsByOwnerId(vars: GetHubsByOwnerIdVariables): QueryPromise<GetHubsByOwnerIdData, GetHubsByOwnerIdVariables>;

interface GetHubsByOwnerIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetHubsByOwnerIdVariables): QueryRef<GetHubsByOwnerIdData, GetHubsByOwnerIdVariables>;
}
export const getHubsByOwnerIdRef: GetHubsByOwnerIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getHubsByOwnerId(dc: DataConnect, vars: GetHubsByOwnerIdVariables): QueryPromise<GetHubsByOwnerIdData, GetHubsByOwnerIdVariables>;

interface GetHubsByOwnerIdRef {
  ...
  (dc: DataConnect, vars: GetHubsByOwnerIdVariables): QueryRef<GetHubsByOwnerIdData, GetHubsByOwnerIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterHubs(vars?: FilterHubsVariables): QueryPromise<FilterHubsData, FilterHubsVariables>;

interface FilterHubsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterHubsVariables): QueryRef<FilterHubsData, FilterHubsVariables>;
}
export const filterHubsRef: FilterHubsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterHubs(dc: DataConnect, vars?: FilterHubsVariables): QueryPromise<FilterHubsData, FilterHubsVariables>;

interface FilterHubsRef {
  ...
  (dc: DataConnect, vars?: FilterHubsVariables): QueryRef<FilterHubsData, FilterHubsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listInvoices(vars?: ListInvoicesVariables): QueryPromise<ListInvoicesData, ListInvoicesVariables>;

interface ListInvoicesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListInvoicesVariables): QueryRef<ListInvoicesData, ListInvoicesVariables>;
}
export const listInvoicesRef: ListInvoicesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listInvoices(dc: DataConnect, vars?: ListInvoicesVariables): QueryPromise<ListInvoicesData, ListInvoicesVariables>;

interface ListInvoicesRef {
  ...
  (dc: DataConnect, vars?: ListInvoicesVariables): QueryRef<ListInvoicesData, ListInvoicesVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getInvoiceById(vars: GetInvoiceByIdVariables): QueryPromise<GetInvoiceByIdData, GetInvoiceByIdVariables>;

interface GetInvoiceByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetInvoiceByIdVariables): QueryRef<GetInvoiceByIdData, GetInvoiceByIdVariables>;
}
export const getInvoiceByIdRef: GetInvoiceByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getInvoiceById(dc: DataConnect, vars: GetInvoiceByIdVariables): QueryPromise<GetInvoiceByIdData, GetInvoiceByIdVariables>;

interface GetInvoiceByIdRef {
  ...
  (dc: DataConnect, vars: GetInvoiceByIdVariables): QueryRef<GetInvoiceByIdData, GetInvoiceByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listInvoicesByVendorId(vars: ListInvoicesByVendorIdVariables): QueryPromise<ListInvoicesByVendorIdData, ListInvoicesByVendorIdVariables>;

interface ListInvoicesByVendorIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListInvoicesByVendorIdVariables): QueryRef<ListInvoicesByVendorIdData, ListInvoicesByVendorIdVariables>;
}
export const listInvoicesByVendorIdRef: ListInvoicesByVendorIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listInvoicesByVendorId(dc: DataConnect, vars: ListInvoicesByVendorIdVariables): QueryPromise<ListInvoicesByVendorIdData, ListInvoicesByVendorIdVariables>;

interface ListInvoicesByVendorIdRef {
  ...
  (dc: DataConnect, vars: ListInvoicesByVendorIdVariables): QueryRef<ListInvoicesByVendorIdData, ListInvoicesByVendorIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listInvoicesByBusinessId(vars: ListInvoicesByBusinessIdVariables): QueryPromise<ListInvoicesByBusinessIdData, ListInvoicesByBusinessIdVariables>;

interface ListInvoicesByBusinessIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListInvoicesByBusinessIdVariables): QueryRef<ListInvoicesByBusinessIdData, ListInvoicesByBusinessIdVariables>;
}
export const listInvoicesByBusinessIdRef: ListInvoicesByBusinessIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listInvoicesByBusinessId(dc: DataConnect, vars: ListInvoicesByBusinessIdVariables): QueryPromise<ListInvoicesByBusinessIdData, ListInvoicesByBusinessIdVariables>;

interface ListInvoicesByBusinessIdRef {
  ...
  (dc: DataConnect, vars: ListInvoicesByBusinessIdVariables): QueryRef<ListInvoicesByBusinessIdData, ListInvoicesByBusinessIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listInvoicesByOrderId(vars: ListInvoicesByOrderIdVariables): QueryPromise<ListInvoicesByOrderIdData, ListInvoicesByOrderIdVariables>;

interface ListInvoicesByOrderIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListInvoicesByOrderIdVariables): QueryRef<ListInvoicesByOrderIdData, ListInvoicesByOrderIdVariables>;
}
export const listInvoicesByOrderIdRef: ListInvoicesByOrderIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listInvoicesByOrderId(dc: DataConnect, vars: ListInvoicesByOrderIdVariables): QueryPromise<ListInvoicesByOrderIdData, ListInvoicesByOrderIdVariables>;

interface ListInvoicesByOrderIdRef {
  ...
  (dc: DataConnect, vars: ListInvoicesByOrderIdVariables): QueryRef<ListInvoicesByOrderIdData, ListInvoicesByOrderIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listInvoicesByStatus(vars: ListInvoicesByStatusVariables): QueryPromise<ListInvoicesByStatusData, ListInvoicesByStatusVariables>;

interface ListInvoicesByStatusRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListInvoicesByStatusVariables): QueryRef<ListInvoicesByStatusData, ListInvoicesByStatusVariables>;
}
export const listInvoicesByStatusRef: ListInvoicesByStatusRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listInvoicesByStatus(dc: DataConnect, vars: ListInvoicesByStatusVariables): QueryPromise<ListInvoicesByStatusData, ListInvoicesByStatusVariables>;

interface ListInvoicesByStatusRef {
  ...
  (dc: DataConnect, vars: ListInvoicesByStatusVariables): QueryRef<ListInvoicesByStatusData, ListInvoicesByStatusVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterInvoices(vars?: FilterInvoicesVariables): QueryPromise<FilterInvoicesData, FilterInvoicesVariables>;

interface FilterInvoicesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterInvoicesVariables): QueryRef<FilterInvoicesData, FilterInvoicesVariables>;
}
export const filterInvoicesRef: FilterInvoicesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterInvoices(dc: DataConnect, vars?: FilterInvoicesVariables): QueryPromise<FilterInvoicesData, FilterInvoicesVariables>;

interface FilterInvoicesRef {
  ...
  (dc: DataConnect, vars?: FilterInvoicesVariables): QueryRef<FilterInvoicesData, FilterInvoicesVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listOverdueInvoices(vars: ListOverdueInvoicesVariables): QueryPromise<ListOverdueInvoicesData, ListOverdueInvoicesVariables>;

interface ListOverdueInvoicesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListOverdueInvoicesVariables): QueryRef<ListOverdueInvoicesData, ListOverdueInvoicesVariables>;
}
export const listOverdueInvoicesRef: ListOverdueInvoicesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listOverdueInvoices(dc: DataConnect, vars: ListOverdueInvoicesVariables): QueryPromise<ListOverdueInvoicesData, ListOverdueInvoicesVariables>;

interface ListOverdueInvoicesRef {
  ...
  (dc: DataConnect, vars: ListOverdueInvoicesVariables): QueryRef<ListOverdueInvoicesData, ListOverdueInvoicesVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listCourses(): QueryPromise<ListCoursesData, undefined>;

interface ListCoursesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListCoursesData, undefined>;
}
export const listCoursesRef: ListCoursesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listCourses(dc: DataConnect): QueryPromise<ListCoursesData, undefined>;

interface ListCoursesRef {
  ...
  (dc: DataConnect): QueryRef<ListCoursesData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getCourseById(vars: GetCourseByIdVariables): QueryPromise<GetCourseByIdData, GetCourseByIdVariables>;

interface GetCourseByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetCourseByIdVariables): QueryRef<GetCourseByIdData, GetCourseByIdVariables>;
}
export const getCourseByIdRef: GetCourseByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getCourseById(dc: DataConnect, vars: GetCourseByIdVariables): QueryPromise<GetCourseByIdData, GetCourseByIdVariables>;

interface GetCourseByIdRef {
  ...
  (dc: DataConnect, vars: GetCourseByIdVariables): QueryRef<GetCourseByIdData, GetCourseByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterCourses(vars?: FilterCoursesVariables): QueryPromise<FilterCoursesData, FilterCoursesVariables>;

interface FilterCoursesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterCoursesVariables): QueryRef<FilterCoursesData, FilterCoursesVariables>;
}
export const filterCoursesRef: FilterCoursesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterCourses(dc: DataConnect, vars?: FilterCoursesVariables): QueryPromise<FilterCoursesData, FilterCoursesVariables>;

interface FilterCoursesRef {
  ...
  (dc: DataConnect, vars?: FilterCoursesVariables): QueryRef<FilterCoursesData, FilterCoursesVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listVendorRates(): QueryPromise<ListVendorRatesData, undefined>;

interface ListVendorRatesRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListVendorRatesData, undefined>;
}
export const listVendorRatesRef: ListVendorRatesRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listVendorRates(dc: DataConnect): QueryPromise<ListVendorRatesData, undefined>;

interface ListVendorRatesRef {
  ...
  (dc: DataConnect): QueryRef<ListVendorRatesData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getVendorRateById(vars: GetVendorRateByIdVariables): QueryPromise<GetVendorRateByIdData, GetVendorRateByIdVariables>;

interface GetVendorRateByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetVendorRateByIdVariables): QueryRef<GetVendorRateByIdData, GetVendorRateByIdVariables>;
}
export const getVendorRateByIdRef: GetVendorRateByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getVendorRateById(dc: DataConnect, vars: GetVendorRateByIdVariables): QueryPromise<GetVendorRateByIdData, GetVendorRateByIdVariables>;

interface GetVendorRateByIdRef {
  ...
  (dc: DataConnect, vars: GetVendorRateByIdVariables): QueryRef<GetVendorRateByIdData, GetVendorRateByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getWorkforceById(vars: GetWorkforceByIdVariables): QueryPromise<GetWorkforceByIdData, GetWorkforceByIdVariables>;

interface GetWorkforceByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetWorkforceByIdVariables): QueryRef<GetWorkforceByIdData, GetWorkforceByIdVariables>;
}
export const getWorkforceByIdRef: GetWorkforceByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getWorkforceById(dc: DataConnect, vars: GetWorkforceByIdVariables): QueryPromise<GetWorkforceByIdData, GetWorkforceByIdVariables>;

interface GetWorkforceByIdRef {
  ...
  (dc: DataConnect, vars: GetWorkforceByIdVariables): QueryRef<GetWorkforceByIdData, GetWorkforceByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getWorkforceByVendorAndStaff(vars: GetWorkforceByVendorAndStaffVariables): QueryPromise<GetWorkforceByVendorAndStaffData, GetWorkforceByVendorAndStaffVariables>;

interface GetWorkforceByVendorAndStaffRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetWorkforceByVendorAndStaffVariables): QueryRef<GetWorkforceByVendorAndStaffData, GetWorkforceByVendorAndStaffVariables>;
}
export const getWorkforceByVendorAndStaffRef: GetWorkforceByVendorAndStaffRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getWorkforceByVendorAndStaff(dc: DataConnect, vars: GetWorkforceByVendorAndStaffVariables): QueryPromise<GetWorkforceByVendorAndStaffData, GetWorkforceByVendorAndStaffVariables>;

interface GetWorkforceByVendorAndStaffRef {
  ...
  (dc: DataConnect, vars: GetWorkforceByVendorAndStaffVariables): QueryRef<GetWorkforceByVendorAndStaffData, GetWorkforceByVendorAndStaffVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listWorkforceByVendorId(vars: ListWorkforceByVendorIdVariables): QueryPromise<ListWorkforceByVendorIdData, ListWorkforceByVendorIdVariables>;

interface ListWorkforceByVendorIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListWorkforceByVendorIdVariables): QueryRef<ListWorkforceByVendorIdData, ListWorkforceByVendorIdVariables>;
}
export const listWorkforceByVendorIdRef: ListWorkforceByVendorIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listWorkforceByVendorId(dc: DataConnect, vars: ListWorkforceByVendorIdVariables): QueryPromise<ListWorkforceByVendorIdData, ListWorkforceByVendorIdVariables>;

interface ListWorkforceByVendorIdRef {
  ...
  (dc: DataConnect, vars: ListWorkforceByVendorIdVariables): QueryRef<ListWorkforceByVendorIdData, ListWorkforceByVendorIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listWorkforceByStaffId(vars: ListWorkforceByStaffIdVariables): QueryPromise<ListWorkforceByStaffIdData, ListWorkforceByStaffIdVariables>;

interface ListWorkforceByStaffIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListWorkforceByStaffIdVariables): QueryRef<ListWorkforceByStaffIdData, ListWorkforceByStaffIdVariables>;
}
export const listWorkforceByStaffIdRef: ListWorkforceByStaffIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listWorkforceByStaffId(dc: DataConnect, vars: ListWorkforceByStaffIdVariables): QueryPromise<ListWorkforceByStaffIdData, ListWorkforceByStaffIdVariables>;

interface ListWorkforceByStaffIdRef {
  ...
  (dc: DataConnect, vars: ListWorkforceByStaffIdVariables): QueryRef<ListWorkforceByStaffIdData, ListWorkforceByStaffIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getWorkforceByVendorAndNumber(vars: GetWorkforceByVendorAndNumberVariables): QueryPromise<GetWorkforceByVendorAndNumberData, GetWorkforceByVendorAndNumberVariables>;

interface GetWorkforceByVendorAndNumberRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetWorkforceByVendorAndNumberVariables): QueryRef<GetWorkforceByVendorAndNumberData, GetWorkforceByVendorAndNumberVariables>;
}
export const getWorkforceByVendorAndNumberRef: GetWorkforceByVendorAndNumberRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getWorkforceByVendorAndNumber(dc: DataConnect, vars: GetWorkforceByVendorAndNumberVariables): QueryPromise<GetWorkforceByVendorAndNumberData, GetWorkforceByVendorAndNumberVariables>;

interface GetWorkforceByVendorAndNumberRef {
  ...
  (dc: DataConnect, vars: GetWorkforceByVendorAndNumberVariables): QueryRef<GetWorkforceByVendorAndNumberData, GetWorkforceByVendorAndNumberVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface GetWorkforceByVendorAndNumberData {
  workforces: ({
    id: UUIDString;
    staffId: UUIDString;
    workforceNumber: string;
    status?: WorkforceStatus | null;
  } & Workforce_Key)[];
}

Using getWorkforceByVendorAndNumber's action shortcut function

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

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:

listStaffAvailabilityStats(vars?: ListStaffAvailabilityStatsVariables): QueryPromise<ListStaffAvailabilityStatsData, ListStaffAvailabilityStatsVariables>;

interface ListStaffAvailabilityStatsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListStaffAvailabilityStatsVariables): QueryRef<ListStaffAvailabilityStatsData, ListStaffAvailabilityStatsVariables>;
}
export const listStaffAvailabilityStatsRef: ListStaffAvailabilityStatsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listStaffAvailabilityStats(dc: DataConnect, vars?: ListStaffAvailabilityStatsVariables): QueryPromise<ListStaffAvailabilityStatsData, ListStaffAvailabilityStatsVariables>;

interface ListStaffAvailabilityStatsRef {
  ...
  (dc: DataConnect, vars?: ListStaffAvailabilityStatsVariables): QueryRef<ListStaffAvailabilityStatsData, ListStaffAvailabilityStatsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getStaffAvailabilityStatsByStaffId(vars: GetStaffAvailabilityStatsByStaffIdVariables): QueryPromise<GetStaffAvailabilityStatsByStaffIdData, GetStaffAvailabilityStatsByStaffIdVariables>;

interface GetStaffAvailabilityStatsByStaffIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetStaffAvailabilityStatsByStaffIdVariables): QueryRef<GetStaffAvailabilityStatsByStaffIdData, GetStaffAvailabilityStatsByStaffIdVariables>;
}
export const getStaffAvailabilityStatsByStaffIdRef: GetStaffAvailabilityStatsByStaffIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getStaffAvailabilityStatsByStaffId(dc: DataConnect, vars: GetStaffAvailabilityStatsByStaffIdVariables): QueryPromise<GetStaffAvailabilityStatsByStaffIdData, GetStaffAvailabilityStatsByStaffIdVariables>;

interface GetStaffAvailabilityStatsByStaffIdRef {
  ...
  (dc: DataConnect, vars: GetStaffAvailabilityStatsByStaffIdVariables): QueryRef<GetStaffAvailabilityStatsByStaffIdData, GetStaffAvailabilityStatsByStaffIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterStaffAvailabilityStats(vars?: FilterStaffAvailabilityStatsVariables): QueryPromise<FilterStaffAvailabilityStatsData, FilterStaffAvailabilityStatsVariables>;

interface FilterStaffAvailabilityStatsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterStaffAvailabilityStatsVariables): QueryRef<FilterStaffAvailabilityStatsData, FilterStaffAvailabilityStatsVariables>;
}
export const filterStaffAvailabilityStatsRef: FilterStaffAvailabilityStatsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterStaffAvailabilityStats(dc: DataConnect, vars?: FilterStaffAvailabilityStatsVariables): QueryPromise<FilterStaffAvailabilityStatsData, FilterStaffAvailabilityStatsVariables>;

interface FilterStaffAvailabilityStatsRef {
  ...
  (dc: DataConnect, vars?: FilterStaffAvailabilityStatsVariables): QueryRef<FilterStaffAvailabilityStatsData, FilterStaffAvailabilityStatsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listTeamHudDepartments(vars?: ListTeamHudDepartmentsVariables): QueryPromise<ListTeamHudDepartmentsData, ListTeamHudDepartmentsVariables>;

interface ListTeamHudDepartmentsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListTeamHudDepartmentsVariables): QueryRef<ListTeamHudDepartmentsData, ListTeamHudDepartmentsVariables>;
}
export const listTeamHudDepartmentsRef: ListTeamHudDepartmentsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listTeamHudDepartments(dc: DataConnect, vars?: ListTeamHudDepartmentsVariables): QueryPromise<ListTeamHudDepartmentsData, ListTeamHudDepartmentsVariables>;

interface ListTeamHudDepartmentsRef {
  ...
  (dc: DataConnect, vars?: ListTeamHudDepartmentsVariables): QueryRef<ListTeamHudDepartmentsData, ListTeamHudDepartmentsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getTeamHudDepartmentById(vars: GetTeamHudDepartmentByIdVariables): QueryPromise<GetTeamHudDepartmentByIdData, GetTeamHudDepartmentByIdVariables>;

interface GetTeamHudDepartmentByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetTeamHudDepartmentByIdVariables): QueryRef<GetTeamHudDepartmentByIdData, GetTeamHudDepartmentByIdVariables>;
}
export const getTeamHudDepartmentByIdRef: GetTeamHudDepartmentByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getTeamHudDepartmentById(dc: DataConnect, vars: GetTeamHudDepartmentByIdVariables): QueryPromise<GetTeamHudDepartmentByIdData, GetTeamHudDepartmentByIdVariables>;

interface GetTeamHudDepartmentByIdRef {
  ...
  (dc: DataConnect, vars: GetTeamHudDepartmentByIdVariables): QueryRef<GetTeamHudDepartmentByIdData, GetTeamHudDepartmentByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listTeamHudDepartmentsByTeamHubId(vars: ListTeamHudDepartmentsByTeamHubIdVariables): QueryPromise<ListTeamHudDepartmentsByTeamHubIdData, ListTeamHudDepartmentsByTeamHubIdVariables>;

interface ListTeamHudDepartmentsByTeamHubIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListTeamHudDepartmentsByTeamHubIdVariables): QueryRef<ListTeamHudDepartmentsByTeamHubIdData, ListTeamHudDepartmentsByTeamHubIdVariables>;
}
export const listTeamHudDepartmentsByTeamHubIdRef: ListTeamHudDepartmentsByTeamHubIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listTeamHudDepartmentsByTeamHubId(dc: DataConnect, vars: ListTeamHudDepartmentsByTeamHubIdVariables): QueryPromise<ListTeamHudDepartmentsByTeamHubIdData, ListTeamHudDepartmentsByTeamHubIdVariables>;

interface ListTeamHudDepartmentsByTeamHubIdRef {
  ...
  (dc: DataConnect, vars: ListTeamHudDepartmentsByTeamHubIdVariables): QueryRef<ListTeamHudDepartmentsByTeamHubIdData, ListTeamHudDepartmentsByTeamHubIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listLevels(): QueryPromise<ListLevelsData, undefined>;

interface ListLevelsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListLevelsData, undefined>;
}
export const listLevelsRef: ListLevelsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listLevels(dc: DataConnect): QueryPromise<ListLevelsData, undefined>;

interface ListLevelsRef {
  ...
  (dc: DataConnect): QueryRef<ListLevelsData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getLevelById(vars: GetLevelByIdVariables): QueryPromise<GetLevelByIdData, GetLevelByIdVariables>;

interface GetLevelByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetLevelByIdVariables): QueryRef<GetLevelByIdData, GetLevelByIdVariables>;
}
export const getLevelByIdRef: GetLevelByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getLevelById(dc: DataConnect, vars: GetLevelByIdVariables): QueryPromise<GetLevelByIdData, GetLevelByIdVariables>;

interface GetLevelByIdRef {
  ...
  (dc: DataConnect, vars: GetLevelByIdVariables): QueryRef<GetLevelByIdData, GetLevelByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterLevels(vars?: FilterLevelsVariables): QueryPromise<FilterLevelsData, FilterLevelsVariables>;

interface FilterLevelsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterLevelsVariables): QueryRef<FilterLevelsData, FilterLevelsVariables>;
}
export const filterLevelsRef: FilterLevelsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterLevels(dc: DataConnect, vars?: FilterLevelsVariables): QueryPromise<FilterLevelsData, FilterLevelsVariables>;

interface FilterLevelsRef {
  ...
  (dc: DataConnect, vars?: FilterLevelsVariables): QueryRef<FilterLevelsData, FilterLevelsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface FilterLevelsData {
  levels: ({
    id: UUIDString;
    name: string;
    xpRequired: number;
    icon?: string | null;
    colors?: unknown | null;
  } & Level_Key)[];
}

Using filterLevels's action shortcut function

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

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:

listTeams(): QueryPromise<ListTeamsData, undefined>;

interface ListTeamsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListTeamsData, undefined>;
}
export const listTeamsRef: ListTeamsRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listTeams(dc: DataConnect): QueryPromise<ListTeamsData, undefined>;

interface ListTeamsRef {
  ...
  (dc: DataConnect): QueryRef<ListTeamsData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getTeamById(vars: GetTeamByIdVariables): QueryPromise<GetTeamByIdData, GetTeamByIdVariables>;

interface GetTeamByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetTeamByIdVariables): QueryRef<GetTeamByIdData, GetTeamByIdVariables>;
}
export const getTeamByIdRef: GetTeamByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getTeamById(dc: DataConnect, vars: GetTeamByIdVariables): QueryPromise<GetTeamByIdData, GetTeamByIdVariables>;

interface GetTeamByIdRef {
  ...
  (dc: DataConnect, vars: GetTeamByIdVariables): QueryRef<GetTeamByIdData, GetTeamByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getTeamsByOwnerId(vars: GetTeamsByOwnerIdVariables): QueryPromise<GetTeamsByOwnerIdData, GetTeamsByOwnerIdVariables>;

interface GetTeamsByOwnerIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetTeamsByOwnerIdVariables): QueryRef<GetTeamsByOwnerIdData, GetTeamsByOwnerIdVariables>;
}
export const getTeamsByOwnerIdRef: GetTeamsByOwnerIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getTeamsByOwnerId(dc: DataConnect, vars: GetTeamsByOwnerIdVariables): QueryPromise<GetTeamsByOwnerIdData, GetTeamsByOwnerIdVariables>;

interface GetTeamsByOwnerIdRef {
  ...
  (dc: DataConnect, vars: GetTeamsByOwnerIdVariables): QueryRef<GetTeamsByOwnerIdData, GetTeamsByOwnerIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listTeamMembers(): QueryPromise<ListTeamMembersData, undefined>;

interface ListTeamMembersRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (): QueryRef<ListTeamMembersData, undefined>;
}
export const listTeamMembersRef: ListTeamMembersRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listTeamMembers(dc: DataConnect): QueryPromise<ListTeamMembersData, undefined>;

interface ListTeamMembersRef {
  ...
  (dc: DataConnect): QueryRef<ListTeamMembersData, undefined>;
}
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:

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. It has the following fields:

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

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

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:

getTeamMemberById(vars: GetTeamMemberByIdVariables): QueryPromise<GetTeamMemberByIdData, GetTeamMemberByIdVariables>;

interface GetTeamMemberByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetTeamMemberByIdVariables): QueryRef<GetTeamMemberByIdData, GetTeamMemberByIdVariables>;
}
export const getTeamMemberByIdRef: GetTeamMemberByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getTeamMemberById(dc: DataConnect, vars: GetTeamMemberByIdVariables): QueryPromise<GetTeamMemberByIdData, GetTeamMemberByIdVariables>;

interface GetTeamMemberByIdRef {
  ...
  (dc: DataConnect, vars: GetTeamMemberByIdVariables): QueryRef<GetTeamMemberByIdData, GetTeamMemberByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getTeamMembersByTeamId(vars: GetTeamMembersByTeamIdVariables): QueryPromise<GetTeamMembersByTeamIdData, GetTeamMembersByTeamIdVariables>;

interface GetTeamMembersByTeamIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetTeamMembersByTeamIdVariables): QueryRef<GetTeamMembersByTeamIdData, GetTeamMembersByTeamIdVariables>;
}
export const getTeamMembersByTeamIdRef: GetTeamMembersByTeamIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getTeamMembersByTeamId(dc: DataConnect, vars: GetTeamMembersByTeamIdVariables): QueryPromise<GetTeamMembersByTeamIdData, GetTeamMembersByTeamIdVariables>;

interface GetTeamMembersByTeamIdRef {
  ...
  (dc: DataConnect, vars: GetTeamMembersByTeamIdVariables): QueryRef<GetTeamMembersByTeamIdData, GetTeamMembersByTeamIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listVendorBenefitPlans(vars?: ListVendorBenefitPlansVariables): QueryPromise<ListVendorBenefitPlansData, ListVendorBenefitPlansVariables>;

interface ListVendorBenefitPlansRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: ListVendorBenefitPlansVariables): QueryRef<ListVendorBenefitPlansData, ListVendorBenefitPlansVariables>;
}
export const listVendorBenefitPlansRef: ListVendorBenefitPlansRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listVendorBenefitPlans(dc: DataConnect, vars?: ListVendorBenefitPlansVariables): QueryPromise<ListVendorBenefitPlansData, ListVendorBenefitPlansVariables>;

interface ListVendorBenefitPlansRef {
  ...
  (dc: DataConnect, vars?: ListVendorBenefitPlansVariables): QueryRef<ListVendorBenefitPlansData, ListVendorBenefitPlansVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

getVendorBenefitPlanById(vars: GetVendorBenefitPlanByIdVariables): QueryPromise<GetVendorBenefitPlanByIdData, GetVendorBenefitPlanByIdVariables>;

interface GetVendorBenefitPlanByIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: GetVendorBenefitPlanByIdVariables): QueryRef<GetVendorBenefitPlanByIdData, GetVendorBenefitPlanByIdVariables>;
}
export const getVendorBenefitPlanByIdRef: GetVendorBenefitPlanByIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

getVendorBenefitPlanById(dc: DataConnect, vars: GetVendorBenefitPlanByIdVariables): QueryPromise<GetVendorBenefitPlanByIdData, GetVendorBenefitPlanByIdVariables>;

interface GetVendorBenefitPlanByIdRef {
  ...
  (dc: DataConnect, vars: GetVendorBenefitPlanByIdVariables): QueryRef<GetVendorBenefitPlanByIdData, GetVendorBenefitPlanByIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listVendorBenefitPlansByVendorId(vars: ListVendorBenefitPlansByVendorIdVariables): QueryPromise<ListVendorBenefitPlansByVendorIdData, ListVendorBenefitPlansByVendorIdVariables>;

interface ListVendorBenefitPlansByVendorIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListVendorBenefitPlansByVendorIdVariables): QueryRef<ListVendorBenefitPlansByVendorIdData, ListVendorBenefitPlansByVendorIdVariables>;
}
export const listVendorBenefitPlansByVendorIdRef: ListVendorBenefitPlansByVendorIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listVendorBenefitPlansByVendorId(dc: DataConnect, vars: ListVendorBenefitPlansByVendorIdVariables): QueryPromise<ListVendorBenefitPlansByVendorIdData, ListVendorBenefitPlansByVendorIdVariables>;

interface ListVendorBenefitPlansByVendorIdRef {
  ...
  (dc: DataConnect, vars: ListVendorBenefitPlansByVendorIdVariables): QueryRef<ListVendorBenefitPlansByVendorIdData, ListVendorBenefitPlansByVendorIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

listActiveVendorBenefitPlansByVendorId(vars: ListActiveVendorBenefitPlansByVendorIdVariables): QueryPromise<ListActiveVendorBenefitPlansByVendorIdData, ListActiveVendorBenefitPlansByVendorIdVariables>;

interface ListActiveVendorBenefitPlansByVendorIdRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: ListActiveVendorBenefitPlansByVendorIdVariables): QueryRef<ListActiveVendorBenefitPlansByVendorIdData, ListActiveVendorBenefitPlansByVendorIdVariables>;
}
export const listActiveVendorBenefitPlansByVendorIdRef: ListActiveVendorBenefitPlansByVendorIdRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

listActiveVendorBenefitPlansByVendorId(dc: DataConnect, vars: ListActiveVendorBenefitPlansByVendorIdVariables): QueryPromise<ListActiveVendorBenefitPlansByVendorIdData, ListActiveVendorBenefitPlansByVendorIdVariables>;

interface ListActiveVendorBenefitPlansByVendorIdRef {
  ...
  (dc: DataConnect, vars: ListActiveVendorBenefitPlansByVendorIdVariables): QueryRef<ListActiveVendorBenefitPlansByVendorIdData, ListActiveVendorBenefitPlansByVendorIdVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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:

filterVendorBenefitPlans(vars?: FilterVendorBenefitPlansVariables): QueryPromise<FilterVendorBenefitPlansData, FilterVendorBenefitPlansVariables>;

interface FilterVendorBenefitPlansRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: FilterVendorBenefitPlansVariables): QueryRef<FilterVendorBenefitPlansData, FilterVendorBenefitPlansVariables>;
}
export const filterVendorBenefitPlansRef: FilterVendorBenefitPlansRef;

You can also pass in a DataConnect instance to the action shortcut function or QueryRef function.

filterVendorBenefitPlans(dc: DataConnect, vars?: FilterVendorBenefitPlansVariables): QueryPromise<FilterVendorBenefitPlansData, FilterVendorBenefitPlansVariables>;

interface FilterVendorBenefitPlansRef {
  ...
  (dc: DataConnect, vars?: FilterVendorBenefitPlansVariables): QueryRef<FilterVendorBenefitPlansData, FilterVendorBenefitPlansVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

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

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

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.

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:

createBenefitsData(vars: CreateBenefitsDataVariables): MutationPromise<CreateBenefitsDataData, CreateBenefitsDataVariables>;

interface CreateBenefitsDataRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateBenefitsDataVariables): MutationRef<CreateBenefitsDataData, CreateBenefitsDataVariables>;
}
export const createBenefitsDataRef: CreateBenefitsDataRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createBenefitsData(dc: DataConnect, vars: CreateBenefitsDataVariables): MutationPromise<CreateBenefitsDataData, CreateBenefitsDataVariables>;

interface CreateBenefitsDataRef {
  ...
  (dc: DataConnect, vars: CreateBenefitsDataVariables): MutationRef<CreateBenefitsDataData, CreateBenefitsDataVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateBenefitsDataData {
  benefitsData_insert: BenefitsData_Key;
}

Using createBenefitsData's action shortcut function

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

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:

updateBenefitsData(vars: UpdateBenefitsDataVariables): MutationPromise<UpdateBenefitsDataData, UpdateBenefitsDataVariables>;

interface UpdateBenefitsDataRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateBenefitsDataVariables): MutationRef<UpdateBenefitsDataData, UpdateBenefitsDataVariables>;
}
export const updateBenefitsDataRef: UpdateBenefitsDataRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateBenefitsData(dc: DataConnect, vars: UpdateBenefitsDataVariables): MutationPromise<UpdateBenefitsDataData, UpdateBenefitsDataVariables>;

interface UpdateBenefitsDataRef {
  ...
  (dc: DataConnect, vars: UpdateBenefitsDataVariables): MutationRef<UpdateBenefitsDataData, UpdateBenefitsDataVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateBenefitsDataData {
  benefitsData_update?: BenefitsData_Key | null;
}

Using updateBenefitsData's action shortcut function

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

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:

deleteBenefitsData(vars: DeleteBenefitsDataVariables): MutationPromise<DeleteBenefitsDataData, DeleteBenefitsDataVariables>;

interface DeleteBenefitsDataRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteBenefitsDataVariables): MutationRef<DeleteBenefitsDataData, DeleteBenefitsDataVariables>;
}
export const deleteBenefitsDataRef: DeleteBenefitsDataRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteBenefitsData(dc: DataConnect, vars: DeleteBenefitsDataVariables): MutationPromise<DeleteBenefitsDataData, DeleteBenefitsDataVariables>;

interface DeleteBenefitsDataRef {
  ...
  (dc: DataConnect, vars: DeleteBenefitsDataVariables): MutationRef<DeleteBenefitsDataData, DeleteBenefitsDataVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteBenefitsDataData {
  benefitsData_delete?: BenefitsData_Key | null;
}

Using deleteBenefitsData's action shortcut function

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

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:

createStaffDocument(vars: CreateStaffDocumentVariables): MutationPromise<CreateStaffDocumentData, CreateStaffDocumentVariables>;

interface CreateStaffDocumentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateStaffDocumentVariables): MutationRef<CreateStaffDocumentData, CreateStaffDocumentVariables>;
}
export const createStaffDocumentRef: CreateStaffDocumentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createStaffDocument(dc: DataConnect, vars: CreateStaffDocumentVariables): MutationPromise<CreateStaffDocumentData, CreateStaffDocumentVariables>;

interface CreateStaffDocumentRef {
  ...
  (dc: DataConnect, vars: CreateStaffDocumentVariables): MutationRef<CreateStaffDocumentData, CreateStaffDocumentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateStaffDocumentData {
  staffDocument_insert: StaffDocument_Key;
}

Using createStaffDocument's action shortcut function

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

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:

updateStaffDocument(vars: UpdateStaffDocumentVariables): MutationPromise<UpdateStaffDocumentData, UpdateStaffDocumentVariables>;

interface UpdateStaffDocumentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateStaffDocumentVariables): MutationRef<UpdateStaffDocumentData, UpdateStaffDocumentVariables>;
}
export const updateStaffDocumentRef: UpdateStaffDocumentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateStaffDocument(dc: DataConnect, vars: UpdateStaffDocumentVariables): MutationPromise<UpdateStaffDocumentData, UpdateStaffDocumentVariables>;

interface UpdateStaffDocumentRef {
  ...
  (dc: DataConnect, vars: UpdateStaffDocumentVariables): MutationRef<UpdateStaffDocumentData, UpdateStaffDocumentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateStaffDocumentData {
  staffDocument_update?: StaffDocument_Key | null;
}

Using updateStaffDocument's action shortcut function

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

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:

deleteStaffDocument(vars: DeleteStaffDocumentVariables): MutationPromise<DeleteStaffDocumentData, DeleteStaffDocumentVariables>;

interface DeleteStaffDocumentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteStaffDocumentVariables): MutationRef<DeleteStaffDocumentData, DeleteStaffDocumentVariables>;
}
export const deleteStaffDocumentRef: DeleteStaffDocumentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteStaffDocument(dc: DataConnect, vars: DeleteStaffDocumentVariables): MutationPromise<DeleteStaffDocumentData, DeleteStaffDocumentVariables>;

interface DeleteStaffDocumentRef {
  ...
  (dc: DataConnect, vars: DeleteStaffDocumentVariables): MutationRef<DeleteStaffDocumentData, DeleteStaffDocumentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteStaffDocumentData {
  staffDocument_delete?: StaffDocument_Key | null;
}

Using deleteStaffDocument's action shortcut function

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

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:

createTeamHudDepartment(vars: CreateTeamHudDepartmentVariables): MutationPromise<CreateTeamHudDepartmentData, CreateTeamHudDepartmentVariables>;

interface CreateTeamHudDepartmentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateTeamHudDepartmentVariables): MutationRef<CreateTeamHudDepartmentData, CreateTeamHudDepartmentVariables>;
}
export const createTeamHudDepartmentRef: CreateTeamHudDepartmentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createTeamHudDepartment(dc: DataConnect, vars: CreateTeamHudDepartmentVariables): MutationPromise<CreateTeamHudDepartmentData, CreateTeamHudDepartmentVariables>;

interface CreateTeamHudDepartmentRef {
  ...
  (dc: DataConnect, vars: CreateTeamHudDepartmentVariables): MutationRef<CreateTeamHudDepartmentData, CreateTeamHudDepartmentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateTeamHudDepartmentData {
  teamHudDepartment_insert: TeamHudDepartment_Key;
}

Using createTeamHudDepartment's action shortcut function

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

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:

updateTeamHudDepartment(vars: UpdateTeamHudDepartmentVariables): MutationPromise<UpdateTeamHudDepartmentData, UpdateTeamHudDepartmentVariables>;

interface UpdateTeamHudDepartmentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateTeamHudDepartmentVariables): MutationRef<UpdateTeamHudDepartmentData, UpdateTeamHudDepartmentVariables>;
}
export const updateTeamHudDepartmentRef: UpdateTeamHudDepartmentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateTeamHudDepartment(dc: DataConnect, vars: UpdateTeamHudDepartmentVariables): MutationPromise<UpdateTeamHudDepartmentData, UpdateTeamHudDepartmentVariables>;

interface UpdateTeamHudDepartmentRef {
  ...
  (dc: DataConnect, vars: UpdateTeamHudDepartmentVariables): MutationRef<UpdateTeamHudDepartmentData, UpdateTeamHudDepartmentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateTeamHudDepartmentData {
  teamHudDepartment_update?: TeamHudDepartment_Key | null;
}

Using updateTeamHudDepartment's action shortcut function

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

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:

deleteTeamHudDepartment(vars: DeleteTeamHudDepartmentVariables): MutationPromise<DeleteTeamHudDepartmentData, DeleteTeamHudDepartmentVariables>;

interface DeleteTeamHudDepartmentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteTeamHudDepartmentVariables): MutationRef<DeleteTeamHudDepartmentData, DeleteTeamHudDepartmentVariables>;
}
export const deleteTeamHudDepartmentRef: DeleteTeamHudDepartmentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteTeamHudDepartment(dc: DataConnect, vars: DeleteTeamHudDepartmentVariables): MutationPromise<DeleteTeamHudDepartmentData, DeleteTeamHudDepartmentVariables>;

interface DeleteTeamHudDepartmentRef {
  ...
  (dc: DataConnect, vars: DeleteTeamHudDepartmentVariables): MutationRef<DeleteTeamHudDepartmentData, DeleteTeamHudDepartmentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteTeamHudDepartmentData {
  teamHudDepartment_delete?: TeamHudDepartment_Key | null;
}

Using deleteTeamHudDepartment's action shortcut function

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

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:

createMemberTask(vars: CreateMemberTaskVariables): MutationPromise<CreateMemberTaskData, CreateMemberTaskVariables>;

interface CreateMemberTaskRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateMemberTaskVariables): MutationRef<CreateMemberTaskData, CreateMemberTaskVariables>;
}
export const createMemberTaskRef: CreateMemberTaskRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createMemberTask(dc: DataConnect, vars: CreateMemberTaskVariables): MutationPromise<CreateMemberTaskData, CreateMemberTaskVariables>;

interface CreateMemberTaskRef {
  ...
  (dc: DataConnect, vars: CreateMemberTaskVariables): MutationRef<CreateMemberTaskData, CreateMemberTaskVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateMemberTaskData {
  memberTask_insert: MemberTask_Key;
}

Using createMemberTask's action shortcut function

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

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:

deleteMemberTask(vars: DeleteMemberTaskVariables): MutationPromise<DeleteMemberTaskData, DeleteMemberTaskVariables>;

interface DeleteMemberTaskRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteMemberTaskVariables): MutationRef<DeleteMemberTaskData, DeleteMemberTaskVariables>;
}
export const deleteMemberTaskRef: DeleteMemberTaskRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteMemberTask(dc: DataConnect, vars: DeleteMemberTaskVariables): MutationPromise<DeleteMemberTaskData, DeleteMemberTaskVariables>;

interface DeleteMemberTaskRef {
  ...
  (dc: DataConnect, vars: DeleteMemberTaskVariables): MutationRef<DeleteMemberTaskData, DeleteMemberTaskVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteMemberTaskData {
  memberTask_delete?: MemberTask_Key | null;
}

Using deleteMemberTask's action shortcut function

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

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:

createTeam(vars: CreateTeamVariables): MutationPromise<CreateTeamData, CreateTeamVariables>;

interface CreateTeamRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateTeamVariables): MutationRef<CreateTeamData, CreateTeamVariables>;
}
export const createTeamRef: CreateTeamRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createTeam(dc: DataConnect, vars: CreateTeamVariables): MutationPromise<CreateTeamData, CreateTeamVariables>;

interface CreateTeamRef {
  ...
  (dc: DataConnect, vars: CreateTeamVariables): MutationRef<CreateTeamData, CreateTeamVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateTeamData {
  team_insert: Team_Key;
}

Using createTeam's action shortcut function

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

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:

updateTeam(vars: UpdateTeamVariables): MutationPromise<UpdateTeamData, UpdateTeamVariables>;

interface UpdateTeamRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateTeamVariables): MutationRef<UpdateTeamData, UpdateTeamVariables>;
}
export const updateTeamRef: UpdateTeamRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateTeam(dc: DataConnect, vars: UpdateTeamVariables): MutationPromise<UpdateTeamData, UpdateTeamVariables>;

interface UpdateTeamRef {
  ...
  (dc: DataConnect, vars: UpdateTeamVariables): MutationRef<UpdateTeamData, UpdateTeamVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateTeamData {
  team_update?: Team_Key | null;
}

Using updateTeam's action shortcut function

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

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:

deleteTeam(vars: DeleteTeamVariables): MutationPromise<DeleteTeamData, DeleteTeamVariables>;

interface DeleteTeamRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteTeamVariables): MutationRef<DeleteTeamData, DeleteTeamVariables>;
}
export const deleteTeamRef: DeleteTeamRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteTeam(dc: DataConnect, vars: DeleteTeamVariables): MutationPromise<DeleteTeamData, DeleteTeamVariables>;

interface DeleteTeamRef {
  ...
  (dc: DataConnect, vars: DeleteTeamVariables): MutationRef<DeleteTeamData, DeleteTeamVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteTeamData {
  team_delete?: Team_Key | null;
}

Using deleteTeam's action shortcut function

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

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:

createUserConversation(vars: CreateUserConversationVariables): MutationPromise<CreateUserConversationData, CreateUserConversationVariables>;

interface CreateUserConversationRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateUserConversationVariables): MutationRef<CreateUserConversationData, CreateUserConversationVariables>;
}
export const createUserConversationRef: CreateUserConversationRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createUserConversation(dc: DataConnect, vars: CreateUserConversationVariables): MutationPromise<CreateUserConversationData, CreateUserConversationVariables>;

interface CreateUserConversationRef {
  ...
  (dc: DataConnect, vars: CreateUserConversationVariables): MutationRef<CreateUserConversationData, CreateUserConversationVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateUserConversationData {
  userConversation_insert: UserConversation_Key;
}

Using createUserConversation's action shortcut function

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

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:

updateUserConversation(vars: UpdateUserConversationVariables): MutationPromise<UpdateUserConversationData, UpdateUserConversationVariables>;

interface UpdateUserConversationRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateUserConversationVariables): MutationRef<UpdateUserConversationData, UpdateUserConversationVariables>;
}
export const updateUserConversationRef: UpdateUserConversationRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateUserConversation(dc: DataConnect, vars: UpdateUserConversationVariables): MutationPromise<UpdateUserConversationData, UpdateUserConversationVariables>;

interface UpdateUserConversationRef {
  ...
  (dc: DataConnect, vars: UpdateUserConversationVariables): MutationRef<UpdateUserConversationData, UpdateUserConversationVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateUserConversationData {
  userConversation_update?: UserConversation_Key | null;
}

Using updateUserConversation's action shortcut function

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

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:

markConversationAsRead(vars: MarkConversationAsReadVariables): MutationPromise<MarkConversationAsReadData, MarkConversationAsReadVariables>;

interface MarkConversationAsReadRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: MarkConversationAsReadVariables): MutationRef<MarkConversationAsReadData, MarkConversationAsReadVariables>;
}
export const markConversationAsReadRef: MarkConversationAsReadRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

markConversationAsRead(dc: DataConnect, vars: MarkConversationAsReadVariables): MutationPromise<MarkConversationAsReadData, MarkConversationAsReadVariables>;

interface MarkConversationAsReadRef {
  ...
  (dc: DataConnect, vars: MarkConversationAsReadVariables): MutationRef<MarkConversationAsReadData, MarkConversationAsReadVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface MarkConversationAsReadData {
  userConversation_update?: UserConversation_Key | null;
}

Using markConversationAsRead's action shortcut function

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

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:

incrementUnreadForUser(vars: IncrementUnreadForUserVariables): MutationPromise<IncrementUnreadForUserData, IncrementUnreadForUserVariables>;

interface IncrementUnreadForUserRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: IncrementUnreadForUserVariables): MutationRef<IncrementUnreadForUserData, IncrementUnreadForUserVariables>;
}
export const incrementUnreadForUserRef: IncrementUnreadForUserRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

incrementUnreadForUser(dc: DataConnect, vars: IncrementUnreadForUserVariables): MutationPromise<IncrementUnreadForUserData, IncrementUnreadForUserVariables>;

interface IncrementUnreadForUserRef {
  ...
  (dc: DataConnect, vars: IncrementUnreadForUserVariables): MutationRef<IncrementUnreadForUserData, IncrementUnreadForUserVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface IncrementUnreadForUserData {
  userConversation_update?: UserConversation_Key | null;
}

Using incrementUnreadForUser's action shortcut function

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

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:

deleteUserConversation(vars: DeleteUserConversationVariables): MutationPromise<DeleteUserConversationData, DeleteUserConversationVariables>;

interface DeleteUserConversationRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteUserConversationVariables): MutationRef<DeleteUserConversationData, DeleteUserConversationVariables>;
}
export const deleteUserConversationRef: DeleteUserConversationRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteUserConversation(dc: DataConnect, vars: DeleteUserConversationVariables): MutationPromise<DeleteUserConversationData, DeleteUserConversationVariables>;

interface DeleteUserConversationRef {
  ...
  (dc: DataConnect, vars: DeleteUserConversationVariables): MutationRef<DeleteUserConversationData, DeleteUserConversationVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteUserConversationData {
  userConversation_delete?: UserConversation_Key | null;
}

Using deleteUserConversation's action shortcut function

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

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:

createAttireOption(vars: CreateAttireOptionVariables): MutationPromise<CreateAttireOptionData, CreateAttireOptionVariables>;

interface CreateAttireOptionRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateAttireOptionVariables): MutationRef<CreateAttireOptionData, CreateAttireOptionVariables>;
}
export const createAttireOptionRef: CreateAttireOptionRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createAttireOption(dc: DataConnect, vars: CreateAttireOptionVariables): MutationPromise<CreateAttireOptionData, CreateAttireOptionVariables>;

interface CreateAttireOptionRef {
  ...
  (dc: DataConnect, vars: CreateAttireOptionVariables): MutationRef<CreateAttireOptionData, CreateAttireOptionVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateAttireOptionData {
  attireOption_insert: AttireOption_Key;
}

Using createAttireOption's action shortcut function

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

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:

updateAttireOption(vars: UpdateAttireOptionVariables): MutationPromise<UpdateAttireOptionData, UpdateAttireOptionVariables>;

interface UpdateAttireOptionRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateAttireOptionVariables): MutationRef<UpdateAttireOptionData, UpdateAttireOptionVariables>;
}
export const updateAttireOptionRef: UpdateAttireOptionRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateAttireOption(dc: DataConnect, vars: UpdateAttireOptionVariables): MutationPromise<UpdateAttireOptionData, UpdateAttireOptionVariables>;

interface UpdateAttireOptionRef {
  ...
  (dc: DataConnect, vars: UpdateAttireOptionVariables): MutationRef<UpdateAttireOptionData, UpdateAttireOptionVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateAttireOptionData {
  attireOption_update?: AttireOption_Key | null;
}

Using updateAttireOption's action shortcut function

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

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:

deleteAttireOption(vars: DeleteAttireOptionVariables): MutationPromise<DeleteAttireOptionData, DeleteAttireOptionVariables>;

interface DeleteAttireOptionRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteAttireOptionVariables): MutationRef<DeleteAttireOptionData, DeleteAttireOptionVariables>;
}
export const deleteAttireOptionRef: DeleteAttireOptionRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteAttireOption(dc: DataConnect, vars: DeleteAttireOptionVariables): MutationPromise<DeleteAttireOptionData, DeleteAttireOptionVariables>;

interface DeleteAttireOptionRef {
  ...
  (dc: DataConnect, vars: DeleteAttireOptionVariables): MutationRef<DeleteAttireOptionData, DeleteAttireOptionVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteAttireOptionData {
  attireOption_delete?: AttireOption_Key | null;
}

Using deleteAttireOption's action shortcut function

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

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:

createCourse(vars: CreateCourseVariables): MutationPromise<CreateCourseData, CreateCourseVariables>;

interface CreateCourseRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateCourseVariables): MutationRef<CreateCourseData, CreateCourseVariables>;
}
export const createCourseRef: CreateCourseRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createCourse(dc: DataConnect, vars: CreateCourseVariables): MutationPromise<CreateCourseData, CreateCourseVariables>;

interface CreateCourseRef {
  ...
  (dc: DataConnect, vars: CreateCourseVariables): MutationRef<CreateCourseData, CreateCourseVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateCourseData {
  course_insert: Course_Key;
}

Using createCourse's action shortcut function

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

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:

updateCourse(vars: UpdateCourseVariables): MutationPromise<UpdateCourseData, UpdateCourseVariables>;

interface UpdateCourseRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateCourseVariables): MutationRef<UpdateCourseData, UpdateCourseVariables>;
}
export const updateCourseRef: UpdateCourseRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateCourse(dc: DataConnect, vars: UpdateCourseVariables): MutationPromise<UpdateCourseData, UpdateCourseVariables>;

interface UpdateCourseRef {
  ...
  (dc: DataConnect, vars: UpdateCourseVariables): MutationRef<UpdateCourseData, UpdateCourseVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateCourseData {
  course_update?: Course_Key | null;
}

Using updateCourse's action shortcut function

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

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:

deleteCourse(vars: DeleteCourseVariables): MutationPromise<DeleteCourseData, DeleteCourseVariables>;

interface DeleteCourseRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteCourseVariables): MutationRef<DeleteCourseData, DeleteCourseVariables>;
}
export const deleteCourseRef: DeleteCourseRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteCourse(dc: DataConnect, vars: DeleteCourseVariables): MutationPromise<DeleteCourseData, DeleteCourseVariables>;

interface DeleteCourseRef {
  ...
  (dc: DataConnect, vars: DeleteCourseVariables): MutationRef<DeleteCourseData, DeleteCourseVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteCourseData {
  course_delete?: Course_Key | null;
}

Using deleteCourse's action shortcut function

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

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:

createEmergencyContact(vars: CreateEmergencyContactVariables): MutationPromise<CreateEmergencyContactData, CreateEmergencyContactVariables>;

interface CreateEmergencyContactRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateEmergencyContactVariables): MutationRef<CreateEmergencyContactData, CreateEmergencyContactVariables>;
}
export const createEmergencyContactRef: CreateEmergencyContactRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createEmergencyContact(dc: DataConnect, vars: CreateEmergencyContactVariables): MutationPromise<CreateEmergencyContactData, CreateEmergencyContactVariables>;

interface CreateEmergencyContactRef {
  ...
  (dc: DataConnect, vars: CreateEmergencyContactVariables): MutationRef<CreateEmergencyContactData, CreateEmergencyContactVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateEmergencyContactData {
  emergencyContact_insert: EmergencyContact_Key;
}

Using createEmergencyContact's action shortcut function

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

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:

updateEmergencyContact(vars: UpdateEmergencyContactVariables): MutationPromise<UpdateEmergencyContactData, UpdateEmergencyContactVariables>;

interface UpdateEmergencyContactRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateEmergencyContactVariables): MutationRef<UpdateEmergencyContactData, UpdateEmergencyContactVariables>;
}
export const updateEmergencyContactRef: UpdateEmergencyContactRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateEmergencyContact(dc: DataConnect, vars: UpdateEmergencyContactVariables): MutationPromise<UpdateEmergencyContactData, UpdateEmergencyContactVariables>;

interface UpdateEmergencyContactRef {
  ...
  (dc: DataConnect, vars: UpdateEmergencyContactVariables): MutationRef<UpdateEmergencyContactData, UpdateEmergencyContactVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateEmergencyContactData {
  emergencyContact_update?: EmergencyContact_Key | null;
}

Using updateEmergencyContact's action shortcut function

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

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:

deleteEmergencyContact(vars: DeleteEmergencyContactVariables): MutationPromise<DeleteEmergencyContactData, DeleteEmergencyContactVariables>;

interface DeleteEmergencyContactRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteEmergencyContactVariables): MutationRef<DeleteEmergencyContactData, DeleteEmergencyContactVariables>;
}
export const deleteEmergencyContactRef: DeleteEmergencyContactRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteEmergencyContact(dc: DataConnect, vars: DeleteEmergencyContactVariables): MutationPromise<DeleteEmergencyContactData, DeleteEmergencyContactVariables>;

interface DeleteEmergencyContactRef {
  ...
  (dc: DataConnect, vars: DeleteEmergencyContactVariables): MutationRef<DeleteEmergencyContactData, DeleteEmergencyContactVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteEmergencyContactData {
  emergencyContact_delete?: EmergencyContact_Key | null;
}

Using deleteEmergencyContact's action shortcut function

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

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:

createStaffCourse(vars: CreateStaffCourseVariables): MutationPromise<CreateStaffCourseData, CreateStaffCourseVariables>;

interface CreateStaffCourseRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateStaffCourseVariables): MutationRef<CreateStaffCourseData, CreateStaffCourseVariables>;
}
export const createStaffCourseRef: CreateStaffCourseRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createStaffCourse(dc: DataConnect, vars: CreateStaffCourseVariables): MutationPromise<CreateStaffCourseData, CreateStaffCourseVariables>;

interface CreateStaffCourseRef {
  ...
  (dc: DataConnect, vars: CreateStaffCourseVariables): MutationRef<CreateStaffCourseData, CreateStaffCourseVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateStaffCourseData {
  staffCourse_insert: StaffCourse_Key;
}

Using createStaffCourse's action shortcut function

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

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:

updateStaffCourse(vars: UpdateStaffCourseVariables): MutationPromise<UpdateStaffCourseData, UpdateStaffCourseVariables>;

interface UpdateStaffCourseRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateStaffCourseVariables): MutationRef<UpdateStaffCourseData, UpdateStaffCourseVariables>;
}
export const updateStaffCourseRef: UpdateStaffCourseRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateStaffCourse(dc: DataConnect, vars: UpdateStaffCourseVariables): MutationPromise<UpdateStaffCourseData, UpdateStaffCourseVariables>;

interface UpdateStaffCourseRef {
  ...
  (dc: DataConnect, vars: UpdateStaffCourseVariables): MutationRef<UpdateStaffCourseData, UpdateStaffCourseVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateStaffCourseData {
  staffCourse_update?: StaffCourse_Key | null;
}

Using updateStaffCourse's action shortcut function

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

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:

deleteStaffCourse(vars: DeleteStaffCourseVariables): MutationPromise<DeleteStaffCourseData, DeleteStaffCourseVariables>;

interface DeleteStaffCourseRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteStaffCourseVariables): MutationRef<DeleteStaffCourseData, DeleteStaffCourseVariables>;
}
export const deleteStaffCourseRef: DeleteStaffCourseRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteStaffCourse(dc: DataConnect, vars: DeleteStaffCourseVariables): MutationPromise<DeleteStaffCourseData, DeleteStaffCourseVariables>;

interface DeleteStaffCourseRef {
  ...
  (dc: DataConnect, vars: DeleteStaffCourseVariables): MutationRef<DeleteStaffCourseData, DeleteStaffCourseVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteStaffCourseData {
  staffCourse_delete?: StaffCourse_Key | null;
}

Using deleteStaffCourse's action shortcut function

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

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:

createTask(vars: CreateTaskVariables): MutationPromise<CreateTaskData, CreateTaskVariables>;

interface CreateTaskRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateTaskVariables): MutationRef<CreateTaskData, CreateTaskVariables>;
}
export const createTaskRef: CreateTaskRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createTask(dc: DataConnect, vars: CreateTaskVariables): MutationPromise<CreateTaskData, CreateTaskVariables>;

interface CreateTaskRef {
  ...
  (dc: DataConnect, vars: CreateTaskVariables): MutationRef<CreateTaskData, CreateTaskVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateTaskData {
  task_insert: Task_Key;
}

Using createTask's action shortcut function

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

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:

updateTask(vars: UpdateTaskVariables): MutationPromise<UpdateTaskData, UpdateTaskVariables>;

interface UpdateTaskRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateTaskVariables): MutationRef<UpdateTaskData, UpdateTaskVariables>;
}
export const updateTaskRef: UpdateTaskRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateTask(dc: DataConnect, vars: UpdateTaskVariables): MutationPromise<UpdateTaskData, UpdateTaskVariables>;

interface UpdateTaskRef {
  ...
  (dc: DataConnect, vars: UpdateTaskVariables): MutationRef<UpdateTaskData, UpdateTaskVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateTaskData {
  task_update?: Task_Key | null;
}

Using updateTask's action shortcut function

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

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:

deleteTask(vars: DeleteTaskVariables): MutationPromise<DeleteTaskData, DeleteTaskVariables>;

interface DeleteTaskRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteTaskVariables): MutationRef<DeleteTaskData, DeleteTaskVariables>;
}
export const deleteTaskRef: DeleteTaskRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteTask(dc: DataConnect, vars: DeleteTaskVariables): MutationPromise<DeleteTaskData, DeleteTaskVariables>;

interface DeleteTaskRef {
  ...
  (dc: DataConnect, vars: DeleteTaskVariables): MutationRef<DeleteTaskData, DeleteTaskVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteTaskData {
  task_delete?: Task_Key | null;
}

Using deleteTask's action shortcut function

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

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:

createCertificate(vars: CreateCertificateVariables): MutationPromise<CreateCertificateData, CreateCertificateVariables>;

interface CreateCertificateRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateCertificateVariables): MutationRef<CreateCertificateData, CreateCertificateVariables>;
}
export const createCertificateRef: CreateCertificateRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createCertificate(dc: DataConnect, vars: CreateCertificateVariables): MutationPromise<CreateCertificateData, CreateCertificateVariables>;

interface CreateCertificateRef {
  ...
  (dc: DataConnect, vars: CreateCertificateVariables): MutationRef<CreateCertificateData, CreateCertificateVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateCertificateData {
  certificate_insert: Certificate_Key;
}

Using CreateCertificate's action shortcut function

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

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:

updateCertificate(vars: UpdateCertificateVariables): MutationPromise<UpdateCertificateData, UpdateCertificateVariables>;

interface UpdateCertificateRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateCertificateVariables): MutationRef<UpdateCertificateData, UpdateCertificateVariables>;
}
export const updateCertificateRef: UpdateCertificateRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateCertificate(dc: DataConnect, vars: UpdateCertificateVariables): MutationPromise<UpdateCertificateData, UpdateCertificateVariables>;

interface UpdateCertificateRef {
  ...
  (dc: DataConnect, vars: UpdateCertificateVariables): MutationRef<UpdateCertificateData, UpdateCertificateVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateCertificateData {
  certificate_update?: Certificate_Key | null;
}

Using UpdateCertificate's action shortcut function

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

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:

deleteCertificate(vars: DeleteCertificateVariables): MutationPromise<DeleteCertificateData, DeleteCertificateVariables>;

interface DeleteCertificateRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteCertificateVariables): MutationRef<DeleteCertificateData, DeleteCertificateVariables>;
}
export const deleteCertificateRef: DeleteCertificateRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteCertificate(dc: DataConnect, vars: DeleteCertificateVariables): MutationPromise<DeleteCertificateData, DeleteCertificateVariables>;

interface DeleteCertificateRef {
  ...
  (dc: DataConnect, vars: DeleteCertificateVariables): MutationRef<DeleteCertificateData, DeleteCertificateVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteCertificateData {
  certificate_delete?: Certificate_Key | null;
}

Using DeleteCertificate's action shortcut function

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

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:

createRole(vars: CreateRoleVariables): MutationPromise<CreateRoleData, CreateRoleVariables>;

interface CreateRoleRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateRoleVariables): MutationRef<CreateRoleData, CreateRoleVariables>;
}
export const createRoleRef: CreateRoleRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createRole(dc: DataConnect, vars: CreateRoleVariables): MutationPromise<CreateRoleData, CreateRoleVariables>;

interface CreateRoleRef {
  ...
  (dc: DataConnect, vars: CreateRoleVariables): MutationRef<CreateRoleData, CreateRoleVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateRoleData {
  role_insert: Role_Key;
}

Using createRole's action shortcut function

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

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:

updateRole(vars: UpdateRoleVariables): MutationPromise<UpdateRoleData, UpdateRoleVariables>;

interface UpdateRoleRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateRoleVariables): MutationRef<UpdateRoleData, UpdateRoleVariables>;
}
export const updateRoleRef: UpdateRoleRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateRole(dc: DataConnect, vars: UpdateRoleVariables): MutationPromise<UpdateRoleData, UpdateRoleVariables>;

interface UpdateRoleRef {
  ...
  (dc: DataConnect, vars: UpdateRoleVariables): MutationRef<UpdateRoleData, UpdateRoleVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateRoleData {
  role_update?: Role_Key | null;
}

Using updateRole's action shortcut function

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

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:

deleteRole(vars: DeleteRoleVariables): MutationPromise<DeleteRoleData, DeleteRoleVariables>;

interface DeleteRoleRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteRoleVariables): MutationRef<DeleteRoleData, DeleteRoleVariables>;
}
export const deleteRoleRef: DeleteRoleRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteRole(dc: DataConnect, vars: DeleteRoleVariables): MutationPromise<DeleteRoleData, DeleteRoleVariables>;

interface DeleteRoleRef {
  ...
  (dc: DataConnect, vars: DeleteRoleVariables): MutationRef<DeleteRoleData, DeleteRoleVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteRoleData {
  role_delete?: Role_Key | null;
}

Using deleteRole's action shortcut function

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

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:

createClientFeedback(vars: CreateClientFeedbackVariables): MutationPromise<CreateClientFeedbackData, CreateClientFeedbackVariables>;

interface CreateClientFeedbackRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateClientFeedbackVariables): MutationRef<CreateClientFeedbackData, CreateClientFeedbackVariables>;
}
export const createClientFeedbackRef: CreateClientFeedbackRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createClientFeedback(dc: DataConnect, vars: CreateClientFeedbackVariables): MutationPromise<CreateClientFeedbackData, CreateClientFeedbackVariables>;

interface CreateClientFeedbackRef {
  ...
  (dc: DataConnect, vars: CreateClientFeedbackVariables): MutationRef<CreateClientFeedbackData, CreateClientFeedbackVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateClientFeedbackData {
  clientFeedback_insert: ClientFeedback_Key;
}

Using createClientFeedback's action shortcut function

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

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:

updateClientFeedback(vars: UpdateClientFeedbackVariables): MutationPromise<UpdateClientFeedbackData, UpdateClientFeedbackVariables>;

interface UpdateClientFeedbackRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateClientFeedbackVariables): MutationRef<UpdateClientFeedbackData, UpdateClientFeedbackVariables>;
}
export const updateClientFeedbackRef: UpdateClientFeedbackRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateClientFeedback(dc: DataConnect, vars: UpdateClientFeedbackVariables): MutationPromise<UpdateClientFeedbackData, UpdateClientFeedbackVariables>;

interface UpdateClientFeedbackRef {
  ...
  (dc: DataConnect, vars: UpdateClientFeedbackVariables): MutationRef<UpdateClientFeedbackData, UpdateClientFeedbackVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateClientFeedbackData {
  clientFeedback_update?: ClientFeedback_Key | null;
}

Using updateClientFeedback's action shortcut function

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

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:

deleteClientFeedback(vars: DeleteClientFeedbackVariables): MutationPromise<DeleteClientFeedbackData, DeleteClientFeedbackVariables>;

interface DeleteClientFeedbackRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteClientFeedbackVariables): MutationRef<DeleteClientFeedbackData, DeleteClientFeedbackVariables>;
}
export const deleteClientFeedbackRef: DeleteClientFeedbackRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteClientFeedback(dc: DataConnect, vars: DeleteClientFeedbackVariables): MutationPromise<DeleteClientFeedbackData, DeleteClientFeedbackVariables>;

interface DeleteClientFeedbackRef {
  ...
  (dc: DataConnect, vars: DeleteClientFeedbackVariables): MutationRef<DeleteClientFeedbackData, DeleteClientFeedbackVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteClientFeedbackData {
  clientFeedback_delete?: ClientFeedback_Key | null;
}

Using deleteClientFeedback's action shortcut function

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

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:

createBusiness(vars: CreateBusinessVariables): MutationPromise<CreateBusinessData, CreateBusinessVariables>;

interface CreateBusinessRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateBusinessVariables): MutationRef<CreateBusinessData, CreateBusinessVariables>;
}
export const createBusinessRef: CreateBusinessRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createBusiness(dc: DataConnect, vars: CreateBusinessVariables): MutationPromise<CreateBusinessData, CreateBusinessVariables>;

interface CreateBusinessRef {
  ...
  (dc: DataConnect, vars: CreateBusinessVariables): MutationRef<CreateBusinessData, CreateBusinessVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateBusinessData {
  business_insert: Business_Key;
}

Using createBusiness's action shortcut function

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

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:

updateBusiness(vars: UpdateBusinessVariables): MutationPromise<UpdateBusinessData, UpdateBusinessVariables>;

interface UpdateBusinessRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateBusinessVariables): MutationRef<UpdateBusinessData, UpdateBusinessVariables>;
}
export const updateBusinessRef: UpdateBusinessRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateBusiness(dc: DataConnect, vars: UpdateBusinessVariables): MutationPromise<UpdateBusinessData, UpdateBusinessVariables>;

interface UpdateBusinessRef {
  ...
  (dc: DataConnect, vars: UpdateBusinessVariables): MutationRef<UpdateBusinessData, UpdateBusinessVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateBusinessData {
  business_update?: Business_Key | null;
}

Using updateBusiness's action shortcut function

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

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:

deleteBusiness(vars: DeleteBusinessVariables): MutationPromise<DeleteBusinessData, DeleteBusinessVariables>;

interface DeleteBusinessRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteBusinessVariables): MutationRef<DeleteBusinessData, DeleteBusinessVariables>;
}
export const deleteBusinessRef: DeleteBusinessRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteBusiness(dc: DataConnect, vars: DeleteBusinessVariables): MutationPromise<DeleteBusinessData, DeleteBusinessVariables>;

interface DeleteBusinessRef {
  ...
  (dc: DataConnect, vars: DeleteBusinessVariables): MutationRef<DeleteBusinessData, DeleteBusinessVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteBusinessData {
  business_delete?: Business_Key | null;
}

Using deleteBusiness's action shortcut function

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

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:

createConversation(vars?: CreateConversationVariables): MutationPromise<CreateConversationData, CreateConversationVariables>;

interface CreateConversationRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars?: CreateConversationVariables): MutationRef<CreateConversationData, CreateConversationVariables>;
}
export const createConversationRef: CreateConversationRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createConversation(dc: DataConnect, vars?: CreateConversationVariables): MutationPromise<CreateConversationData, CreateConversationVariables>;

interface CreateConversationRef {
  ...
  (dc: DataConnect, vars?: CreateConversationVariables): MutationRef<CreateConversationData, CreateConversationVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateConversationData {
  conversation_insert: Conversation_Key;
}

Using createConversation's action shortcut function

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

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:

updateConversation(vars: UpdateConversationVariables): MutationPromise<UpdateConversationData, UpdateConversationVariables>;

interface UpdateConversationRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateConversationVariables): MutationRef<UpdateConversationData, UpdateConversationVariables>;
}
export const updateConversationRef: UpdateConversationRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateConversation(dc: DataConnect, vars: UpdateConversationVariables): MutationPromise<UpdateConversationData, UpdateConversationVariables>;

interface UpdateConversationRef {
  ...
  (dc: DataConnect, vars: UpdateConversationVariables): MutationRef<UpdateConversationData, UpdateConversationVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateConversationData {
  conversation_update?: Conversation_Key | null;
}

Using updateConversation's action shortcut function

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

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:

updateConversationLastMessage(vars: UpdateConversationLastMessageVariables): MutationPromise<UpdateConversationLastMessageData, UpdateConversationLastMessageVariables>;

interface UpdateConversationLastMessageRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateConversationLastMessageVariables): MutationRef<UpdateConversationLastMessageData, UpdateConversationLastMessageVariables>;
}
export const updateConversationLastMessageRef: UpdateConversationLastMessageRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateConversationLastMessage(dc: DataConnect, vars: UpdateConversationLastMessageVariables): MutationPromise<UpdateConversationLastMessageData, UpdateConversationLastMessageVariables>;

interface UpdateConversationLastMessageRef {
  ...
  (dc: DataConnect, vars: UpdateConversationLastMessageVariables): MutationRef<UpdateConversationLastMessageData, UpdateConversationLastMessageVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateConversationLastMessageData {
  conversation_update?: Conversation_Key | null;
}

Using updateConversationLastMessage's action shortcut function

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

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:

deleteConversation(vars: DeleteConversationVariables): MutationPromise<DeleteConversationData, DeleteConversationVariables>;

interface DeleteConversationRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteConversationVariables): MutationRef<DeleteConversationData, DeleteConversationVariables>;
}
export const deleteConversationRef: DeleteConversationRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteConversation(dc: DataConnect, vars: DeleteConversationVariables): MutationPromise<DeleteConversationData, DeleteConversationVariables>;

interface DeleteConversationRef {
  ...
  (dc: DataConnect, vars: DeleteConversationVariables): MutationRef<DeleteConversationData, DeleteConversationVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteConversationData {
  conversation_delete?: Conversation_Key | null;
}

Using deleteConversation's action shortcut function

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

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:

createCustomRateCard(vars: CreateCustomRateCardVariables): MutationPromise<CreateCustomRateCardData, CreateCustomRateCardVariables>;

interface CreateCustomRateCardRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateCustomRateCardVariables): MutationRef<CreateCustomRateCardData, CreateCustomRateCardVariables>;
}
export const createCustomRateCardRef: CreateCustomRateCardRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createCustomRateCard(dc: DataConnect, vars: CreateCustomRateCardVariables): MutationPromise<CreateCustomRateCardData, CreateCustomRateCardVariables>;

interface CreateCustomRateCardRef {
  ...
  (dc: DataConnect, vars: CreateCustomRateCardVariables): MutationRef<CreateCustomRateCardData, CreateCustomRateCardVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateCustomRateCardData {
  customRateCard_insert: CustomRateCard_Key;
}

Using createCustomRateCard's action shortcut function

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

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:

updateCustomRateCard(vars: UpdateCustomRateCardVariables): MutationPromise<UpdateCustomRateCardData, UpdateCustomRateCardVariables>;

interface UpdateCustomRateCardRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateCustomRateCardVariables): MutationRef<UpdateCustomRateCardData, UpdateCustomRateCardVariables>;
}
export const updateCustomRateCardRef: UpdateCustomRateCardRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateCustomRateCard(dc: DataConnect, vars: UpdateCustomRateCardVariables): MutationPromise<UpdateCustomRateCardData, UpdateCustomRateCardVariables>;

interface UpdateCustomRateCardRef {
  ...
  (dc: DataConnect, vars: UpdateCustomRateCardVariables): MutationRef<UpdateCustomRateCardData, UpdateCustomRateCardVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateCustomRateCardData {
  customRateCard_update?: CustomRateCard_Key | null;
}

Using updateCustomRateCard's action shortcut function

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

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:

deleteCustomRateCard(vars: DeleteCustomRateCardVariables): MutationPromise<DeleteCustomRateCardData, DeleteCustomRateCardVariables>;

interface DeleteCustomRateCardRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteCustomRateCardVariables): MutationRef<DeleteCustomRateCardData, DeleteCustomRateCardVariables>;
}
export const deleteCustomRateCardRef: DeleteCustomRateCardRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteCustomRateCard(dc: DataConnect, vars: DeleteCustomRateCardVariables): MutationPromise<DeleteCustomRateCardData, DeleteCustomRateCardVariables>;

interface DeleteCustomRateCardRef {
  ...
  (dc: DataConnect, vars: DeleteCustomRateCardVariables): MutationRef<DeleteCustomRateCardData, DeleteCustomRateCardVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteCustomRateCardData {
  customRateCard_delete?: CustomRateCard_Key | null;
}

Using deleteCustomRateCard's action shortcut function

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

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:

createRecentPayment(vars: CreateRecentPaymentVariables): MutationPromise<CreateRecentPaymentData, CreateRecentPaymentVariables>;

interface CreateRecentPaymentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateRecentPaymentVariables): MutationRef<CreateRecentPaymentData, CreateRecentPaymentVariables>;
}
export const createRecentPaymentRef: CreateRecentPaymentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createRecentPayment(dc: DataConnect, vars: CreateRecentPaymentVariables): MutationPromise<CreateRecentPaymentData, CreateRecentPaymentVariables>;

interface CreateRecentPaymentRef {
  ...
  (dc: DataConnect, vars: CreateRecentPaymentVariables): MutationRef<CreateRecentPaymentData, CreateRecentPaymentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateRecentPaymentData {
  recentPayment_insert: RecentPayment_Key;
}

Using createRecentPayment's action shortcut function

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

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:

updateRecentPayment(vars: UpdateRecentPaymentVariables): MutationPromise<UpdateRecentPaymentData, UpdateRecentPaymentVariables>;

interface UpdateRecentPaymentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateRecentPaymentVariables): MutationRef<UpdateRecentPaymentData, UpdateRecentPaymentVariables>;
}
export const updateRecentPaymentRef: UpdateRecentPaymentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateRecentPayment(dc: DataConnect, vars: UpdateRecentPaymentVariables): MutationPromise<UpdateRecentPaymentData, UpdateRecentPaymentVariables>;

interface UpdateRecentPaymentRef {
  ...
  (dc: DataConnect, vars: UpdateRecentPaymentVariables): MutationRef<UpdateRecentPaymentData, UpdateRecentPaymentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateRecentPaymentData {
  recentPayment_update?: RecentPayment_Key | null;
}

Using updateRecentPayment's action shortcut function

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

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:

deleteRecentPayment(vars: DeleteRecentPaymentVariables): MutationPromise<DeleteRecentPaymentData, DeleteRecentPaymentVariables>;

interface DeleteRecentPaymentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteRecentPaymentVariables): MutationRef<DeleteRecentPaymentData, DeleteRecentPaymentVariables>;
}
export const deleteRecentPaymentRef: DeleteRecentPaymentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteRecentPayment(dc: DataConnect, vars: DeleteRecentPaymentVariables): MutationPromise<DeleteRecentPaymentData, DeleteRecentPaymentVariables>;

interface DeleteRecentPaymentRef {
  ...
  (dc: DataConnect, vars: DeleteRecentPaymentVariables): MutationRef<DeleteRecentPaymentData, DeleteRecentPaymentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteRecentPaymentData {
  recentPayment_delete?: RecentPayment_Key | null;
}

Using deleteRecentPayment's action shortcut function

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

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:

createUser(vars: CreateUserVariables): MutationPromise<CreateUserData, CreateUserVariables>;

interface CreateUserRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateUserVariables): MutationRef<CreateUserData, CreateUserVariables>;
}
export const createUserRef: CreateUserRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createUser(dc: DataConnect, vars: CreateUserVariables): MutationPromise<CreateUserData, CreateUserVariables>;

interface CreateUserRef {
  ...
  (dc: DataConnect, vars: CreateUserVariables): MutationRef<CreateUserData, CreateUserVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateUserData {
  user_insert: User_Key;
}

Using CreateUser's action shortcut function

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

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:

updateUser(vars: UpdateUserVariables): MutationPromise<UpdateUserData, UpdateUserVariables>;

interface UpdateUserRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateUserVariables): MutationRef<UpdateUserData, UpdateUserVariables>;
}
export const updateUserRef: UpdateUserRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateUser(dc: DataConnect, vars: UpdateUserVariables): MutationPromise<UpdateUserData, UpdateUserVariables>;

interface UpdateUserRef {
  ...
  (dc: DataConnect, vars: UpdateUserVariables): MutationRef<UpdateUserData, UpdateUserVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateUserData {
  user_update?: User_Key | null;
}

Using UpdateUser's action shortcut function

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

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:

deleteUser(vars: DeleteUserVariables): MutationPromise<DeleteUserData, DeleteUserVariables>;

interface DeleteUserRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteUserVariables): MutationRef<DeleteUserData, DeleteUserVariables>;
}
export const deleteUserRef: DeleteUserRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteUser(dc: DataConnect, vars: DeleteUserVariables): MutationPromise<DeleteUserData, DeleteUserVariables>;

interface DeleteUserRef {
  ...
  (dc: DataConnect, vars: DeleteUserVariables): MutationRef<DeleteUserData, DeleteUserVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteUserData {
  user_delete?: User_Key | null;
}

Using DeleteUser's action shortcut function

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

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:

createVendor(vars: CreateVendorVariables): MutationPromise<CreateVendorData, CreateVendorVariables>;

interface CreateVendorRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateVendorVariables): MutationRef<CreateVendorData, CreateVendorVariables>;
}
export const createVendorRef: CreateVendorRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createVendor(dc: DataConnect, vars: CreateVendorVariables): MutationPromise<CreateVendorData, CreateVendorVariables>;

interface CreateVendorRef {
  ...
  (dc: DataConnect, vars: CreateVendorVariables): MutationRef<CreateVendorData, CreateVendorVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateVendorData {
  vendor_insert: Vendor_Key;
}

Using createVendor's action shortcut function

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

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:

updateVendor(vars: UpdateVendorVariables): MutationPromise<UpdateVendorData, UpdateVendorVariables>;

interface UpdateVendorRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateVendorVariables): MutationRef<UpdateVendorData, UpdateVendorVariables>;
}
export const updateVendorRef: UpdateVendorRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateVendor(dc: DataConnect, vars: UpdateVendorVariables): MutationPromise<UpdateVendorData, UpdateVendorVariables>;

interface UpdateVendorRef {
  ...
  (dc: DataConnect, vars: UpdateVendorVariables): MutationRef<UpdateVendorData, UpdateVendorVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateVendorData {
  vendor_update?: Vendor_Key | null;
}

Using updateVendor's action shortcut function

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

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:

deleteVendor(vars: DeleteVendorVariables): MutationPromise<DeleteVendorData, DeleteVendorVariables>;

interface DeleteVendorRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteVendorVariables): MutationRef<DeleteVendorData, DeleteVendorVariables>;
}
export const deleteVendorRef: DeleteVendorRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteVendor(dc: DataConnect, vars: DeleteVendorVariables): MutationPromise<DeleteVendorData, DeleteVendorVariables>;

interface DeleteVendorRef {
  ...
  (dc: DataConnect, vars: DeleteVendorVariables): MutationRef<DeleteVendorData, DeleteVendorVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteVendorData {
  vendor_delete?: Vendor_Key | null;
}

Using deleteVendor's action shortcut function

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

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:

createDocument(vars: CreateDocumentVariables): MutationPromise<CreateDocumentData, CreateDocumentVariables>;

interface CreateDocumentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateDocumentVariables): MutationRef<CreateDocumentData, CreateDocumentVariables>;
}
export const createDocumentRef: CreateDocumentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createDocument(dc: DataConnect, vars: CreateDocumentVariables): MutationPromise<CreateDocumentData, CreateDocumentVariables>;

interface CreateDocumentRef {
  ...
  (dc: DataConnect, vars: CreateDocumentVariables): MutationRef<CreateDocumentData, CreateDocumentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateDocumentData {
  document_insert: Document_Key;
}

Using createDocument's action shortcut function

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

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:

updateDocument(vars: UpdateDocumentVariables): MutationPromise<UpdateDocumentData, UpdateDocumentVariables>;

interface UpdateDocumentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateDocumentVariables): MutationRef<UpdateDocumentData, UpdateDocumentVariables>;
}
export const updateDocumentRef: UpdateDocumentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateDocument(dc: DataConnect, vars: UpdateDocumentVariables): MutationPromise<UpdateDocumentData, UpdateDocumentVariables>;

interface UpdateDocumentRef {
  ...
  (dc: DataConnect, vars: UpdateDocumentVariables): MutationRef<UpdateDocumentData, UpdateDocumentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateDocumentData {
  document_update?: Document_Key | null;
}

Using updateDocument's action shortcut function

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

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:

deleteDocument(vars: DeleteDocumentVariables): MutationPromise<DeleteDocumentData, DeleteDocumentVariables>;

interface DeleteDocumentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteDocumentVariables): MutationRef<DeleteDocumentData, DeleteDocumentVariables>;
}
export const deleteDocumentRef: DeleteDocumentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteDocument(dc: DataConnect, vars: DeleteDocumentVariables): MutationPromise<DeleteDocumentData, DeleteDocumentVariables>;

interface DeleteDocumentRef {
  ...
  (dc: DataConnect, vars: DeleteDocumentVariables): MutationRef<DeleteDocumentData, DeleteDocumentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteDocumentData {
  document_delete?: Document_Key | null;
}

Using deleteDocument's action shortcut function

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

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:

createTaskComment(vars: CreateTaskCommentVariables): MutationPromise<CreateTaskCommentData, CreateTaskCommentVariables>;

interface CreateTaskCommentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateTaskCommentVariables): MutationRef<CreateTaskCommentData, CreateTaskCommentVariables>;
}
export const createTaskCommentRef: CreateTaskCommentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createTaskComment(dc: DataConnect, vars: CreateTaskCommentVariables): MutationPromise<CreateTaskCommentData, CreateTaskCommentVariables>;

interface CreateTaskCommentRef {
  ...
  (dc: DataConnect, vars: CreateTaskCommentVariables): MutationRef<CreateTaskCommentData, CreateTaskCommentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateTaskCommentData {
  taskComment_insert: TaskComment_Key;
}

Using createTaskComment's action shortcut function

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

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:

updateTaskComment(vars: UpdateTaskCommentVariables): MutationPromise<UpdateTaskCommentData, UpdateTaskCommentVariables>;

interface UpdateTaskCommentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateTaskCommentVariables): MutationRef<UpdateTaskCommentData, UpdateTaskCommentVariables>;
}
export const updateTaskCommentRef: UpdateTaskCommentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateTaskComment(dc: DataConnect, vars: UpdateTaskCommentVariables): MutationPromise<UpdateTaskCommentData, UpdateTaskCommentVariables>;

interface UpdateTaskCommentRef {
  ...
  (dc: DataConnect, vars: UpdateTaskCommentVariables): MutationRef<UpdateTaskCommentData, UpdateTaskCommentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateTaskCommentData {
  taskComment_update?: TaskComment_Key | null;
}

Using updateTaskComment's action shortcut function

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

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:

deleteTaskComment(vars: DeleteTaskCommentVariables): MutationPromise<DeleteTaskCommentData, DeleteTaskCommentVariables>;

interface DeleteTaskCommentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteTaskCommentVariables): MutationRef<DeleteTaskCommentData, DeleteTaskCommentVariables>;
}
export const deleteTaskCommentRef: DeleteTaskCommentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteTaskComment(dc: DataConnect, vars: DeleteTaskCommentVariables): MutationPromise<DeleteTaskCommentData, DeleteTaskCommentVariables>;

interface DeleteTaskCommentRef {
  ...
  (dc: DataConnect, vars: DeleteTaskCommentVariables): MutationRef<DeleteTaskCommentData, DeleteTaskCommentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteTaskCommentData {
  taskComment_delete?: TaskComment_Key | null;
}

Using deleteTaskComment's action shortcut function

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

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:

createVendorBenefitPlan(vars: CreateVendorBenefitPlanVariables): MutationPromise<CreateVendorBenefitPlanData, CreateVendorBenefitPlanVariables>;

interface CreateVendorBenefitPlanRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateVendorBenefitPlanVariables): MutationRef<CreateVendorBenefitPlanData, CreateVendorBenefitPlanVariables>;
}
export const createVendorBenefitPlanRef: CreateVendorBenefitPlanRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createVendorBenefitPlan(dc: DataConnect, vars: CreateVendorBenefitPlanVariables): MutationPromise<CreateVendorBenefitPlanData, CreateVendorBenefitPlanVariables>;

interface CreateVendorBenefitPlanRef {
  ...
  (dc: DataConnect, vars: CreateVendorBenefitPlanVariables): MutationRef<CreateVendorBenefitPlanData, CreateVendorBenefitPlanVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateVendorBenefitPlanData {
  vendorBenefitPlan_insert: VendorBenefitPlan_Key;
}

Using createVendorBenefitPlan's action shortcut function

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

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:

updateVendorBenefitPlan(vars: UpdateVendorBenefitPlanVariables): MutationPromise<UpdateVendorBenefitPlanData, UpdateVendorBenefitPlanVariables>;

interface UpdateVendorBenefitPlanRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateVendorBenefitPlanVariables): MutationRef<UpdateVendorBenefitPlanData, UpdateVendorBenefitPlanVariables>;
}
export const updateVendorBenefitPlanRef: UpdateVendorBenefitPlanRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateVendorBenefitPlan(dc: DataConnect, vars: UpdateVendorBenefitPlanVariables): MutationPromise<UpdateVendorBenefitPlanData, UpdateVendorBenefitPlanVariables>;

interface UpdateVendorBenefitPlanRef {
  ...
  (dc: DataConnect, vars: UpdateVendorBenefitPlanVariables): MutationRef<UpdateVendorBenefitPlanData, UpdateVendorBenefitPlanVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateVendorBenefitPlanData {
  vendorBenefitPlan_update?: VendorBenefitPlan_Key | null;
}

Using updateVendorBenefitPlan's action shortcut function

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

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:

deleteVendorBenefitPlan(vars: DeleteVendorBenefitPlanVariables): MutationPromise<DeleteVendorBenefitPlanData, DeleteVendorBenefitPlanVariables>;

interface DeleteVendorBenefitPlanRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteVendorBenefitPlanVariables): MutationRef<DeleteVendorBenefitPlanData, DeleteVendorBenefitPlanVariables>;
}
export const deleteVendorBenefitPlanRef: DeleteVendorBenefitPlanRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteVendorBenefitPlan(dc: DataConnect, vars: DeleteVendorBenefitPlanVariables): MutationPromise<DeleteVendorBenefitPlanData, DeleteVendorBenefitPlanVariables>;

interface DeleteVendorBenefitPlanRef {
  ...
  (dc: DataConnect, vars: DeleteVendorBenefitPlanVariables): MutationRef<DeleteVendorBenefitPlanData, DeleteVendorBenefitPlanVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteVendorBenefitPlanData {
  vendorBenefitPlan_delete?: VendorBenefitPlan_Key | null;
}

Using deleteVendorBenefitPlan's action shortcut function

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

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:

createMessage(vars: CreateMessageVariables): MutationPromise<CreateMessageData, CreateMessageVariables>;

interface CreateMessageRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateMessageVariables): MutationRef<CreateMessageData, CreateMessageVariables>;
}
export const createMessageRef: CreateMessageRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createMessage(dc: DataConnect, vars: CreateMessageVariables): MutationPromise<CreateMessageData, CreateMessageVariables>;

interface CreateMessageRef {
  ...
  (dc: DataConnect, vars: CreateMessageVariables): MutationRef<CreateMessageData, CreateMessageVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateMessageData {
  message_insert: Message_Key;
}

Using createMessage's action shortcut function

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

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:

updateMessage(vars: UpdateMessageVariables): MutationPromise<UpdateMessageData, UpdateMessageVariables>;

interface UpdateMessageRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateMessageVariables): MutationRef<UpdateMessageData, UpdateMessageVariables>;
}
export const updateMessageRef: UpdateMessageRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateMessage(dc: DataConnect, vars: UpdateMessageVariables): MutationPromise<UpdateMessageData, UpdateMessageVariables>;

interface UpdateMessageRef {
  ...
  (dc: DataConnect, vars: UpdateMessageVariables): MutationRef<UpdateMessageData, UpdateMessageVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateMessageData {
  message_update?: Message_Key | null;
}

Using updateMessage's action shortcut function

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

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:

deleteMessage(vars: DeleteMessageVariables): MutationPromise<DeleteMessageData, DeleteMessageVariables>;

interface DeleteMessageRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteMessageVariables): MutationRef<DeleteMessageData, DeleteMessageVariables>;
}
export const deleteMessageRef: DeleteMessageRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteMessage(dc: DataConnect, vars: DeleteMessageVariables): MutationPromise<DeleteMessageData, DeleteMessageVariables>;

interface DeleteMessageRef {
  ...
  (dc: DataConnect, vars: DeleteMessageVariables): MutationRef<DeleteMessageData, DeleteMessageVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteMessageData {
  message_delete?: Message_Key | null;
}

Using deleteMessage's action shortcut function

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

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:

createWorkforce(vars: CreateWorkforceVariables): MutationPromise<CreateWorkforceData, CreateWorkforceVariables>;

interface CreateWorkforceRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateWorkforceVariables): MutationRef<CreateWorkforceData, CreateWorkforceVariables>;
}
export const createWorkforceRef: CreateWorkforceRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createWorkforce(dc: DataConnect, vars: CreateWorkforceVariables): MutationPromise<CreateWorkforceData, CreateWorkforceVariables>;

interface CreateWorkforceRef {
  ...
  (dc: DataConnect, vars: CreateWorkforceVariables): MutationRef<CreateWorkforceData, CreateWorkforceVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateWorkforceData {
  workforce_insert: Workforce_Key;
}

Using createWorkforce's action shortcut function

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

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:

updateWorkforce(vars: UpdateWorkforceVariables): MutationPromise<UpdateWorkforceData, UpdateWorkforceVariables>;

interface UpdateWorkforceRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateWorkforceVariables): MutationRef<UpdateWorkforceData, UpdateWorkforceVariables>;
}
export const updateWorkforceRef: UpdateWorkforceRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateWorkforce(dc: DataConnect, vars: UpdateWorkforceVariables): MutationPromise<UpdateWorkforceData, UpdateWorkforceVariables>;

interface UpdateWorkforceRef {
  ...
  (dc: DataConnect, vars: UpdateWorkforceVariables): MutationRef<UpdateWorkforceData, UpdateWorkforceVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateWorkforceData {
  workforce_update?: Workforce_Key | null;
}

Using updateWorkforce's action shortcut function

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

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:

deactivateWorkforce(vars: DeactivateWorkforceVariables): MutationPromise<DeactivateWorkforceData, DeactivateWorkforceVariables>;

interface DeactivateWorkforceRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeactivateWorkforceVariables): MutationRef<DeactivateWorkforceData, DeactivateWorkforceVariables>;
}
export const deactivateWorkforceRef: DeactivateWorkforceRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deactivateWorkforce(dc: DataConnect, vars: DeactivateWorkforceVariables): MutationPromise<DeactivateWorkforceData, DeactivateWorkforceVariables>;

interface DeactivateWorkforceRef {
  ...
  (dc: DataConnect, vars: DeactivateWorkforceVariables): MutationRef<DeactivateWorkforceData, DeactivateWorkforceVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeactivateWorkforceData {
  workforce_update?: Workforce_Key | null;
}

Using deactivateWorkforce's action shortcut function

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

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:

createFaqData(vars: CreateFaqDataVariables): MutationPromise<CreateFaqDataData, CreateFaqDataVariables>;

interface CreateFaqDataRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateFaqDataVariables): MutationRef<CreateFaqDataData, CreateFaqDataVariables>;
}
export const createFaqDataRef: CreateFaqDataRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createFaqData(dc: DataConnect, vars: CreateFaqDataVariables): MutationPromise<CreateFaqDataData, CreateFaqDataVariables>;

interface CreateFaqDataRef {
  ...
  (dc: DataConnect, vars: CreateFaqDataVariables): MutationRef<CreateFaqDataData, CreateFaqDataVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateFaqDataData {
  faqData_insert: FaqData_Key;
}

Using createFaqData's action shortcut function

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

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:

updateFaqData(vars: UpdateFaqDataVariables): MutationPromise<UpdateFaqDataData, UpdateFaqDataVariables>;

interface UpdateFaqDataRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateFaqDataVariables): MutationRef<UpdateFaqDataData, UpdateFaqDataVariables>;
}
export const updateFaqDataRef: UpdateFaqDataRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateFaqData(dc: DataConnect, vars: UpdateFaqDataVariables): MutationPromise<UpdateFaqDataData, UpdateFaqDataVariables>;

interface UpdateFaqDataRef {
  ...
  (dc: DataConnect, vars: UpdateFaqDataVariables): MutationRef<UpdateFaqDataData, UpdateFaqDataVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateFaqDataData {
  faqData_update?: FaqData_Key | null;
}

Using updateFaqData's action shortcut function

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

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:

deleteFaqData(vars: DeleteFaqDataVariables): MutationPromise<DeleteFaqDataData, DeleteFaqDataVariables>;

interface DeleteFaqDataRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteFaqDataVariables): MutationRef<DeleteFaqDataData, DeleteFaqDataVariables>;
}
export const deleteFaqDataRef: DeleteFaqDataRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteFaqData(dc: DataConnect, vars: DeleteFaqDataVariables): MutationPromise<DeleteFaqDataData, DeleteFaqDataVariables>;

interface DeleteFaqDataRef {
  ...
  (dc: DataConnect, vars: DeleteFaqDataVariables): MutationRef<DeleteFaqDataData, DeleteFaqDataVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteFaqDataData {
  faqData_delete?: FaqData_Key | null;
}

Using deleteFaqData's action shortcut function

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

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:

createInvoice(vars: CreateInvoiceVariables): MutationPromise<CreateInvoiceData, CreateInvoiceVariables>;

interface CreateInvoiceRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateInvoiceVariables): MutationRef<CreateInvoiceData, CreateInvoiceVariables>;
}
export const createInvoiceRef: CreateInvoiceRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createInvoice(dc: DataConnect, vars: CreateInvoiceVariables): MutationPromise<CreateInvoiceData, CreateInvoiceVariables>;

interface CreateInvoiceRef {
  ...
  (dc: DataConnect, vars: CreateInvoiceVariables): MutationRef<CreateInvoiceData, CreateInvoiceVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateInvoiceData {
  invoice_insert: Invoice_Key;
}

Using createInvoice's action shortcut function

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

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:

updateInvoice(vars: UpdateInvoiceVariables): MutationPromise<UpdateInvoiceData, UpdateInvoiceVariables>;

interface UpdateInvoiceRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateInvoiceVariables): MutationRef<UpdateInvoiceData, UpdateInvoiceVariables>;
}
export const updateInvoiceRef: UpdateInvoiceRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateInvoice(dc: DataConnect, vars: UpdateInvoiceVariables): MutationPromise<UpdateInvoiceData, UpdateInvoiceVariables>;

interface UpdateInvoiceRef {
  ...
  (dc: DataConnect, vars: UpdateInvoiceVariables): MutationRef<UpdateInvoiceData, UpdateInvoiceVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateInvoiceData {
  invoice_update?: Invoice_Key | null;
}

Using updateInvoice's action shortcut function

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

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:

deleteInvoice(vars: DeleteInvoiceVariables): MutationPromise<DeleteInvoiceData, DeleteInvoiceVariables>;

interface DeleteInvoiceRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteInvoiceVariables): MutationRef<DeleteInvoiceData, DeleteInvoiceVariables>;
}
export const deleteInvoiceRef: DeleteInvoiceRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteInvoice(dc: DataConnect, vars: DeleteInvoiceVariables): MutationPromise<DeleteInvoiceData, DeleteInvoiceVariables>;

interface DeleteInvoiceRef {
  ...
  (dc: DataConnect, vars: DeleteInvoiceVariables): MutationRef<DeleteInvoiceData, DeleteInvoiceVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteInvoiceData {
  invoice_delete?: Invoice_Key | null;
}

Using deleteInvoice's action shortcut function

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

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:

createTeamHub(vars: CreateTeamHubVariables): MutationPromise<CreateTeamHubData, CreateTeamHubVariables>;

interface CreateTeamHubRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateTeamHubVariables): MutationRef<CreateTeamHubData, CreateTeamHubVariables>;
}
export const createTeamHubRef: CreateTeamHubRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createTeamHub(dc: DataConnect, vars: CreateTeamHubVariables): MutationPromise<CreateTeamHubData, CreateTeamHubVariables>;

interface CreateTeamHubRef {
  ...
  (dc: DataConnect, vars: CreateTeamHubVariables): MutationRef<CreateTeamHubData, CreateTeamHubVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateTeamHubData {
  teamHub_insert: TeamHub_Key;
}

Using createTeamHub's action shortcut function

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

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:

updateTeamHub(vars: UpdateTeamHubVariables): MutationPromise<UpdateTeamHubData, UpdateTeamHubVariables>;

interface UpdateTeamHubRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateTeamHubVariables): MutationRef<UpdateTeamHubData, UpdateTeamHubVariables>;
}
export const updateTeamHubRef: UpdateTeamHubRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateTeamHub(dc: DataConnect, vars: UpdateTeamHubVariables): MutationPromise<UpdateTeamHubData, UpdateTeamHubVariables>;

interface UpdateTeamHubRef {
  ...
  (dc: DataConnect, vars: UpdateTeamHubVariables): MutationRef<UpdateTeamHubData, UpdateTeamHubVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateTeamHubData {
  teamHub_update?: TeamHub_Key | null;
}

Using updateTeamHub's action shortcut function

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

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:

deleteTeamHub(vars: DeleteTeamHubVariables): MutationPromise<DeleteTeamHubData, DeleteTeamHubVariables>;

interface DeleteTeamHubRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteTeamHubVariables): MutationRef<DeleteTeamHubData, DeleteTeamHubVariables>;
}
export const deleteTeamHubRef: DeleteTeamHubRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteTeamHub(dc: DataConnect, vars: DeleteTeamHubVariables): MutationPromise<DeleteTeamHubData, DeleteTeamHubVariables>;

interface DeleteTeamHubRef {
  ...
  (dc: DataConnect, vars: DeleteTeamHubVariables): MutationRef<DeleteTeamHubData, DeleteTeamHubVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteTeamHubData {
  teamHub_delete?: TeamHub_Key | null;
}

Using deleteTeamHub's action shortcut function

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

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:

createHub(vars: CreateHubVariables): MutationPromise<CreateHubData, CreateHubVariables>;

interface CreateHubRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateHubVariables): MutationRef<CreateHubData, CreateHubVariables>;
}
export const createHubRef: CreateHubRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createHub(dc: DataConnect, vars: CreateHubVariables): MutationPromise<CreateHubData, CreateHubVariables>;

interface CreateHubRef {
  ...
  (dc: DataConnect, vars: CreateHubVariables): MutationRef<CreateHubData, CreateHubVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateHubData {
  hub_insert: Hub_Key;
}

Using createHub's action shortcut function

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

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:

updateHub(vars: UpdateHubVariables): MutationPromise<UpdateHubData, UpdateHubVariables>;

interface UpdateHubRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateHubVariables): MutationRef<UpdateHubData, UpdateHubVariables>;
}
export const updateHubRef: UpdateHubRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateHub(dc: DataConnect, vars: UpdateHubVariables): MutationPromise<UpdateHubData, UpdateHubVariables>;

interface UpdateHubRef {
  ...
  (dc: DataConnect, vars: UpdateHubVariables): MutationRef<UpdateHubData, UpdateHubVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateHubData {
  hub_update?: Hub_Key | null;
}

Using updateHub's action shortcut function

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

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:

deleteHub(vars: DeleteHubVariables): MutationPromise<DeleteHubData, DeleteHubVariables>;

interface DeleteHubRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteHubVariables): MutationRef<DeleteHubData, DeleteHubVariables>;
}
export const deleteHubRef: DeleteHubRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteHub(dc: DataConnect, vars: DeleteHubVariables): MutationPromise<DeleteHubData, DeleteHubVariables>;

interface DeleteHubRef {
  ...
  (dc: DataConnect, vars: DeleteHubVariables): MutationRef<DeleteHubData, DeleteHubVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteHubData {
  hub_delete?: Hub_Key | null;
}

Using deleteHub's action shortcut function

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

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:

createRoleCategory(vars: CreateRoleCategoryVariables): MutationPromise<CreateRoleCategoryData, CreateRoleCategoryVariables>;

interface CreateRoleCategoryRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateRoleCategoryVariables): MutationRef<CreateRoleCategoryData, CreateRoleCategoryVariables>;
}
export const createRoleCategoryRef: CreateRoleCategoryRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createRoleCategory(dc: DataConnect, vars: CreateRoleCategoryVariables): MutationPromise<CreateRoleCategoryData, CreateRoleCategoryVariables>;

interface CreateRoleCategoryRef {
  ...
  (dc: DataConnect, vars: CreateRoleCategoryVariables): MutationRef<CreateRoleCategoryData, CreateRoleCategoryVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateRoleCategoryData {
  roleCategory_insert: RoleCategory_Key;
}

Using createRoleCategory's action shortcut function

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

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:

updateRoleCategory(vars: UpdateRoleCategoryVariables): MutationPromise<UpdateRoleCategoryData, UpdateRoleCategoryVariables>;

interface UpdateRoleCategoryRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateRoleCategoryVariables): MutationRef<UpdateRoleCategoryData, UpdateRoleCategoryVariables>;
}
export const updateRoleCategoryRef: UpdateRoleCategoryRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateRoleCategory(dc: DataConnect, vars: UpdateRoleCategoryVariables): MutationPromise<UpdateRoleCategoryData, UpdateRoleCategoryVariables>;

interface UpdateRoleCategoryRef {
  ...
  (dc: DataConnect, vars: UpdateRoleCategoryVariables): MutationRef<UpdateRoleCategoryData, UpdateRoleCategoryVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateRoleCategoryData {
  roleCategory_update?: RoleCategory_Key | null;
}

Using updateRoleCategory's action shortcut function

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

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:

deleteRoleCategory(vars: DeleteRoleCategoryVariables): MutationPromise<DeleteRoleCategoryData, DeleteRoleCategoryVariables>;

interface DeleteRoleCategoryRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteRoleCategoryVariables): MutationRef<DeleteRoleCategoryData, DeleteRoleCategoryVariables>;
}
export const deleteRoleCategoryRef: DeleteRoleCategoryRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteRoleCategory(dc: DataConnect, vars: DeleteRoleCategoryVariables): MutationPromise<DeleteRoleCategoryData, DeleteRoleCategoryVariables>;

interface DeleteRoleCategoryRef {
  ...
  (dc: DataConnect, vars: DeleteRoleCategoryVariables): MutationRef<DeleteRoleCategoryData, DeleteRoleCategoryVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteRoleCategoryData {
  roleCategory_delete?: RoleCategory_Key | null;
}

Using deleteRoleCategory's action shortcut function

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

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:

createStaffAvailabilityStats(vars: CreateStaffAvailabilityStatsVariables): MutationPromise<CreateStaffAvailabilityStatsData, CreateStaffAvailabilityStatsVariables>;

interface CreateStaffAvailabilityStatsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateStaffAvailabilityStatsVariables): MutationRef<CreateStaffAvailabilityStatsData, CreateStaffAvailabilityStatsVariables>;
}
export const createStaffAvailabilityStatsRef: CreateStaffAvailabilityStatsRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createStaffAvailabilityStats(dc: DataConnect, vars: CreateStaffAvailabilityStatsVariables): MutationPromise<CreateStaffAvailabilityStatsData, CreateStaffAvailabilityStatsVariables>;

interface CreateStaffAvailabilityStatsRef {
  ...
  (dc: DataConnect, vars: CreateStaffAvailabilityStatsVariables): MutationRef<CreateStaffAvailabilityStatsData, CreateStaffAvailabilityStatsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateStaffAvailabilityStatsData {
  staffAvailabilityStats_insert: StaffAvailabilityStats_Key;
}

Using createStaffAvailabilityStats's action shortcut function

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

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:

updateStaffAvailabilityStats(vars: UpdateStaffAvailabilityStatsVariables): MutationPromise<UpdateStaffAvailabilityStatsData, UpdateStaffAvailabilityStatsVariables>;

interface UpdateStaffAvailabilityStatsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateStaffAvailabilityStatsVariables): MutationRef<UpdateStaffAvailabilityStatsData, UpdateStaffAvailabilityStatsVariables>;
}
export const updateStaffAvailabilityStatsRef: UpdateStaffAvailabilityStatsRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateStaffAvailabilityStats(dc: DataConnect, vars: UpdateStaffAvailabilityStatsVariables): MutationPromise<UpdateStaffAvailabilityStatsData, UpdateStaffAvailabilityStatsVariables>;

interface UpdateStaffAvailabilityStatsRef {
  ...
  (dc: DataConnect, vars: UpdateStaffAvailabilityStatsVariables): MutationRef<UpdateStaffAvailabilityStatsData, UpdateStaffAvailabilityStatsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateStaffAvailabilityStatsData {
  staffAvailabilityStats_update?: StaffAvailabilityStats_Key | null;
}

Using updateStaffAvailabilityStats's action shortcut function

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

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:

deleteStaffAvailabilityStats(vars: DeleteStaffAvailabilityStatsVariables): MutationPromise<DeleteStaffAvailabilityStatsData, DeleteStaffAvailabilityStatsVariables>;

interface DeleteStaffAvailabilityStatsRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteStaffAvailabilityStatsVariables): MutationRef<DeleteStaffAvailabilityStatsData, DeleteStaffAvailabilityStatsVariables>;
}
export const deleteStaffAvailabilityStatsRef: DeleteStaffAvailabilityStatsRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteStaffAvailabilityStats(dc: DataConnect, vars: DeleteStaffAvailabilityStatsVariables): MutationPromise<DeleteStaffAvailabilityStatsData, DeleteStaffAvailabilityStatsVariables>;

interface DeleteStaffAvailabilityStatsRef {
  ...
  (dc: DataConnect, vars: DeleteStaffAvailabilityStatsVariables): MutationRef<DeleteStaffAvailabilityStatsData, DeleteStaffAvailabilityStatsVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteStaffAvailabilityStatsData {
  staffAvailabilityStats_delete?: StaffAvailabilityStats_Key | null;
}

Using deleteStaffAvailabilityStats's action shortcut function

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

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:

createShiftRole(vars: CreateShiftRoleVariables): MutationPromise<CreateShiftRoleData, CreateShiftRoleVariables>;

interface CreateShiftRoleRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateShiftRoleVariables): MutationRef<CreateShiftRoleData, CreateShiftRoleVariables>;
}
export const createShiftRoleRef: CreateShiftRoleRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createShiftRole(dc: DataConnect, vars: CreateShiftRoleVariables): MutationPromise<CreateShiftRoleData, CreateShiftRoleVariables>;

interface CreateShiftRoleRef {
  ...
  (dc: DataConnect, vars: CreateShiftRoleVariables): MutationRef<CreateShiftRoleData, CreateShiftRoleVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateShiftRoleData {
  shiftRole_insert: ShiftRole_Key;
}

Using createShiftRole's action shortcut function

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

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:

updateShiftRole(vars: UpdateShiftRoleVariables): MutationPromise<UpdateShiftRoleData, UpdateShiftRoleVariables>;

interface UpdateShiftRoleRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateShiftRoleVariables): MutationRef<UpdateShiftRoleData, UpdateShiftRoleVariables>;
}
export const updateShiftRoleRef: UpdateShiftRoleRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateShiftRole(dc: DataConnect, vars: UpdateShiftRoleVariables): MutationPromise<UpdateShiftRoleData, UpdateShiftRoleVariables>;

interface UpdateShiftRoleRef {
  ...
  (dc: DataConnect, vars: UpdateShiftRoleVariables): MutationRef<UpdateShiftRoleData, UpdateShiftRoleVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateShiftRoleData {
  shiftRole_update?: ShiftRole_Key | null;
}

Using updateShiftRole's action shortcut function

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

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:

deleteShiftRole(vars: DeleteShiftRoleVariables): MutationPromise<DeleteShiftRoleData, DeleteShiftRoleVariables>;

interface DeleteShiftRoleRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteShiftRoleVariables): MutationRef<DeleteShiftRoleData, DeleteShiftRoleVariables>;
}
export const deleteShiftRoleRef: DeleteShiftRoleRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteShiftRole(dc: DataConnect, vars: DeleteShiftRoleVariables): MutationPromise<DeleteShiftRoleData, DeleteShiftRoleVariables>;

interface DeleteShiftRoleRef {
  ...
  (dc: DataConnect, vars: DeleteShiftRoleVariables): MutationRef<DeleteShiftRoleData, DeleteShiftRoleVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteShiftRoleData {
  shiftRole_delete?: ShiftRole_Key | null;
}

Using deleteShiftRole's action shortcut function

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

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:

createStaffRole(vars: CreateStaffRoleVariables): MutationPromise<CreateStaffRoleData, CreateStaffRoleVariables>;

interface CreateStaffRoleRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateStaffRoleVariables): MutationRef<CreateStaffRoleData, CreateStaffRoleVariables>;
}
export const createStaffRoleRef: CreateStaffRoleRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createStaffRole(dc: DataConnect, vars: CreateStaffRoleVariables): MutationPromise<CreateStaffRoleData, CreateStaffRoleVariables>;

interface CreateStaffRoleRef {
  ...
  (dc: DataConnect, vars: CreateStaffRoleVariables): MutationRef<CreateStaffRoleData, CreateStaffRoleVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateStaffRoleData {
  staffRole_insert: StaffRole_Key;
}

Using createStaffRole's action shortcut function

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

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:

deleteStaffRole(vars: DeleteStaffRoleVariables): MutationPromise<DeleteStaffRoleData, DeleteStaffRoleVariables>;

interface DeleteStaffRoleRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteStaffRoleVariables): MutationRef<DeleteStaffRoleData, DeleteStaffRoleVariables>;
}
export const deleteStaffRoleRef: DeleteStaffRoleRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteStaffRole(dc: DataConnect, vars: DeleteStaffRoleVariables): MutationPromise<DeleteStaffRoleData, DeleteStaffRoleVariables>;

interface DeleteStaffRoleRef {
  ...
  (dc: DataConnect, vars: DeleteStaffRoleVariables): MutationRef<DeleteStaffRoleData, DeleteStaffRoleVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteStaffRoleData {
  staffRole_delete?: StaffRole_Key | null;
}

Using deleteStaffRole's action shortcut function

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

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:

createAccount(vars: CreateAccountVariables): MutationPromise<CreateAccountData, CreateAccountVariables>;

interface CreateAccountRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateAccountVariables): MutationRef<CreateAccountData, CreateAccountVariables>;
}
export const createAccountRef: CreateAccountRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createAccount(dc: DataConnect, vars: CreateAccountVariables): MutationPromise<CreateAccountData, CreateAccountVariables>;

interface CreateAccountRef {
  ...
  (dc: DataConnect, vars: CreateAccountVariables): MutationRef<CreateAccountData, CreateAccountVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateAccountData {
  account_insert: Account_Key;
}

Using createAccount's action shortcut function

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

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:

updateAccount(vars: UpdateAccountVariables): MutationPromise<UpdateAccountData, UpdateAccountVariables>;

interface UpdateAccountRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateAccountVariables): MutationRef<UpdateAccountData, UpdateAccountVariables>;
}
export const updateAccountRef: UpdateAccountRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateAccount(dc: DataConnect, vars: UpdateAccountVariables): MutationPromise<UpdateAccountData, UpdateAccountVariables>;

interface UpdateAccountRef {
  ...
  (dc: DataConnect, vars: UpdateAccountVariables): MutationRef<UpdateAccountData, UpdateAccountVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateAccountData {
  account_update?: Account_Key | null;
}

Using updateAccount's action shortcut function

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

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:

deleteAccount(vars: DeleteAccountVariables): MutationPromise<DeleteAccountData, DeleteAccountVariables>;

interface DeleteAccountRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteAccountVariables): MutationRef<DeleteAccountData, DeleteAccountVariables>;
}
export const deleteAccountRef: DeleteAccountRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteAccount(dc: DataConnect, vars: DeleteAccountVariables): MutationPromise<DeleteAccountData, DeleteAccountVariables>;

interface DeleteAccountRef {
  ...
  (dc: DataConnect, vars: DeleteAccountVariables): MutationRef<DeleteAccountData, DeleteAccountVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteAccountData {
  account_delete?: Account_Key | null;
}

Using deleteAccount's action shortcut function

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

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:

createApplication(vars: CreateApplicationVariables): MutationPromise<CreateApplicationData, CreateApplicationVariables>;

interface CreateApplicationRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateApplicationVariables): MutationRef<CreateApplicationData, CreateApplicationVariables>;
}
export const createApplicationRef: CreateApplicationRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createApplication(dc: DataConnect, vars: CreateApplicationVariables): MutationPromise<CreateApplicationData, CreateApplicationVariables>;

interface CreateApplicationRef {
  ...
  (dc: DataConnect, vars: CreateApplicationVariables): MutationRef<CreateApplicationData, CreateApplicationVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateApplicationData {
  application_insert: Application_Key;
}

Using createApplication's action shortcut function

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

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:

updateApplicationStatus(vars: UpdateApplicationStatusVariables): MutationPromise<UpdateApplicationStatusData, UpdateApplicationStatusVariables>;

interface UpdateApplicationStatusRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateApplicationStatusVariables): MutationRef<UpdateApplicationStatusData, UpdateApplicationStatusVariables>;
}
export const updateApplicationStatusRef: UpdateApplicationStatusRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateApplicationStatus(dc: DataConnect, vars: UpdateApplicationStatusVariables): MutationPromise<UpdateApplicationStatusData, UpdateApplicationStatusVariables>;

interface UpdateApplicationStatusRef {
  ...
  (dc: DataConnect, vars: UpdateApplicationStatusVariables): MutationRef<UpdateApplicationStatusData, UpdateApplicationStatusVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateApplicationStatusData {
  application_update?: Application_Key | null;
}

Using updateApplicationStatus's action shortcut function

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

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:

deleteApplication(vars: DeleteApplicationVariables): MutationPromise<DeleteApplicationData, DeleteApplicationVariables>;

interface DeleteApplicationRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteApplicationVariables): MutationRef<DeleteApplicationData, DeleteApplicationVariables>;
}
export const deleteApplicationRef: DeleteApplicationRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteApplication(dc: DataConnect, vars: DeleteApplicationVariables): MutationPromise<DeleteApplicationData, DeleteApplicationVariables>;

interface DeleteApplicationRef {
  ...
  (dc: DataConnect, vars: DeleteApplicationVariables): MutationRef<DeleteApplicationData, DeleteApplicationVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteApplicationData {
  application_delete?: Application_Key | null;
}

Using deleteApplication's action shortcut function

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

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:

createAssignment(vars: CreateAssignmentVariables): MutationPromise<CreateAssignmentData, CreateAssignmentVariables>;

interface CreateAssignmentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateAssignmentVariables): MutationRef<CreateAssignmentData, CreateAssignmentVariables>;
}
export const createAssignmentRef: CreateAssignmentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createAssignment(dc: DataConnect, vars: CreateAssignmentVariables): MutationPromise<CreateAssignmentData, CreateAssignmentVariables>;

interface CreateAssignmentRef {
  ...
  (dc: DataConnect, vars: CreateAssignmentVariables): MutationRef<CreateAssignmentData, CreateAssignmentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateAssignmentData {
  assignment_insert: Assignment_Key;
}

Using CreateAssignment's action shortcut function

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

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:

updateAssignment(vars: UpdateAssignmentVariables): MutationPromise<UpdateAssignmentData, UpdateAssignmentVariables>;

interface UpdateAssignmentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateAssignmentVariables): MutationRef<UpdateAssignmentData, UpdateAssignmentVariables>;
}
export const updateAssignmentRef: UpdateAssignmentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateAssignment(dc: DataConnect, vars: UpdateAssignmentVariables): MutationPromise<UpdateAssignmentData, UpdateAssignmentVariables>;

interface UpdateAssignmentRef {
  ...
  (dc: DataConnect, vars: UpdateAssignmentVariables): MutationRef<UpdateAssignmentData, UpdateAssignmentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateAssignmentData {
  assignment_update?: Assignment_Key | null;
}

Using UpdateAssignment's action shortcut function

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

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:

deleteAssignment(vars: DeleteAssignmentVariables): MutationPromise<DeleteAssignmentData, DeleteAssignmentVariables>;

interface DeleteAssignmentRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteAssignmentVariables): MutationRef<DeleteAssignmentData, DeleteAssignmentVariables>;
}
export const deleteAssignmentRef: DeleteAssignmentRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteAssignment(dc: DataConnect, vars: DeleteAssignmentVariables): MutationPromise<DeleteAssignmentData, DeleteAssignmentVariables>;

interface DeleteAssignmentRef {
  ...
  (dc: DataConnect, vars: DeleteAssignmentVariables): MutationRef<DeleteAssignmentData, DeleteAssignmentVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteAssignmentData {
  assignment_delete?: Assignment_Key | null;
}

Using DeleteAssignment's action shortcut function

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

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:

createInvoiceTemplate(vars: CreateInvoiceTemplateVariables): MutationPromise<CreateInvoiceTemplateData, CreateInvoiceTemplateVariables>;

interface CreateInvoiceTemplateRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateInvoiceTemplateVariables): MutationRef<CreateInvoiceTemplateData, CreateInvoiceTemplateVariables>;
}
export const createInvoiceTemplateRef: CreateInvoiceTemplateRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createInvoiceTemplate(dc: DataConnect, vars: CreateInvoiceTemplateVariables): MutationPromise<CreateInvoiceTemplateData, CreateInvoiceTemplateVariables>;

interface CreateInvoiceTemplateRef {
  ...
  (dc: DataConnect, vars: CreateInvoiceTemplateVariables): MutationRef<CreateInvoiceTemplateData, CreateInvoiceTemplateVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateInvoiceTemplateData {
  invoiceTemplate_insert: InvoiceTemplate_Key;
}

Using createInvoiceTemplate's action shortcut function

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

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:

updateInvoiceTemplate(vars: UpdateInvoiceTemplateVariables): MutationPromise<UpdateInvoiceTemplateData, UpdateInvoiceTemplateVariables>;

interface UpdateInvoiceTemplateRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateInvoiceTemplateVariables): MutationRef<UpdateInvoiceTemplateData, UpdateInvoiceTemplateVariables>;
}
export const updateInvoiceTemplateRef: UpdateInvoiceTemplateRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateInvoiceTemplate(dc: DataConnect, vars: UpdateInvoiceTemplateVariables): MutationPromise<UpdateInvoiceTemplateData, UpdateInvoiceTemplateVariables>;

interface UpdateInvoiceTemplateRef {
  ...
  (dc: DataConnect, vars: UpdateInvoiceTemplateVariables): MutationRef<UpdateInvoiceTemplateData, UpdateInvoiceTemplateVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateInvoiceTemplateData {
  invoiceTemplate_update?: InvoiceTemplate_Key | null;
}

Using updateInvoiceTemplate's action shortcut function

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

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:

deleteInvoiceTemplate(vars: DeleteInvoiceTemplateVariables): MutationPromise<DeleteInvoiceTemplateData, DeleteInvoiceTemplateVariables>;

interface DeleteInvoiceTemplateRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteInvoiceTemplateVariables): MutationRef<DeleteInvoiceTemplateData, DeleteInvoiceTemplateVariables>;
}
export const deleteInvoiceTemplateRef: DeleteInvoiceTemplateRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteInvoiceTemplate(dc: DataConnect, vars: DeleteInvoiceTemplateVariables): MutationPromise<DeleteInvoiceTemplateData, DeleteInvoiceTemplateVariables>;

interface DeleteInvoiceTemplateRef {
  ...
  (dc: DataConnect, vars: DeleteInvoiceTemplateVariables): MutationRef<DeleteInvoiceTemplateData, DeleteInvoiceTemplateVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteInvoiceTemplateData {
  invoiceTemplate_delete?: InvoiceTemplate_Key | null;
}

Using deleteInvoiceTemplate's action shortcut function

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

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:

createStaffAvailability(vars: CreateStaffAvailabilityVariables): MutationPromise<CreateStaffAvailabilityData, CreateStaffAvailabilityVariables>;

interface CreateStaffAvailabilityRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateStaffAvailabilityVariables): MutationRef<CreateStaffAvailabilityData, CreateStaffAvailabilityVariables>;
}
export const createStaffAvailabilityRef: CreateStaffAvailabilityRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createStaffAvailability(dc: DataConnect, vars: CreateStaffAvailabilityVariables): MutationPromise<CreateStaffAvailabilityData, CreateStaffAvailabilityVariables>;

interface CreateStaffAvailabilityRef {
  ...
  (dc: DataConnect, vars: CreateStaffAvailabilityVariables): MutationRef<CreateStaffAvailabilityData, CreateStaffAvailabilityVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateStaffAvailabilityData {
  staffAvailability_insert: StaffAvailability_Key;
}

Using createStaffAvailability's action shortcut function

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

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:

updateStaffAvailability(vars: UpdateStaffAvailabilityVariables): MutationPromise<UpdateStaffAvailabilityData, UpdateStaffAvailabilityVariables>;

interface UpdateStaffAvailabilityRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateStaffAvailabilityVariables): MutationRef<UpdateStaffAvailabilityData, UpdateStaffAvailabilityVariables>;
}
export const updateStaffAvailabilityRef: UpdateStaffAvailabilityRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateStaffAvailability(dc: DataConnect, vars: UpdateStaffAvailabilityVariables): MutationPromise<UpdateStaffAvailabilityData, UpdateStaffAvailabilityVariables>;

interface UpdateStaffAvailabilityRef {
  ...
  (dc: DataConnect, vars: UpdateStaffAvailabilityVariables): MutationRef<UpdateStaffAvailabilityData, UpdateStaffAvailabilityVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateStaffAvailabilityData {
  staffAvailability_update?: StaffAvailability_Key | null;
}

Using updateStaffAvailability's action shortcut function

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

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:

deleteStaffAvailability(vars: DeleteStaffAvailabilityVariables): MutationPromise<DeleteStaffAvailabilityData, DeleteStaffAvailabilityVariables>;

interface DeleteStaffAvailabilityRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteStaffAvailabilityVariables): MutationRef<DeleteStaffAvailabilityData, DeleteStaffAvailabilityVariables>;
}
export const deleteStaffAvailabilityRef: DeleteStaffAvailabilityRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteStaffAvailability(dc: DataConnect, vars: DeleteStaffAvailabilityVariables): MutationPromise<DeleteStaffAvailabilityData, DeleteStaffAvailabilityVariables>;

interface DeleteStaffAvailabilityRef {
  ...
  (dc: DataConnect, vars: DeleteStaffAvailabilityVariables): MutationRef<DeleteStaffAvailabilityData, DeleteStaffAvailabilityVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteStaffAvailabilityData {
  staffAvailability_delete?: StaffAvailability_Key | null;
}

Using deleteStaffAvailability's action shortcut function

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

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:

createTeamMember(vars: CreateTeamMemberVariables): MutationPromise<CreateTeamMemberData, CreateTeamMemberVariables>;

interface CreateTeamMemberRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateTeamMemberVariables): MutationRef<CreateTeamMemberData, CreateTeamMemberVariables>;
}
export const createTeamMemberRef: CreateTeamMemberRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createTeamMember(dc: DataConnect, vars: CreateTeamMemberVariables): MutationPromise<CreateTeamMemberData, CreateTeamMemberVariables>;

interface CreateTeamMemberRef {
  ...
  (dc: DataConnect, vars: CreateTeamMemberVariables): MutationRef<CreateTeamMemberData, CreateTeamMemberVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateTeamMemberData {
  teamMember_insert: TeamMember_Key;
}

Using createTeamMember's action shortcut function

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

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:

updateTeamMember(vars: UpdateTeamMemberVariables): MutationPromise<UpdateTeamMemberData, UpdateTeamMemberVariables>;

interface UpdateTeamMemberRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateTeamMemberVariables): MutationRef<UpdateTeamMemberData, UpdateTeamMemberVariables>;
}
export const updateTeamMemberRef: UpdateTeamMemberRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateTeamMember(dc: DataConnect, vars: UpdateTeamMemberVariables): MutationPromise<UpdateTeamMemberData, UpdateTeamMemberVariables>;

interface UpdateTeamMemberRef {
  ...
  (dc: DataConnect, vars: UpdateTeamMemberVariables): MutationRef<UpdateTeamMemberData, UpdateTeamMemberVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateTeamMemberData {
  teamMember_update?: TeamMember_Key | null;
}

Using updateTeamMember's action shortcut function

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

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:

updateTeamMemberInviteStatus(vars: UpdateTeamMemberInviteStatusVariables): MutationPromise<UpdateTeamMemberInviteStatusData, UpdateTeamMemberInviteStatusVariables>;

interface UpdateTeamMemberInviteStatusRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateTeamMemberInviteStatusVariables): MutationRef<UpdateTeamMemberInviteStatusData, UpdateTeamMemberInviteStatusVariables>;
}
export const updateTeamMemberInviteStatusRef: UpdateTeamMemberInviteStatusRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateTeamMemberInviteStatus(dc: DataConnect, vars: UpdateTeamMemberInviteStatusVariables): MutationPromise<UpdateTeamMemberInviteStatusData, UpdateTeamMemberInviteStatusVariables>;

interface UpdateTeamMemberInviteStatusRef {
  ...
  (dc: DataConnect, vars: UpdateTeamMemberInviteStatusVariables): MutationRef<UpdateTeamMemberInviteStatusData, UpdateTeamMemberInviteStatusVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateTeamMemberInviteStatusData {
  teamMember_update?: TeamMember_Key | null;
}

Using updateTeamMemberInviteStatus's action shortcut function

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

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:

acceptInviteByCode(vars: AcceptInviteByCodeVariables): MutationPromise<AcceptInviteByCodeData, AcceptInviteByCodeVariables>;

interface AcceptInviteByCodeRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: AcceptInviteByCodeVariables): MutationRef<AcceptInviteByCodeData, AcceptInviteByCodeVariables>;
}
export const acceptInviteByCodeRef: AcceptInviteByCodeRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

acceptInviteByCode(dc: DataConnect, vars: AcceptInviteByCodeVariables): MutationPromise<AcceptInviteByCodeData, AcceptInviteByCodeVariables>;

interface AcceptInviteByCodeRef {
  ...
  (dc: DataConnect, vars: AcceptInviteByCodeVariables): MutationRef<AcceptInviteByCodeData, AcceptInviteByCodeVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface AcceptInviteByCodeData {
  teamMember_updateMany: number;
}

Using acceptInviteByCode's action shortcut function

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

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:

cancelInviteByCode(vars: CancelInviteByCodeVariables): MutationPromise<CancelInviteByCodeData, CancelInviteByCodeVariables>;

interface CancelInviteByCodeRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CancelInviteByCodeVariables): MutationRef<CancelInviteByCodeData, CancelInviteByCodeVariables>;
}
export const cancelInviteByCodeRef: CancelInviteByCodeRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

cancelInviteByCode(dc: DataConnect, vars: CancelInviteByCodeVariables): MutationPromise<CancelInviteByCodeData, CancelInviteByCodeVariables>;

interface CancelInviteByCodeRef {
  ...
  (dc: DataConnect, vars: CancelInviteByCodeVariables): MutationRef<CancelInviteByCodeData, CancelInviteByCodeVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CancelInviteByCodeData {
  teamMember_updateMany: number;
}

Using cancelInviteByCode's action shortcut function

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

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:

deleteTeamMember(vars: DeleteTeamMemberVariables): MutationPromise<DeleteTeamMemberData, DeleteTeamMemberVariables>;

interface DeleteTeamMemberRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteTeamMemberVariables): MutationRef<DeleteTeamMemberData, DeleteTeamMemberVariables>;
}
export const deleteTeamMemberRef: DeleteTeamMemberRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteTeamMember(dc: DataConnect, vars: DeleteTeamMemberVariables): MutationPromise<DeleteTeamMemberData, DeleteTeamMemberVariables>;

interface DeleteTeamMemberRef {
  ...
  (dc: DataConnect, vars: DeleteTeamMemberVariables): MutationRef<DeleteTeamMemberData, DeleteTeamMemberVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteTeamMemberData {
  teamMember_delete?: TeamMember_Key | null;
}

Using deleteTeamMember's action shortcut function

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

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:

createLevel(vars: CreateLevelVariables): MutationPromise<CreateLevelData, CreateLevelVariables>;

interface CreateLevelRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateLevelVariables): MutationRef<CreateLevelData, CreateLevelVariables>;
}
export const createLevelRef: CreateLevelRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createLevel(dc: DataConnect, vars: CreateLevelVariables): MutationPromise<CreateLevelData, CreateLevelVariables>;

interface CreateLevelRef {
  ...
  (dc: DataConnect, vars: CreateLevelVariables): MutationRef<CreateLevelData, CreateLevelVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateLevelData {
  level_insert: Level_Key;
}

Using createLevel's action shortcut function

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

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:

updateLevel(vars: UpdateLevelVariables): MutationPromise<UpdateLevelData, UpdateLevelVariables>;

interface UpdateLevelRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateLevelVariables): MutationRef<UpdateLevelData, UpdateLevelVariables>;
}
export const updateLevelRef: UpdateLevelRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateLevel(dc: DataConnect, vars: UpdateLevelVariables): MutationPromise<UpdateLevelData, UpdateLevelVariables>;

interface UpdateLevelRef {
  ...
  (dc: DataConnect, vars: UpdateLevelVariables): MutationRef<UpdateLevelData, UpdateLevelVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateLevelData {
  level_update?: Level_Key | null;
}

Using updateLevel's action shortcut function

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

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:

deleteLevel(vars: DeleteLevelVariables): MutationPromise<DeleteLevelData, DeleteLevelVariables>;

interface DeleteLevelRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteLevelVariables): MutationRef<DeleteLevelData, DeleteLevelVariables>;
}
export const deleteLevelRef: DeleteLevelRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteLevel(dc: DataConnect, vars: DeleteLevelVariables): MutationPromise<DeleteLevelData, DeleteLevelVariables>;

interface DeleteLevelRef {
  ...
  (dc: DataConnect, vars: DeleteLevelVariables): MutationRef<DeleteLevelData, DeleteLevelVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteLevelData {
  level_delete?: Level_Key | null;
}

Using deleteLevel's action shortcut function

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

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:

createOrder(vars: CreateOrderVariables): MutationPromise<CreateOrderData, CreateOrderVariables>;

interface CreateOrderRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateOrderVariables): MutationRef<CreateOrderData, CreateOrderVariables>;
}
export const createOrderRef: CreateOrderRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createOrder(dc: DataConnect, vars: CreateOrderVariables): MutationPromise<CreateOrderData, CreateOrderVariables>;

interface CreateOrderRef {
  ...
  (dc: DataConnect, vars: CreateOrderVariables): MutationRef<CreateOrderData, CreateOrderVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateOrderData {
  order_insert: Order_Key;
}

Using createOrder's action shortcut function

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

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:

updateOrder(vars: UpdateOrderVariables): MutationPromise<UpdateOrderData, UpdateOrderVariables>;

interface UpdateOrderRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateOrderVariables): MutationRef<UpdateOrderData, UpdateOrderVariables>;
}
export const updateOrderRef: UpdateOrderRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateOrder(dc: DataConnect, vars: UpdateOrderVariables): MutationPromise<UpdateOrderData, UpdateOrderVariables>;

interface UpdateOrderRef {
  ...
  (dc: DataConnect, vars: UpdateOrderVariables): MutationRef<UpdateOrderData, UpdateOrderVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateOrderData {
  order_update?: Order_Key | null;
}

Using updateOrder's action shortcut function

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

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:

deleteOrder(vars: DeleteOrderVariables): MutationPromise<DeleteOrderData, DeleteOrderVariables>;

interface DeleteOrderRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteOrderVariables): MutationRef<DeleteOrderData, DeleteOrderVariables>;
}
export const deleteOrderRef: DeleteOrderRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteOrder(dc: DataConnect, vars: DeleteOrderVariables): MutationPromise<DeleteOrderData, DeleteOrderVariables>;

interface DeleteOrderRef {
  ...
  (dc: DataConnect, vars: DeleteOrderVariables): MutationRef<DeleteOrderData, DeleteOrderVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteOrderData {
  order_delete?: Order_Key | null;
}

Using deleteOrder's action shortcut function

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

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:

createCategory(vars: CreateCategoryVariables): MutationPromise<CreateCategoryData, CreateCategoryVariables>;

interface CreateCategoryRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateCategoryVariables): MutationRef<CreateCategoryData, CreateCategoryVariables>;
}
export const createCategoryRef: CreateCategoryRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createCategory(dc: DataConnect, vars: CreateCategoryVariables): MutationPromise<CreateCategoryData, CreateCategoryVariables>;

interface CreateCategoryRef {
  ...
  (dc: DataConnect, vars: CreateCategoryVariables): MutationRef<CreateCategoryData, CreateCategoryVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateCategoryData {
  category_insert: Category_Key;
}

Using createCategory's action shortcut function

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

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:

updateCategory(vars: UpdateCategoryVariables): MutationPromise<UpdateCategoryData, UpdateCategoryVariables>;

interface UpdateCategoryRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateCategoryVariables): MutationRef<UpdateCategoryData, UpdateCategoryVariables>;
}
export const updateCategoryRef: UpdateCategoryRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateCategory(dc: DataConnect, vars: UpdateCategoryVariables): MutationPromise<UpdateCategoryData, UpdateCategoryVariables>;

interface UpdateCategoryRef {
  ...
  (dc: DataConnect, vars: UpdateCategoryVariables): MutationRef<UpdateCategoryData, UpdateCategoryVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateCategoryData {
  category_update?: Category_Key | null;
}

Using updateCategory's action shortcut function

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

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:

deleteCategory(vars: DeleteCategoryVariables): MutationPromise<DeleteCategoryData, DeleteCategoryVariables>;

interface DeleteCategoryRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteCategoryVariables): MutationRef<DeleteCategoryData, DeleteCategoryVariables>;
}
export const deleteCategoryRef: DeleteCategoryRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteCategory(dc: DataConnect, vars: DeleteCategoryVariables): MutationPromise<DeleteCategoryData, DeleteCategoryVariables>;

interface DeleteCategoryRef {
  ...
  (dc: DataConnect, vars: DeleteCategoryVariables): MutationRef<DeleteCategoryData, DeleteCategoryVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteCategoryData {
  category_delete?: Category_Key | null;
}

Using deleteCategory's action shortcut function

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

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:

createTaxForm(vars: CreateTaxFormVariables): MutationPromise<CreateTaxFormData, CreateTaxFormVariables>;

interface CreateTaxFormRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateTaxFormVariables): MutationRef<CreateTaxFormData, CreateTaxFormVariables>;
}
export const createTaxFormRef: CreateTaxFormRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createTaxForm(dc: DataConnect, vars: CreateTaxFormVariables): MutationPromise<CreateTaxFormData, CreateTaxFormVariables>;

interface CreateTaxFormRef {
  ...
  (dc: DataConnect, vars: CreateTaxFormVariables): MutationRef<CreateTaxFormData, CreateTaxFormVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateTaxFormData {
  taxForm_insert: TaxForm_Key;
}

Using createTaxForm's action shortcut function

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

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:

updateTaxForm(vars: UpdateTaxFormVariables): MutationPromise<UpdateTaxFormData, UpdateTaxFormVariables>;

interface UpdateTaxFormRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateTaxFormVariables): MutationRef<UpdateTaxFormData, UpdateTaxFormVariables>;
}
export const updateTaxFormRef: UpdateTaxFormRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateTaxForm(dc: DataConnect, vars: UpdateTaxFormVariables): MutationPromise<UpdateTaxFormData, UpdateTaxFormVariables>;

interface UpdateTaxFormRef {
  ...
  (dc: DataConnect, vars: UpdateTaxFormVariables): MutationRef<UpdateTaxFormData, UpdateTaxFormVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateTaxFormData {
  taxForm_update?: TaxForm_Key | null;
}

Using updateTaxForm's action shortcut function

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

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:

deleteTaxForm(vars: DeleteTaxFormVariables): MutationPromise<DeleteTaxFormData, DeleteTaxFormVariables>;

interface DeleteTaxFormRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteTaxFormVariables): MutationRef<DeleteTaxFormData, DeleteTaxFormVariables>;
}
export const deleteTaxFormRef: DeleteTaxFormRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteTaxForm(dc: DataConnect, vars: DeleteTaxFormVariables): MutationPromise<DeleteTaxFormData, DeleteTaxFormVariables>;

interface DeleteTaxFormRef {
  ...
  (dc: DataConnect, vars: DeleteTaxFormVariables): MutationRef<DeleteTaxFormData, DeleteTaxFormVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteTaxFormData {
  taxForm_delete?: TaxForm_Key | null;
}

Using deleteTaxForm's action shortcut function

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

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:

createVendorRate(vars: CreateVendorRateVariables): MutationPromise<CreateVendorRateData, CreateVendorRateVariables>;

interface CreateVendorRateRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateVendorRateVariables): MutationRef<CreateVendorRateData, CreateVendorRateVariables>;
}
export const createVendorRateRef: CreateVendorRateRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createVendorRate(dc: DataConnect, vars: CreateVendorRateVariables): MutationPromise<CreateVendorRateData, CreateVendorRateVariables>;

interface CreateVendorRateRef {
  ...
  (dc: DataConnect, vars: CreateVendorRateVariables): MutationRef<CreateVendorRateData, CreateVendorRateVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateVendorRateData {
  vendorRate_insert: VendorRate_Key;
}

Using createVendorRate's action shortcut function

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

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:

updateVendorRate(vars: UpdateVendorRateVariables): MutationPromise<UpdateVendorRateData, UpdateVendorRateVariables>;

interface UpdateVendorRateRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateVendorRateVariables): MutationRef<UpdateVendorRateData, UpdateVendorRateVariables>;
}
export const updateVendorRateRef: UpdateVendorRateRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateVendorRate(dc: DataConnect, vars: UpdateVendorRateVariables): MutationPromise<UpdateVendorRateData, UpdateVendorRateVariables>;

interface UpdateVendorRateRef {
  ...
  (dc: DataConnect, vars: UpdateVendorRateVariables): MutationRef<UpdateVendorRateData, UpdateVendorRateVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateVendorRateData {
  vendorRate_update?: VendorRate_Key | null;
}

Using updateVendorRate's action shortcut function

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

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:

deleteVendorRate(vars: DeleteVendorRateVariables): MutationPromise<DeleteVendorRateData, DeleteVendorRateVariables>;

interface DeleteVendorRateRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteVendorRateVariables): MutationRef<DeleteVendorRateData, DeleteVendorRateVariables>;
}
export const deleteVendorRateRef: DeleteVendorRateRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteVendorRate(dc: DataConnect, vars: DeleteVendorRateVariables): MutationPromise<DeleteVendorRateData, DeleteVendorRateVariables>;

interface DeleteVendorRateRef {
  ...
  (dc: DataConnect, vars: DeleteVendorRateVariables): MutationRef<DeleteVendorRateData, DeleteVendorRateVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteVendorRateData {
  vendorRate_delete?: VendorRate_Key | null;
}

Using deleteVendorRate's action shortcut function

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

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:

createActivityLog(vars: CreateActivityLogVariables): MutationPromise<CreateActivityLogData, CreateActivityLogVariables>;

interface CreateActivityLogRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateActivityLogVariables): MutationRef<CreateActivityLogData, CreateActivityLogVariables>;
}
export const createActivityLogRef: CreateActivityLogRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createActivityLog(dc: DataConnect, vars: CreateActivityLogVariables): MutationPromise<CreateActivityLogData, CreateActivityLogVariables>;

interface CreateActivityLogRef {
  ...
  (dc: DataConnect, vars: CreateActivityLogVariables): MutationRef<CreateActivityLogData, CreateActivityLogVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateActivityLogData {
  activityLog_insert: ActivityLog_Key;
}

Using createActivityLog's action shortcut function

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

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:

updateActivityLog(vars: UpdateActivityLogVariables): MutationPromise<UpdateActivityLogData, UpdateActivityLogVariables>;

interface UpdateActivityLogRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateActivityLogVariables): MutationRef<UpdateActivityLogData, UpdateActivityLogVariables>;
}
export const updateActivityLogRef: UpdateActivityLogRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateActivityLog(dc: DataConnect, vars: UpdateActivityLogVariables): MutationPromise<UpdateActivityLogData, UpdateActivityLogVariables>;

interface UpdateActivityLogRef {
  ...
  (dc: DataConnect, vars: UpdateActivityLogVariables): MutationRef<UpdateActivityLogData, UpdateActivityLogVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateActivityLogData {
  activityLog_update?: ActivityLog_Key | null;
}

Using updateActivityLog's action shortcut function

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

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:

markActivityLogAsRead(vars: MarkActivityLogAsReadVariables): MutationPromise<MarkActivityLogAsReadData, MarkActivityLogAsReadVariables>;

interface MarkActivityLogAsReadRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: MarkActivityLogAsReadVariables): MutationRef<MarkActivityLogAsReadData, MarkActivityLogAsReadVariables>;
}
export const markActivityLogAsReadRef: MarkActivityLogAsReadRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

markActivityLogAsRead(dc: DataConnect, vars: MarkActivityLogAsReadVariables): MutationPromise<MarkActivityLogAsReadData, MarkActivityLogAsReadVariables>;

interface MarkActivityLogAsReadRef {
  ...
  (dc: DataConnect, vars: MarkActivityLogAsReadVariables): MutationRef<MarkActivityLogAsReadData, MarkActivityLogAsReadVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface MarkActivityLogAsReadData {
  activityLog_update?: ActivityLog_Key | null;
}

Using markActivityLogAsRead's action shortcut function

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

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:

markActivityLogsAsRead(vars: MarkActivityLogsAsReadVariables): MutationPromise<MarkActivityLogsAsReadData, MarkActivityLogsAsReadVariables>;

interface MarkActivityLogsAsReadRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: MarkActivityLogsAsReadVariables): MutationRef<MarkActivityLogsAsReadData, MarkActivityLogsAsReadVariables>;
}
export const markActivityLogsAsReadRef: MarkActivityLogsAsReadRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

markActivityLogsAsRead(dc: DataConnect, vars: MarkActivityLogsAsReadVariables): MutationPromise<MarkActivityLogsAsReadData, MarkActivityLogsAsReadVariables>;

interface MarkActivityLogsAsReadRef {
  ...
  (dc: DataConnect, vars: MarkActivityLogsAsReadVariables): MutationRef<MarkActivityLogsAsReadData, MarkActivityLogsAsReadVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface MarkActivityLogsAsReadData {
  activityLog_updateMany: number;
}

Using markActivityLogsAsRead's action shortcut function

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

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:

deleteActivityLog(vars: DeleteActivityLogVariables): MutationPromise<DeleteActivityLogData, DeleteActivityLogVariables>;

interface DeleteActivityLogRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteActivityLogVariables): MutationRef<DeleteActivityLogData, DeleteActivityLogVariables>;
}
export const deleteActivityLogRef: DeleteActivityLogRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteActivityLog(dc: DataConnect, vars: DeleteActivityLogVariables): MutationPromise<DeleteActivityLogData, DeleteActivityLogVariables>;

interface DeleteActivityLogRef {
  ...
  (dc: DataConnect, vars: DeleteActivityLogVariables): MutationRef<DeleteActivityLogData, DeleteActivityLogVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteActivityLogData {
  activityLog_delete?: ActivityLog_Key | null;
}

Using deleteActivityLog's action shortcut function

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

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:

createShift(vars: CreateShiftVariables): MutationPromise<CreateShiftData, CreateShiftVariables>;

interface CreateShiftRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateShiftVariables): MutationRef<CreateShiftData, CreateShiftVariables>;
}
export const createShiftRef: CreateShiftRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createShift(dc: DataConnect, vars: CreateShiftVariables): MutationPromise<CreateShiftData, CreateShiftVariables>;

interface CreateShiftRef {
  ...
  (dc: DataConnect, vars: CreateShiftVariables): MutationRef<CreateShiftData, CreateShiftVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateShiftData {
  shift_insert: Shift_Key;
}

Using createShift's action shortcut function

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

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:

updateShift(vars: UpdateShiftVariables): MutationPromise<UpdateShiftData, UpdateShiftVariables>;

interface UpdateShiftRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateShiftVariables): MutationRef<UpdateShiftData, UpdateShiftVariables>;
}
export const updateShiftRef: UpdateShiftRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateShift(dc: DataConnect, vars: UpdateShiftVariables): MutationPromise<UpdateShiftData, UpdateShiftVariables>;

interface UpdateShiftRef {
  ...
  (dc: DataConnect, vars: UpdateShiftVariables): MutationRef<UpdateShiftData, UpdateShiftVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateShiftData {
  shift_update?: Shift_Key | null;
}

Using updateShift's action shortcut function

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

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:

deleteShift(vars: DeleteShiftVariables): MutationPromise<DeleteShiftData, DeleteShiftVariables>;

interface DeleteShiftRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteShiftVariables): MutationRef<DeleteShiftData, DeleteShiftVariables>;
}
export const deleteShiftRef: DeleteShiftRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteShift(dc: DataConnect, vars: DeleteShiftVariables): MutationPromise<DeleteShiftData, DeleteShiftVariables>;

interface DeleteShiftRef {
  ...
  (dc: DataConnect, vars: DeleteShiftVariables): MutationRef<DeleteShiftData, DeleteShiftVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteShiftData {
  shift_delete?: Shift_Key | null;
}

Using deleteShift's action shortcut function

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

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:

createStaff(vars: CreateStaffVariables): MutationPromise<CreateStaffData, CreateStaffVariables>;

interface CreateStaffRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: CreateStaffVariables): MutationRef<CreateStaffData, CreateStaffVariables>;
}
export const createStaffRef: CreateStaffRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

createStaff(dc: DataConnect, vars: CreateStaffVariables): MutationPromise<CreateStaffData, CreateStaffVariables>;

interface CreateStaffRef {
  ...
  (dc: DataConnect, vars: CreateStaffVariables): MutationRef<CreateStaffData, CreateStaffVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface CreateStaffData {
  staff_insert: Staff_Key;
}

Using CreateStaff's action shortcut function

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

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:

updateStaff(vars: UpdateStaffVariables): MutationPromise<UpdateStaffData, UpdateStaffVariables>;

interface UpdateStaffRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: UpdateStaffVariables): MutationRef<UpdateStaffData, UpdateStaffVariables>;
}
export const updateStaffRef: UpdateStaffRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

updateStaff(dc: DataConnect, vars: UpdateStaffVariables): MutationPromise<UpdateStaffData, UpdateStaffVariables>;

interface UpdateStaffRef {
  ...
  (dc: DataConnect, vars: UpdateStaffVariables): MutationRef<UpdateStaffData, UpdateStaffVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface UpdateStaffData {
  staff_update?: Staff_Key | null;
}

Using UpdateStaff's action shortcut function

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

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:

deleteStaff(vars: DeleteStaffVariables): MutationPromise<DeleteStaffData, DeleteStaffVariables>;

interface DeleteStaffRef {
  ...
  /* Allow users to create refs without passing in DataConnect */
  (vars: DeleteStaffVariables): MutationRef<DeleteStaffData, DeleteStaffVariables>;
}
export const deleteStaffRef: DeleteStaffRef;

You can also pass in a DataConnect instance to the action shortcut function or MutationRef function.

deleteStaff(dc: DataConnect, vars: DeleteStaffVariables): MutationPromise<DeleteStaffData, DeleteStaffVariables>;

interface DeleteStaffRef {
  ...
  (dc: DataConnect, vars: DeleteStaffVariables): MutationRef<DeleteStaffData, DeleteStaffVariables>;
}
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:

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. It has the following fields:

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. It has the following fields:

export interface DeleteStaffData {
  staff_delete?: Staff_Key | null;
}

Using DeleteStaff's action shortcut function

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

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