Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions descriptions/0/api.intercom.io.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12442,6 +12442,15 @@ paths:
email: [email protected]
attachments: []
redacted: false
updated_attribute_data:
attribute:
type: "attribute"
id: "10"
label: "Photo"
value:
type: "value"
id: [2]
label: ["photo.png"]
Comment on lines +12452 to +12453
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these arrays because attributes can be arrays? Or what's the reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. There are different kind of attributes and the way we have the ID and label can slightly differe in different cases. See examples here

Mainly, file attributes can hold multiple files in a single attribute. That's the reason arrays are used there if the attribute is a file attribute.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case of an attribute is cleared,

  • id can either be null or an empty array (for file attribute)
  • label can either be an empty string or empty array (for file attribute)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the type field not change depending on if it's an array or single value? Or does the client need to check for array or single value each time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently type only returns attribute. We can add some extra queries to find the actual type of the attribute and use that as the type so the client would know what to expect there.
Alternatively the client can query that separately if they want to know the type of the attribute for that ticket type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wait to hear from the customer so we can improve that furthermore.

- type: ticket_part
id: '178'
part_type: ticket_attribute_updated_by_admin
Expand All @@ -12454,6 +12463,15 @@ paths:
email: [email protected]
attachments: []
redacted: false
updated_attribute_data:
attribute:
type: "attribute"
id: "7"
label: "Progress"
value:
type: "value"
id: "Fast"
label: "Fast"
- type: ticket_part
id: '179'
part_type: ticket_state_updated_by_admin
Expand Down Expand Up @@ -19958,6 +19976,72 @@ components:
nullable: false
example: text-integration
description: The app package code if this part was created via API. Note this field won't show if the part was not created via API.
updated_attribute_data:
title: Updated Attribute
type: object
description: The updated attribute data of the ticket part. Only present for attribute update parts.
nullable: true
properties:
attribute:
type: object
description: Information about the attribute that was updated.
properties:
type:
type: string
description: The type of the object. Always 'attribute'.
enum:
- attribute
example: attribute
id:
type: string
description: The unique identifier of the attribute.
example: "7"
label:
type: string
description: The human-readable name of the attribute.
example: "Progress"
required:
- type
- id
- label
value:
type: object
description: The new value of the attribute.
properties:
type:
type: string
description: The type of the object. Always 'value'.
enum:
- value
example: value
id:
oneOf:
- type: string
description: The value for text/number/decimal/boolean/date attributes, or the ID of the list option for list attributes.
nullable: true
example: "Fast"
- type: array
description: Array of file IDs for file attributes.
items:
type: integer
example: [2]
label:
oneOf:
- type: string
description: The display value for text/number/decimal/boolean/date/list attributes.
example: "Fast"
- type: array
description: Array of file names for file attributes.
items:
type: string
example: ["photo.png"]
required:
- type
- id
- label
required:
- attribute
- value
ticket_part_author:
title: Ticket part author
type: object
Expand Down