# Interface LayerApiClient

Provides methods to call the layer API endpoints in the backend

interface LayerApiClient {
add: (
attachTo: Pick<BimChange, "id" | "apiUrl"> & Partial<
Pick<BimChange, "name">,
>,
data: BimChangeLayerData,
) => Promise<TypedResponse<BimChangeLayer>>;
update: (
layer: Pick<
BimChangeLayer,
"etag"
| "id"
| "metadata"
| "name"
| "apiUrl",
>,
options?: { data?: unknown; overwrite?: boolean },
) => Promise<TypedResponse<BimChangeLayer>>;
}

##### Index

### Properties

add
update

## Properties

### add

add: (
attachTo: Pick<BimChange, "id" | "apiUrl"> & Partial<
Pick<BimChange, "name">,
>,
data: BimChangeLayerData,
) => Promise<TypedResponse<BimChangeLayer>>

Adds a layer

#### Type declaration

- - (
    attachTo: Pick<BimChange, "id" | "apiUrl"> & Partial<
    Pick<BimChange, "name">,
    >,
    data: BimChangeLayerData,
    ): Promise<TypedResponse<BimChangeLayer>>

  - #### Parameters

    - attachTo: Pick<BimChange, "id" | "apiUrl"> & Partial<Pick<BimChange, "name">>

      a change to attach the layer to. id is required while name is optional. If name is not specified then it is calculated from the data format.

    - data: BimChangeLayerData

    #### Returns Promise<TypedResponse<BimChangeLayer>>

### update

update: (
layer: Pick<
BimChangeLayer,
"etag"
| "id"
| "metadata"
| "name"
| "apiUrl",
>,
options?: { data?: unknown; overwrite?: boolean },
) => Promise<TypedResponse<BimChangeLayer>>