Hello
In my application I grab the change event and also filter out duplicate responses. This way I take into account responses that match a certain format. For custom field changes I expect an object that looks like this:
{
data: [
{
user: [Object],
created_at: '2022-11-16T14:32:03.311Z',
type: 'task',
action: 'changed',
resource: [Object],
parent: null,
change: [Object]
}
],
sync: '129c0d3d5c9a15e39a5d91fa9b6fc18c:0',
has_more: false
}
{
user: {
gid: '-',
resource_type: 'user',
name: '-'
},
created_at: '2022-11-16T14:32:03.311Z',
type: 'task',
action: 'changed',
resource: {
gid: '-',
resource_type: 'task',
name: '-',
resource_subtype: 'default_task'
},
parent: null,
change: {
field: 'custom_fields',
action: 'changed',
new_value: {
gid: '-',
resource_type: 'custom_field',
created_by: [Object],
resource_subtype: 'enum',
type: 'enum',
name: 'status',
enabled: true,
enum_options: [Array],
enum_value: [Object],
display_value: '-'
}
}
}
The response is a combination of the encapsulated data object at first, and a decapsulated object which is sent directly afterwards (they both use the same sync token).
In the vast majority of cases, the second decapsulated object (which I want to use for the generic approach of my code) is only given to me on the first change event to a custom field in the same runtime. After that, I only get the encapsulated object. So the response to the change event will look like this
{
data: [
{
user: [Object],
created_at: '2022-11-16T14:32:03.311Z',
type: 'task',
action: 'changed',
resource: [Object],
parent: null,
change: [Object]
}
],
sync: '129c0d3d5c9a15e39a5d91fa9b6fc18c:0',
has_more: false
}
Do I have any influence on this?
Thank you and greetings