import { BaseResourceAPI, CursorAndAsyncIterator, IdEither } from '@cognite/sdk-core'; import { ContextJobId, EntityMatchingChange, EntityMatchingCreateRequest, EntityMatchingCreateResponse, EntityMatchingFilterRequest, EntityMatchingModel, EntityMatchingPredictRequest, EntityMatchingPredictResponse, EntityMatchingPredictions, EntityMatchingRefitRequest, EntityMatchingRefitResponse } from '../../types'; export declare class EntityMatchingApi extends BaseResourceAPI { /** * @hidden */ protected getDateProps(): [string[], string[]]; /** * [Create entity matcher](https://docs.cognite.com/api/v1/#operation/entityMatchingCreate) * * ```js * const result = await client.entityMatching.create({ * sources: [{externalId: 'asset1', name: 'asset1'}, {externalId: 'asset2', name: 'asset2'}], * targets: [{externalId: 'ts1', name: 'ts1'}, {externalId: 'ts2', name: 'ts2'}], * externalId: 'model123', * name: 'model123', * }); * ``` */ create: (scope: EntityMatchingCreateRequest) => Promise; /** * [Retrieve entity matching models](https://docs.cognite.com/api/v1/#operation/entityMatchingRetrieve) * * ```js * const [result] = await client.entityMatching.retrieve([{ externalId: 'model123' }]); * ``` */ retrieve: (ids: IdEither[]) => Promise; /** * [List entity matching models](https://docs.cognite.com/api/v1/#operation/entityMatchingFilter) * * ```js * const { items } = await client.entityMatching.list({ filter: { name: 'model123' }}); * ``` */ list: (scope?: EntityMatchingFilterRequest) => CursorAndAsyncIterator; /** * [Update entity matching models](https://docs.cognite.com/api/v1/#operation/entityMatchingUpdate) * * ```js * const [updated] = await client.entityMatching.update([{ * externalId: 'model123', * update: { description: { set: 'ΓΈ' }} * }]); * ``` */ update: (changes: EntityMatchingChange[]) => Promise; /** * [Delete entity matcher model](https://docs.cognite.com/api/v1/#operation/entityMatchingDelete) * * ```js * await client.entityMatching.delete([{ externalId: 'model123' }]); * ``` */ delete: (ids: IdEither[]) => Promise; /** * [Predict matches](https://docs.cognite.com/api/v1/#operation/entityMatchingPredict) * * ```js * const response = await client.entityMatching.predict({ * externalId: 'model123', * sources: [{externalId: 'asset1', name: 'asset1'}, {externalId: 'asset2', name: 'asset2'}], * targets: [{externalId: 'ts1', name: 'ts1'}, {externalId: 'ts2', name: 'ts2'}], * }); * ``` */ predict: (scope: EntityMatchingPredictRequest) => Promise; /** * [Retrieve entity matcher predict result](https://docs.cognite.com/api/playground/#operation/entityMatchingPredictResults) * * ```js * const { status, items } = await client.entityMatching.predictResult(12345678); * ``` */ predictResult: (jobId: ContextJobId) => Promise; /** * [Re-fit entity matcher model](https://docs.cognite.com/api/v1/#operation/entityMatchingReFit) * * ```js * await client.entityMatching.refit({ * newExternalId: 'newModel123', * sources: [{externalId: 'asset1', name: 'asset1'}, {externalId: 'asset2', name: 'asset2'}], * targets: [{externalId: 'ts1', name: 'ts1'}, {externalId: 'ts2', name: 'ts2'}], * externalId: 'model123', * trueMatches: [{sourceExternalId: 'asset1', targetExternalId: 'ts1'}] * }); * ``` */ refit: (scope: EntityMatchingRefitRequest) => Promise; }