Function: updateObject()
function updateObject(
client,
parameters,
options?
): Promise<{
[key: string]: unknown;
_links: {
[key: string]: unknown;
self: string;
};
attributes?: object[];
avatar: {
[key: string]: unknown;
avatarUUID?: string;
globalId: string;
id?: string;
objectId: string;
url144: string;
url16: string;
url288: string;
url48: string;
url72: string;
workspaceId: string;
};
created: Date;
globalId: string;
hasAvatar: boolean;
id: string;
label: string;
objectKey: string;
objectType: {
[key: string]: unknown;
abstractObjectType: boolean;
created: Date;
description?: string;
globalId: string;
icon: {
[key: string]: unknown;
id: string;
name: string;
url16: string;
url48: string;
};
id: string;
inherited: boolean;
name: string;
objectCount: number;
objectSchemaId: string;
parentObjectTypeId?: number;
parentObjectTypeInherited: boolean;
position: number;
type?: number;
updated: Date;
workspaceId: string;
};
timestamp: number;
updated: Date;
workspaceId: string;
}>;Defined in: src/assets/api/objects.ts:39
Update an existing object in Assets
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { attributes: object[]; avatarUUID?: string; hasAvatar?: boolean; id: string; objectTypeId: string; } | - |
parameters.attributes | object[] | - |
parameters.avatarUUID? | string | The UUID as retrieved by uploading an avatar. |
parameters.hasAvatar? | boolean | - |
parameters.id? | string | The object id to operate on |
parameters.objectTypeId? | string | The object type determines where the object should be stored and which attributes are available |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; _links: { [key: string]: unknown; self: string; }; attributes?: object[]; avatar: { [key: string]: unknown; avatarUUID?: string; globalId: string; id?: string; objectId: string; url144: string; url16: string; url288: string; url48: string; url72: string; workspaceId: string; }; created: Date; globalId: string; hasAvatar: boolean; id: string; label: string; objectKey: string; objectType: { [key: string]: unknown; abstractObjectType: boolean; created: Date; description?: string; globalId: string; icon: { [key: string]: unknown; id: string; name: string; url16: string; url48: string; }; id: string; inherited: boolean; name: string; objectCount: number; objectSchemaId: string; parentObjectTypeId?: number; parentObjectTypeInherited: boolean; position: number; type?: number; updated: Date; workspaceId: string; }; timestamp: number; updated: Date; workspaceId: string; }>