/** * Facade over `client.augmentModel` (`aaf_sdk.js`): `add(dataObject, augmentData)`. * * ECC source: `com.drishti.ameyo.application.app.impl.AugmentModelService` * (service name **`augmentModel`**, `DataObjectEnum.USER_ATTRIBUTRES = "userAttributes"`). * * Currently only `dataObject = "userAttributes"` is supported by the host. Use it * to attach extra agent multimedia attributes that downstream Ameyo subscribers * (state managers, dashboards) can read. */ export const GwtAugmentModelDataObject = { /** Note ECC's `USER_ATTRIBUTRES` enum spelling — the value is `userAttributes`. */ userAttributes: "userAttributes" } as const; export type GwtAugmentModelDataObjectName = (typeof GwtAugmentModelDataObject)[keyof typeof GwtAugmentModelDataObject]; /** Free-form augmentation data: typically `{ skills: ["voice", "chat"], ... }`. */ export type AugmentData = Record; export interface AafAugmentModelApi { add: ( dataObject: GwtAugmentModelDataObjectName | (string & {}), augmentData: AugmentData ) => Promise; } export interface HasAugmentModel { augmentModel: AafAugmentModelApi; } export function addUserAttributes( client: HasAugmentModel, augmentData: AugmentData ): Promise { return client.augmentModel.add(GwtAugmentModelDataObject.userAttributes, augmentData); }